Upgrading Statamic from v2 to v3
In this guide we will document our steps at migrating a Statamic website from v2 to v3.
Before starting make sure you read the following guides:
The easiest way to do this is by grabbing the latest v2 version from the Statamic website. Please note that the v2 version is available for download from the account that you purchased the license.
php please versionto grab the current v2 version.
- After you have a local copy of Statamic, extract the contents.
- Grab the
statamicfolder and paste it in the v2 website (Replace the current folder).
php please update:housekeepingto finish the update.
Create a fresh statamic website:
statamic new name-of-website
Install the migrator
composer require statamic/migrator --dev --with-all-dependencies
Now clear the new site, also manually check the
trees folder for any reference of existing collections. They all need to be deleted before migrating.
php please site:clear
From the v2 installation copy the
site and any other local folders.
Now you should commit everything to
git, it will make tracking changes easier when migrating.
Now to migrate run:
php please migrate:site
Important things to check:
- On the layout file make sure the assets are loading with the correct path.
- Check for depreciated tags for ex:
- Check routes on
web.phpand remove unnecessary ones.
- Check templates for usage of
field_name | urlit should be either removed or replaced with