With the launch of Craft 4 in April 2022, Craft 2 is no longer supported. It’s time for companies still using Craft 2 to upgrade their websites to Craft 3, and have a plan for when to migrate to Craft 4.
2minutes remaining
Migrating to Craft 3
CraftCMS is a flexible, affordable, user-friendly content management system (CMS) built on a standard, open-source software stack by Pixel and Tonic. Its strong ecosystem of plugins and integrations makes it an attractive option for small startups and Fortune 500 companies alike.
In April 2022, Pixel and Tonic released its latest version, Craft 4, which has some long-awaited improvements like conditional fields in the CMS, which make editing content easier. Craft 2 is no longer supported.
Benefits of upgrading to Craft 3
It’s a good idea to keep web software updated to incorporate the latest in web security and fix any bugs in prior versions. Craft installations often use a number of plugins, which their developers will stop maintaining in their Craft 2 versions. In addition, many plugins have been released that only work on Craft 3.
Craft 3 has performance improvements, along with updates that make it easier for editors and developers to make, manage, and deploy changes quickly. Some of these include:
Multi-site functionality: Craft 3 supports multiple sites, regions, and languages. This makes localization easier, as well as supporting multiple brands and web properties.
Enhanced image editing tools: Craft 3 has a built-in image editor which allows users to crop, rotate, flip, and set focal points on images.
Better support for load-balanced environments: Sites based on Craft 3 can handle higher levels of traffic more easily than Craft 2.
Settings changes treated as code: In Craft 2, any changes to fields or entries needed to be performed on every environment by hand, which takes up more developer time and leads to potential transcription errors. In Craft 3, settings changes can be saved as files, checked into version management systems, and deployed to each environment.
Support for environment variables: This makes it easier to deploy from a development environment to staging and production environments, which may have different databases, API keys, and other settings.
Upgraded Framework and templating language: Craft 3 is built on Yii2, a stable framework that launched in 2014 and has replaced Yii as the standard. Craft uses the twig templating language. In Craft 3, the latest version of twig includes more built-in functions, including formatting of dates, times, and currencies.
Enhanced plugin store: Craft 3 allows administrators to install plugins directly from the Admin Console. Many agencies and developers have written fantastic plugins for Craft 3. Here are a few examples:
SEOmatic handles all SEO tasks, including setting meta tags, creating sitemaps, and keeping robots and security files updated.
Workflow allows publishers to create a workflow for writing, editing, and publishing new entries with configurable approval queues and permissions.
Neo is a sophisticated field builder that can replace deeply nested matrixes and supertables. It gives more flexibility to developers and content editors and is more maintainable than Craft’s out-of-the-box matrix fields.
This upgrade will need to be done in a development environment, in collaboration between a web engineer and server administrator.
The three phases of migration to Craft 3
Phase 1: Preparation
Audit all custom code and make a plan to update it. These changes are generally minor syntax updates.
Audit all plugins and identify their Craft 3 counterparts
Ensure that the hosting environment meets Craft 3’s requirements
Upgrade the existing install to Craft 2.6.2788, since this version and higher have built-in support for the migration to Craft 3
Back up the code, files, and database
Phase 2: Upgrade
Fully test the front-end and all custom code on the development environment
Make necessary environment and permission changes on other environments
Deploy updated code to another non-production environment to test that the upgrade deploys correctly
Schedule the production upgrade for a low-traffic time and, if possible, prepare a server maintenance page while upgrading production
Phase 3: Test & Release
Download and install Craft 3
Set PHP file permissions
Configure environment variables
Update other configuration files
Rearrange project folders per Craft 3 specifications
Make code updates
Install updated plugins
Congratulations, you now have a site running Craft 3, with all of its performance and security improvements!
Craft 3? What About Craft 4?
Migrating to Craft 3 is a necessary step before moving to Craft 4, though it’s possible to go through a complete upgrade in one project. Every Craft 3 installation now has a dashboard that shows which plugins have also been upgraded for Craft 4. As of this writing, many necessary plugins have been upgraded, but not all of them. Imarc is monitoring the plugin upgrades and will communicate with clients when we have fully tested Craft 4 and believe it’s a smart time to migrate. Based on the improvements we’ve already seen, we’re looking forward to introducing Craft 4 to our clients.
Planning for your upgrade to Craft 3
Craft 3 has many exciting enhancements that can improve your website, the experience of editing it, and its ability to scale with a growing business. Bringing your website up to date will improve its reliability, time-to-market for new features, performance, and security. Imarc has seamlessly performed these upgrades many times, and our team is available to help you audit and upgrade your website.