
Photo by Patricia Jekki on Unsplash
(updated Jan 19, 2022)
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.
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 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.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
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.
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: 5.6
Recommended PHP: 7.4
Expression Engine 6 was officially released on December 17, 2020 and supports PHP versions from 5.6 all the way up to the latest 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 PHP5 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. Not to worry though, PHP 7.4 is still under active development and will continue to receive security updates all the way through to the end of 2022.
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