Upgrading Statamic from v2 to v3
Embark on a seamless transition from Statamic v2 to v3 by following our step-by-step guide. But first, ensure you've acquainted yourself with:
- Updating v2 to the Latest Version (opens in a new tab)
- The Official Upgrade Guide to v3 (opens in a new tab)
Snag the latest v2 version from the Statamic website. Keep in mind that v2 can be accessed through the account where your license was purchased.
php please versionto fetch your current v2 version.
- Extract the contents once you've acquired the local copy of Statamic.
- Replace the existing
statamicfolder in the v2 website with the new one.
- Complete the update with
php please update:housekeeping.
Whip up a fresh Statamic website:
statamic new name-of-website
Install the migrator (opens in a new tab):
composer require statamic/migrator --dev --with-all-dependencies
Clear the new site and double-check the
trees folders for references to existing collections. Remove them all before proceeding.
php please site:clear
From the v2 installation, copy over the
site, and any other local folders.
Commit everything to
git for efficient change tracking during migration.
Now, initiate the migration:
php please migrate:site
Ensure a smooth experience by checking the following:
- Verify that assets load correctly in the layout file.
- Look out for deprecated tags like
- Inspect routes in
web.php, eliminating unnecessary ones.
- Keep an eye on templates using
field_name | url. Replace or eliminate them with