Blog prod

Does a PHP version requirement mean you have to update your EE or Craft content management system?

An ominous sunset

Photo by Patricia Jekki on Unsplash

(updated Jan 19, 2022; updated Dec 18, 2023)

Here’s the situation: The version of PHP installed on your server is about to sunset*, and you’re panicking. You already know that you can upgrade your PHP version by flipping a toggle or sending an email to support, but what effect will this have on your CMS (Content Management System), your third-party add-ons, and any other services you’ve installed?

Do they also need updates, or perhaps complete replacement? Are there custom settings that will need to be reapplied? Will it affect site performance? And what if you need to move to a newer server?

Worry no longer: we’re here to help!

When do I need to upgrade?

We all know that keeping our sites up to date is important, and we usually focus on the CMS itself. Updates for add-ons or core system components like PHP can sometimes sneak up. When it comes to PHP in particular, the maintainers announce End of Life dates years in advance, so it’s easy to have a plan in place to meet them—and important, because most hosting companies will eventually require you to do so.

When it comes to PHP, there are two important dates to watch for. First is when official development ends. This is about two years after the initial release date. Following that, for the next year, there will be no new features, only security updates. The second important date is the official End Of Life. That’s when they stop supporting the version altogether.

“Each release branch of PHP is fully supported for two years from its initial stable release. During this period, bugs and security issues that have been reported are fixed and are released in regular point releases.

After this two year period of active support, each branch is then supported for an additional year for critical security issues only. Releases during this period are made on an as-needed basis: there may be multiple point releases, or none, depending on the number of reports.”

- straight from the horse’s (elephant’s?) mouth at php.net

It’s important to make sure you are not running a version that has reached End Of Life, as you’re leaving your system exposed to any vulnerability found after that date, as it will not be fixed!

Here are the End Of Life dates for each major PHP version.

PHP 5.6 - Jan 2017 - End of development
PHP 5.6 - Jan 2019 - End of life

PHP 7.2 - Dec 2019 - End of development
PHP 7.2 - Dec 2020 - End of life

PHP 7.4 - Nov 2021 - End of development
PHP 7.4 - Nov 2022 - End of life

PHP 8.0 - Nov 2022 - End of development
PHP 8.0 - Nov 2023 - End of life

PHP 8.1 - Nov 2023 - End of development
PHP 8.1 - Nov 2024 - End of life

PHP 8.2 - Dec 2024 - End of development
PHP 8.2 - Dec 2025 - End of life

PHP 8.3 (Latest as of November 2023) - Nov 2025 - End of development
PHP 8.3 - Nov 2026 - End of life

But if I upgrade PHP, will my CMS stop working?

That’s a great question, and I’m glad you asked. Depending on which version you’re currently on, you might face compatibility issues. Let’s take a look.


Craft CMS

Craft 2

Minimum PHP: 5.4
Recommended PHP: 7.4
Maximum PHP: Not PHP 8

Craft 2 has a minimum PHP requirement of 5.4, and it’s a safe bet that any server running today is running something more recent than 5.4. As for upgrading, full support for PHP 7.4 was added to Craft in version 2.8.0.

If you’re using Craft 2, it’s very important to make sure all the plugins installed will be compatible with a newer PHP version, but Craft 2 itself won’t be a problem all the way up to PHP 7.4. This would also be a great time to look into updating Craft itself to version 3.

 

Craft 3

Minimum PHP: 7.0, 3.6 requires 7.2.4
Recommended PHP: 7.4
Maximum PHP: Says it runs under PHP 8 (probably 8.0), but some extensions won’t

Craft 3 supports PHP 7.4 out of the box right from the start. It also has a minimum PHP requirement of 7.0. That means that if you’re on Craft 3, moving to the latest version of PHP shouldn’t pose much of a problem. Once again, it’s important to check all of your plugins before updating. If you do run into problems, it’s likely to be on the plugin side rather than on the core Craft side.

 

Craft 4

Minimum PHP: PHP 8.0.2
Recommended PHP: PHP 8.1
Maximum PHP: unclear

Updating your server’s PHP version necessitates evaluating the compatibility of your Craft CMS version. For Craft CMS versions up to 3.6, compatibility with the older PHP versions is maintained. However, if you’re using a Craft CMS version older than this, an upgrade is essential to ensure compatibility and security.


ExpressionEngine

ExpressionEngine 1 & 2

Minimum PHP: 5.3.10
Recommended PHP: None, please just upgrade. (Fine, it’s 7.2 for EE2)

If you’re currently running a site with ExpressionEngine 1, please (please!) let us help you upgrade or migrate to a modern version of that CMS.

ExpressionEngine 1 was retired completely in 2013, and running software that old poses serious security risks for you and your users. Upgrading your version of PHP will be impossible until your CMS has been updated.

If you’re running ExpressionEngine 2, add one more “please” to the above paragraph.

 

ExpressionEngine 3

Minimum PHP: 5.3.10
Recommended PHP: 7.2
Maximum PHP: 7.2

Support for PHP 7 arrived with ExpressionEngine 3.1.0. The most recent fully supported PHP version before the team moved on to EE4 was 7.2, in EE 3.5.13. Assuming all of your add-ons are up to date, there shouldn’t be any issues moving an ExpressionEngine 3 site all the way up to PHP 7.2. It’s also fairly easy to go from EE3 to EE5, though, so why stop here?

 

ExpressionEngine 4 & 5

Minimum PHP: 5.6
Recommended PHP: 7.4
Maximum PHP: 7.4 for EE 4, 8 for EE 5.4 but we don’t trust it (change log)

With the introduction of ExpressionEngine 4, the minimum PHP version changed to 5.6.

Support for PHP 7.2 was baked into 4.0, though small PHP support issues (for both newest and oldest PHP versions) were fixed throughout the 4s and 5s…Support for PHP 7.3 was added in version 5.1.0 and PHP 7.4 support was added in 5.3.1.

Updating PHP to the latest version will not be a problem, because updating EE itself became a one-click process with EE 4… but your add-ons may present some difficulties. Always update them first.

Support for PHP 8 was added in version 5.4.0, but be cautious if you try to upgrade to PHP 8 in ExpressionEngine 4, as it is NOT supported and will cause critical errors on your site.

 

ExpressionEngine 6

Minimum PHP: 7.0
Recommended PHP: 7.4
Maximum PHP: 8.2 for EE 6.4.15 (change log)

Expression Engine 6 was officially released on December 17, 2020 and supports PHP versions from 5.6 all the way up to some releases of PHP 8. If your server is still running PHP 5.6 and you’re updating to (or are freshly installing) ExpressionEngine 6, we highly recommend updating PHP as well!

Not only did PHP 5 reach end of life way back in 2019, but many popular add-ons built for ExpressionEngine 6 no longer support it at all. Staying on such an old version of PHP is definitely asking for trouble. Also new in ExpressionEngine 6, you will be able to upgrade directly from ExpressionEngine 2 to the latest version. We’ve had some success with it, but depending on your add-ons and individual set up, it may or may not work for you. Give it a try!

You might be wondering why we’re recommending you use PHP 7.4 rather than the newer 8. This is because we’ve encountered a few add-ons that were designed for PHP 7.4, and still have some bugs to iron out before they’re ready to run under PHP 8.

ExpressionEngine 6 continues to get “LTS” (Long Term Support) including recent support for PHP 8.2. This compatibility allows users to upgrade to the latest release of ExpressionEngine 6, rather than transitioning to ExpressionEngine 7, if they are for some reason required to upgrade to PHP 8.2. (Possibly this would be because PHP 7.4 is now End of Life.)

While running the latest version of ExpressionEngine 6 on older PHP versions is possible, it’s not recommended. Older PHP versions can degrade performance and expose your site to security vulnerabilities. See the EE 6 Change Log for more details about PHP 8.x support.

 

ExpressionEngine 7

Minimum PHP: 7.4 (7.2.5 maybe - learn more)
Recommended PHP: 8.1, or 8.2 for 7.2.8 and newer (learn more)
Maximum PHP: 8.2 at the moment, and not all add-ons are necessarily ready for 8.2

The latest version of ExpressionEngine 7, version 7.3.14, supports PHP versions down to 7.2.5. While you may continue using older PHP versions with this CMS, upgrading both the CMS and PHP is advisable.


Closing Thoughts: The Importance of Regular Updates

In an ever-evolving digital landscape, staying current with technology updates is not just a recommendation; it’s a necessity. Regularly updating both your PHP version and CMS offers a myriad of benefits that extend beyond mere compatibility. Here’s why keeping up with updates is crucial for the health and success of your website:

  1. Enhanced Security
    One of the most compelling reasons to update your PHP and CMS is security. With each update, developers address known vulnerabilities, making your website less susceptible to attacks. This proactive approach to security is vital in safeguarding your site’s data and your users’ information.
  2. Improved Performance
    Updates often come with optimizations that boost your website’s performance. Faster load times, more efficient code processing, and better resource management are just a few of the enhancements that updates can bring. This leads to a smoother experience for your users and can positively impact search engine rankings.
  3. Access to New Features and Functionality Each new version of PHP and CMS platforms usually introduces new features and functionality. By updating, you gain access to these innovations, allowing you to leverage the latest trends and tools in web development. This can enhance your website’s capabilities and offer new ways to engage with your audience.
  4. Better Compatibility
    Regular updates ensure continued compatibility with other plugins, extensions, and third-party APIs. This interoperability is essential for maintaining a dynamic and flexible website that can easily adapt new tools and services.
  5. Long-Term Cost Savings
    While updating requires an immediate investment in time and resources, it often leads to long-term cost savings. By preventing security breaches, reducing the need for extensive troubleshooting, and ensuring efficient performance, regular planned updates can help prevent significant unplanned expenses in the future.
  6. Community Support and Resources
    Staying current with updates means you’re in sync with the developer community. This alignment provides access to active support forums, documentation, and resources that are most relevant to the latest versions.
  7. Business Flexibility
    A site that is current and running efficiently is one that can be more easily transferred to other service providers, whether that’s a new web host, a new server, or even a new development team. Since these types of changes are difficult and are sometimes sudden, urgent and unanticipated, it’s beneficial to set yourself up to make them go as smoothly as possible! (And if you do need flexibility, we hope you reach out to Hop Studios… We’re here to help.)

In conclusion, regular updates to your PHP and CMS are not just about keeping up with technology; they’re about minimizing the risk and maximizing the potential of your website. By embracing updates, you are ensuring a secure, efficient, and forward-looking digital presence, and laying a strong foundation for growth and innovation.

If you’re interested in updating your system, or wondering about potential complications with your upgrade, just ask, we’re happy to share some advice!

*When a software product version sunsets, that means it stops getting any updates, security fixes or support. This is usually announced well in advance, sometimes years in advance.


Travis Smith, Abhilekha Nirwan, and Michael Kant also contributed to this article.

Comments

Have a Project for Us?

Request a Proposal