Upgrading to Craft 4
Craft 4 goes much deeper into the content management authorship experience.
Why You Should Upgrade
Are you on Craft 2 or 3 currently, and are wondering if it's worth the cost and overhead to upgrade to the newly released Craft 4? The answer is absolutely yes, and more so if you are running CraftCMS version 2 (more on this down below).
CraftCMS is under heavy development, which means new features ranging from tooling for developers to content authorship experience enhancements are being released all the time. To get the most out of your investment you'll want to make sure you are at least running the latest major version of Craft.
Craft CMS 2 to Craft CMS 4
If you are running Craft 2, it is imperative that you upgrade to Craft 3 immediately. Not only has Craft 2 stop receiving security updates, Pixel and Tonic doesn't even list version 2 on its supported versions page anymore.
The best way to get a Craft 2 site upgraded to Craft 4 is to first upgrade it to version 3. I like to begin by making sure all of the plugins involved have a Craft 3 equivalent. Since Craft 2 and 3 are pretty outdated at this point, you'll need to be a bit sleuthy in how you install all of the Craft 3 equivalent plugins on your upgrade journey.
Most plugins have a 3.x branch available on github which you can require in your composer.json file. Once I've completed that, I usually follow the instructions outlined on the Craft CMS documentation.
If you need assistance from professionals with this part, don't hesitate to reach out to us for help!
Upgrading from Craft 3 to Craft 4
Thankfully Pixel and Tonic have made upgrading from Craft to Craft much much easier this time around. You'll start again by making sure your composer.json has all of the necessary plugin updates ready, I usually like to do this manually as there's a lot of investigation involved. Once you've done that, make sure you are running at least the latest major version of Craft 3.7.X (this makes it much smoother to upgrade).
You can now run in your terminal:
composer update
In this step you'll need to resolve any dependency issues that arose from the above command, since each Craft install is unique, there is no way we could cover every scenario here.
Once you've resolved all of your dependency issues you can now run in your terminal:
./craft migrate/all
You should be done with the hard part, we recommend testing the admin panel and front end extensively prior to moving this to production. We've found that Craft 4 is more strict about settings in general.php. We had to remove 'useProjectConfigFile' => true.
Also there seems to be a new format for log file naming, now including a date string.
If all this seems overwhelming, feel free to reach out!
We can absolutely help with upgrading your Craft CMS system, reach out to us for more details!
Continue reading.
The Element API plugin is a very powerful tool that you can use for quickly exposing your data structures to an external source.
Find out moreHere at Brilliance, we LOVE CraftCMS. Our clients love it as well.
Find out moreA brief introduction to consensus mechanisms and why proof of stake is the right move for Ethereum.
Find out moreLet's chat about your project
Portland, OR 97215