Blog

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

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, 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.

“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

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.

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

Check out the list below for 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.3 - Dec 2020 - End of development
PHP 7.3 - Dec 2021 - End of life

PHP 7.4 - Nov 2021 - End of development
PHP 7.4 - Nov 2022 - 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 2

Minimum PHP: 5.4
Recommended PHP: 7.4

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, but Craft 2 itself won’t be a problem all the through 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
Recommended PHP: 7.4

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.

 

ExpressionEngine 1 & 2

Minimum PHP: 5.3.10
Recommended PHP: None. Please upgrade. (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, remove one “please” from the above paragraph.

 

ExpressionEngine 3

Minimum PHP: 5.3.10
Recommended 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

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.

 

ExpressionEngine 6

Minimum PHP: 5.6
Recommended PHP: 7.4

While 6 isn’t formally out yet—the beta was released in November 2020—it will support PHP 7.4 from day one, though it’s hard to imagine someone having to install EE 6 on a server running PHP 5.6. Many add-ons no longer support PHP 5. As of ExpressionEngine 6, you will be able to upgrade directly from ExpressionEngine 2 to the current version. Try it, maybe it’ll work!  Looking to the future, PHP 8.0.0 looks like it will be released in late Nov 2020. 

Closing Thoughts

So there you have it! Updating PHP isn’t necessarily a painful process, as long as it’s done carefully and with respect for the software running on top of it. 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.

Comments

Have a Project for Us?

Get in Touch