PHP 7.4 is dead — long live PHP 8
The facts are these: On November 28, 2022, all support for PHP 7.4 ends. No more updates. No more security patches. Nada. Nothing. Rien.
PHP is the programming language that actually runs WordPress websites. As well as many other things online.
But many, if not most, WordPress website owners have barely heard of PHP. Because it’s not something most of them ever interact with. It’s just there.
PHP comes installed with a hosting a account. The only reason for a website owner to get hands-on with PHP is if they’re creating custom functions and coding for their website.
Most website owners prefer to rely on plugins and themes for that and so never even see the PHP code.
What is PHP 7.x anyway?
PHP 7 was released in 2015 and was a major upgrade from the previous PHP 5. On top of bringing extensively rewritten code, it was also 100% faster. Which matters for a website.
In November 2020, the next version, PHP 8, was released. It’s again a very major update with many significant changes from PHP 7 to increase speed and also security.
As a result, many websites will break if we were to just switch them to PHP 8. Which is one reason the move to PHP 8 has been rather slow. Especially since PHP 7 has still been supported.
All that is changing now.
Because PHP 7 is now officially coming to the end of its life. After November 28, 2022, there will be no more updates or patches for it. Moving becomes much more urgent.
Finding out which version of PHP your website runs
Log in to your website. In the WordPress dashboard, in the left sidebar, under Tools, click on Site Health. Next, select Info and expand the Server section.
The PHP version your site runs on will display.
If it’s 8.x (some version of PHP 8), congratulations. You are up-to-date and can stop reading.
Everyone else, please keep reading. The fact that PHP 7.4 soon becomes outdated, also means that all older versions are really outdated. Read on. An update is in your future.
What does the end of PHP 7.4 mean for my website right now?
First off, websites running PHP 7.4 won’t stop working when November 29, 2022, rolls around.
There just won’t ever be any new features added. A person might be able to live with that. Until they want to install a theme or plugin that requires newer features included in newer versions of PHP.
Eventually WordPress itself will require PHP 8.
You could say the good news is, nothing has to be done this very minute. Your website isn’t on the verge of blowing up.
The “bad news” is that you will have to do something. Soon.
It’s a really bad plan to rely on outdated software for anything. Including websites. The bad guys will find security flaws and be able to exploit them at their leisure. So it is definitely time to plan for how to get your website to PHP 8.
Your hosting company and PHP 8
Your hosting provider decides what versions of PHP they offer. You may have to request them to turn on PHP 8. If for some reason they can’t/won’t do that, I’d look for another hosting company.
Likewise if a hosting company claims that it’s perfectly okay to keep using an old version of PHP, because they’ve “hardened” it, you should seriously consider moving to hosting that supports current versions of the software.
Proceed with caution — PHP 8 breaks things
Since PHP 8 is known to break things because of the many changes in it from PHP 7, upgrading is not as easy as just throwing a switch.
A website built in the last couple of years might do okay. Anything older is likely to have something break.
Since just throwing the switch to turn PHP 8 on for a live website is a bad idea, unless you really want to crash the site, I recommend first trying on an exact copy of the website. You can do that in 2 ways:
A staging server is simply another web hosting account that is separate from your live website. They’re an essential part of web development because they allow us to build an entire website and test it. When the website is finished, it’s a quick process to deploy it on the live URL.
The staging server should run the same configuration as your live server, except that it will have PHP 8 available.
Make a full backup of your live website and install it on the staging server.
If your website is truly ready for PHP 8, it will work fine on the staging server.
If it’s not ready, you will see error messages. Or your website may not display at all or with parts of the pages missing.
It is also possible that your website initially displays fine and only once you test the full functionality of it do problems start to pop up.
In other words, this is not a quickie thing, but rather something you will want to spend some time on, to ensure that the website is indeed working as it should in PHP 8.
Once the website is fixed and ready for PHP 8, you can either apply those same fixes to the live site or migrate the upgraded site from the staging server to the live URL.
Local server on your computer
You may not have access to a staging server online. In that case, use a tool like Local (https://localwp.com) to install a web server on your computer. Configure Local to run PHP 8 and install the backup of your website.
Again, the site may be ready for PHP 8 and work fine.
Or you may get some error messages, or broken site features.
Please note that Local’s environment won’t be an exact match for your online server. But close. Therefore it’s possible that some incompatibility with PHP 8 might not show up while testing the site in Local. So you’d still have to be careful when flipping the switch on the live server.
Again, spend the time to test the entire site and its functionality until you’re satisfied it works properly with PHP 8. Only then apply the fixes to the live site.
What if my website fails the test?
Error messages mean that there are things on your current website that won’t work with PHP 8. All those items must be fixed for it to work.
For a relatively new website (one built in the last 5 years) it would generally be worth spending the effort to fix any issues. There likely won’t be many errors and the ones that are there should be pretty easy to fix. But you might still need to get some expert help if you don’t know anything about coding and PHP.
For an older website (more than 5 years old), seeing a bunch of errors and warnings might be just the push you need to consider a full website rebuild using the current best practices. Especially as the way we build WordPress websites has fundamentally changed in the last 5 years.
For more about those changes and current best practices, read my article Future-Proofing WordPress: 2 Key Components.
WordPress requires the programming language PHP to run. PHP 7.4 is at end-of-life status with no future updates or patches. For that reason it’s important for every WordPress website to update to run on PHP 8.
That transition can be complicated as PHP 8 changes a lot of things from PHP 7.4. For that reason careful testing away from the live website will be needed. So that any issues can be fixed before turning on PHP 8 on the live site.
Older sites may require rebuilding in order to move to PHP 8. Given how best practices for building WordPress websites have changed in the last few years a rebuilt and redesigned website will not only give you PHP 8 compatibility, but also a website that takes advantage of the latest WordPress features.
Whatever you do, don’t just ignore this issue. Doing so won’t end well. For you or your website.
If you need help or another set of eyes in the PHP 8 updating process, let’s talk. You can schedule a free consultation here.
Never miss out!
Get an email update every time I publish new content. Be the first to know!