Upgrade Your Craft CMS Site to PHP 8: It’s Business Critical

Created on November 12, 2023 at 10:11 am

Keeping your Craft CMS site up to date is always important. The overall technology stack that powers Craft ORG is also crucial to your site’s security and performance. But sometimes, life happens and you forget to upgrade. Or maybe you have too many other projects and haven’t prioritized it. Or maybe the thought of upgrading is just too scary. Whatever it is, don’t worry – you’re not alone! Investing time now for the upgrade could save considerable time and resources in the future by preventing security breaches and performance bottlenecks as well as improving future maintainability.

The Case for Upgrading

Craft 4 was released in May 2022 DATE and requires PHP 8 LAW . This means if you have any plans to upgrade to Craft 4 ORG (and you should!), you’ll need to upgrade PHP ORG as well. But upgrading PHP ORG doesn’t require you to upgrade Craft ORG . PHP 8 CARDINAL has been supported since Craft CMS 3.6 ORG . Upgrading PHP first ORDINAL can make the transition to Craft 4 ORG much smoother and quicker as you’ll be able to check what custom code needs updating and get your plugins up to date for PHP 8 LAW and Craft 4 ORG . This is a good idea to do first ORDINAL – especially since sites that don’t get updated regularly tend to have plugins or build tools that are no longer maintained or compatible. Because of this, you may need to swap plugins with replacements as well as upgrade libraries and build tools to keep your setup working smoothly post-upgrade.


While you may not see updating PHP as something that can speed up your site, it really can make a difference! There have been several improvements made in PHP 8 LAW that can reduce the time it takes to run your code. Features like the JIT (Just In Time ORG ) compiler can improve the time it takes to interpret your code, while other improvements to typing, constructor promotion, and null coalescing can improve the quality, readability and reliability of your Craft ORG modules. All of these can help improve your site’s performance and end-user experience, reduce security risks, and make it easier and faster to maintain over time.


Upgrading from PHP 7.4 to 8.x ORG can have an immediate effect on your site. PHP 8 CARDINAL is fast; but don’t take my word for it. Take a look at the test results from Kinsta below.

Connecting to blog.lzomedia.com... Connected... Page load complete