Outdated PHP on WordPress: The Security Risk and How to Move to PHP 8

Ask most business owners which version of PHP their website runs on and you will get a blank look. That is fair enough. PHP is the programming language WordPress is written in, it sits on the server out of sight, and nothing on the page tells you whether it is current or six years old. This autumn it stopped being something you could safely ignore.

WordPress theme PHP code displayed on a monitor
PHP is the language WordPress, its plugins and its themes are written in.

In October, two critical flaws in PHP itself were being used to attack websites within a day of becoming public. In November a second batch of critical fixes followed. Both times the official releases went only to the newer versions of PHP, and close to a third of WordPress sites are not running one of those. This article explains what happened, why so many sites are stuck on old PHP, what PHP 8 gives you in return for the effort, and how we can help you get there.

What PHP is and why the version matters

Every time someone opens a page on a WordPress site, PHP runs the code for WordPress, your theme and each of your plugins, then sends the finished page to the visitor. If WordPress is the engine of your website, PHP is the fuel system. You never see it, but nothing moves without it.

Like any software, PHP has bugs and some of them are security holes. The PHP project fixes them, but only for a limited time. Each version gets two years of full support, followed by two more years in which only critical security problems are fixed. After four years it reaches end of life and the project stops working on it. The official supported versions page is blunt about what that means: anyone still on an end-of-life release should upgrade as soon as possible, because they may be exposed to security holes that will never be patched.

Here is where each version stands at the end of November 2026:

  • PHP 7.4 and older: end of life. PHP 7.4 lost support on 28 November 2022, four years ago this week.
  • PHP 8.0: end of life since November 2023.
  • PHP 8.1: end of life since 31 December 2025.
  • PHP 8.2: security fixes only, and those stop on 31 December 2026.
  • PHP 8.3: security fixes only, until the end of 2027.
  • PHP 8.4 and 8.5: fully supported, with security fixes running to the end of 2028 and 2029.
  • PHP 8.6: released on 19 November 2026 and supported until the end of 2030.

How many WordPress sites run unsupported PHP?

Far more than you might expect. Developer Adam Greenough published a detailed analysis of the WordPress.org figures on 28 November, titled The Elephant in the Server Room. It found that about 31% of WordPress sites are on a PHP version that is already past official support. PHP 7.4 alone still runs almost 14% of sites, four years after it was retired.

Bar chart of PHP versions used by WordPress sites in November 2026, showing about 31% on end-of-life versions
Almost a third of WordPress sites run a PHP version that no longer receives official fixes. PHP 8.2 joins them on 31 December 2026.

The picture gets worse in a few weeks. PHP 8.2 runs another 22% of sites and its support ends on New Year’s Eve. If nobody upgraded between now and then, around 53% of WordPress sites would start 2027 on a version of PHP that the people who make PHP no longer fix.

To be fair to the WordPress community, this is the lowest the figure has been in years. It peaked at about 87% in December 2022, just after PHP 7.4 was retired. Sites are moving, but slowly, and the ones left behind tend to be the ones nobody is actively looking after.

The October and November PHP vulnerabilities

PHP2Shell

On 20 October 2026, details of two critical PHP vulnerabilities leaked on social media two days ahead of their planned disclosure. They were given the name PHP2Shell and are tracked as CVE-2026-109618 and CVE-2026-109619. Both allow remote code execution, which means an attacker with no login and no account can run their own code on the server. Both carry a severity score of 9.2 out of 10.

The PHP security team responded with an emergency release the next day. Security firm watchTowr, which runs a network of decoy servers, recorded attacks in the wild on that same day, and its PHP2Shell FAQ confirms that older, unsupported branches are affected too. By 26 October the US cyber security agency CISA had added both flaws to its catalogue of vulnerabilities known to be exploited. Wordfence reported that it had blocked more than 74,000 attempts against WordPress sites by 22 October.

What made this one different from the usual WordPress scare is where the flaw lives. It is not in a plugin you can delete or a theme you can swap. It is in PHP, so every website on an affected server was in scope whether it ran WordPress, a shop or a ten-year-old contact form.

The November release

Four weeks later, on 19 November, PHP published another security release. It fixed 18 vulnerabilities, seven of them rated critical. The PHP team says the critical ones need a non-default configuration or an uncommon setup to exploit, so this was less of an emergency than PHP2Shell. One of them, a flaw in the way PHP-FPM handles requests, could still let an attacker run code with a single request on servers configured in a particular way.

Did end-of-life PHP get the fix?

This is the part that matters if your site is on old PHP, and the answer is slightly different for each incident.

PHP version October (PHP2Shell) November release
8.2 to 8.5 Official fixed release (8.2.35, 8.3.36, 8.4.27, 8.5.12) Official fixed release (8.2.36, 8.3.37, 8.4.28, 8.5.13)
7.4, 8.0 and 8.1 No release. Source code patches only Nothing from the PHP project
7.3 and older Nothing from the PHP project Nothing from the PHP project
What the PHP project published for each version in the two security releases of autumn 2026.

For PHP2Shell, the PHP project made a rare exception. It did not issue new versions of PHP 7.4, 8.0 or 8.1, but it did publish a minimal patch to the source code for each of them. That is not something a website owner can install. Somebody, usually your hosting company or the maker of the server’s operating system, has to take that patch, build PHP from it and roll it out.

For the November release there was no exception. Supported versions got their updates and everything older got nothing at all.

Close-up of server cooling fans in a data centre
Whether an old PHP version gets a security fix now depends on your host, not on the PHP project.

Some sites on old PHP were protected anyway. After PHP2Shell, Ubuntu, Red Hat, AlmaLinux and CloudLinux, along with control panels such as cPanel and Plesk, shipped their own patched builds of older versions, and so did some hosts. Others did not, and the same cover cannot be assumed for the November fixes. The difficulty is that you cannot tell from the outside. A patched copy of PHP 7.4 reports exactly the same version number as an unpatched one, so the only way to know is to ask your host directly which versions they patch, where the fixes come from and for how long they will keep doing it.

That is the real change this autumn. On supported PHP, a security fix is something you can count on. On end-of-life PHP it depends on the goodwill of your host, and you will not know whether you got it.

Website attacks are getting faster

It would be easy to say cyber attacks are rising everywhere, but the UK figures are more level than the headlines suggest. The government’s Cyber Security Breaches Survey 2025/2026 found that 43% of UK businesses identified a breach or attack in the previous twelve months, around 612,000 businesses. That is the same as the year before and down from 50% two years ago. High, but steady.

What has changed is the number of weaknesses to attack and the speed at which they are used. Patchstack’s State of WordPress Security in 2026 report counted 11,334 new vulnerabilities in WordPress plugins, themes and core during 2025, up 42% on the previous year, with 91% of them in plugins. For the most heavily targeted flaws, mass attacks began a median of five hours after the details became public.

This year has supplied plenty of examples:

  • WordPress core, July and September. Two security releases, 7.0.2 and 7.1.2, fixed flaws that let attackers run code on a site without logging in. Both were being exploited and both were added to the CISA catalogue within days.
  • Elementor Pro, August. A file upload flaw in the page builder’s forms was patched on 19 August. Attacks began the same day, and Wordfence had blocked more than 190,000 attempts by early September.
  • All-in-One WP Migration, August. A fix for a serious database flaw was released on 20 August. Two weeks later only about a third of sites had installed it, leaving more than three million exposed.
  • Forminator, August. A critical flaw in the forms plugin allowed anyone to upload files to around 300,000 sites.
  • WP Connect, November. Six plugins from one developer had backdoors added after the developer’s account was apparently compromised. The WordPress plugins team caught the malicious versions before they were released.

The big names have suffered too. Marks & Spencer, Co-op and Jaguar Land Rover all lost weeks of trading to attacks in 2025, which we covered in our post on UK cyber attacks and the lessons for small businesses. For the plugin side of the story, see why WordPress websites get hacked.

Almost all of these attacks are automated. Software scans the internet for anything running a known weak version and breaks into whatever it finds. A server announcing that it runs PHP 7.4 is exactly the sort of thing those scans look for.

Why some sites cannot simply switch to PHP 8

Changing the PHP version is usually one setting in your hosting control panel. So why are so many sites still on 7.4? Because for a lot of them, flicking that switch produces a white screen, a page of warnings or a checkout that quietly stops working. PHP 8 is stricter than PHP 7, and code that got away with sloppy habits for years no longer does. These are the causes we see most often.

Functions that no longer exist

PHP 8.0 removed a number of old features outright, including create_function(), each() and the curly brace way of reading a character from a string. The even older mysql_ database functions went in PHP 7. A plugin or theme that still calls any of them stops dead with a fatal error, and the whole site goes down with it.

Warnings that became errors

PHP 7 was forgiving. Hand a built-in function the wrong kind of data and it would grumble in a log file and carry on. PHP 8 throws an error and stops. Counting something that is not a list, doing arithmetic on an array or calling a method in a way the code was never designed for were all survivable before. On PHP 8 they are not.

A flood of deprecation notices

PHP 8.1 and 8.2 began warning about patterns that old WordPress code is full of, such as passing an empty value to a text function or creating properties on an object without declaring them first. These do not crash the site, but on a badly configured server they print across the top of your pages, and they can corrupt the background responses that forms, page builders and checkouts depend on.

Abandoned plugins

A plugin last updated in 2019 was written before PHP 8 existed. If the author has moved on, nobody is going to fix it. Often it does one small job and has been forgotten about, right up until it is the one thing preventing an upgrade.

Premium plugins with lapsed licences

The developer may well have released a PHP 8 compatible version years ago. If the licence expired, or the plugin came bundled with a theme and was never registered, your site never received it. Some premium plugins are also supplied in an encoded form that is tied to particular PHP versions and will not run on a newer one until the vendor provides a new build.

Bespoke and heavily edited themes

A theme built for you by an agency or freelancer eight years ago has had no updates since the day it was delivered. The same goes for an off-the-shelf theme that was edited directly, without a child theme, so that updating it would wipe out the changes. In both cases the code has been frozen in time while PHP moved on.

Nobody wants to be the one who breaks it

This is the most common reason of all. The site works, the person who built it has gone, and there is no test copy to try the upgrade on. So the setting is left alone for another year.

The pressure from the other direction

Staying put is becoming harder as well. WordPress will not install a plugin update that needs a newer PHP than your server has, and plugin authors are starting to move. Contact Form 7, which is on more than ten million sites, raised its minimum to PHP 8.3 with version 6.2 in October. WooCommerce 11.6, due in February 2027, will require PHP 8.1. A site held on old PHP by one outdated plugin stops receiving updates for its other plugins, including their security fixes. Old PHP ends up locking you into old everything.

What you gain from PHP 8

Security support is the main reason to move, but it is not the only one.

  • Speed. In Kinsta’s benchmarks, a standard WordPress 6.8 site handled about 7% more requests per second on PHP 8.5 than on 7.4. For WooCommerce the gap was much larger, at roughly 23% on PHP 8.2. Faster pages help your visitors and your Core Web Vitals.
  • The same server does more. Each request uses less processing time, so your hosting copes better with busy periods. If you have been told you need a bigger hosting plan, an upgrade to PHP 8 is worth trying first.
  • Problems surface early. The strictness that breaks old code is a benefit once the code is fixed. Mistakes that PHP 7 hid now show up in testing and not in front of customers.
  • Better tools for developers. PHP 8 added named arguments, union types, enums, read-only properties and the match expression, along with a just-in-time compiler. You will not notice any of these directly, though for an ordinary WordPress site the compiler makes little difference. What you will notice is that modern plugins are built on them.
  • Updates keep arriving. On a supported version of PHP you can install the latest release of every plugin, which is where most WordPress security fixes are delivered.
Bar chart comparing WooCommerce requests per second on PHP 7.4, 8.2, 8.3 and 8.4
In Kinsta benchmarks the same WooCommerce page handled about 23% more requests per second on PHP 8.2 than on PHP 7.4.

How to check which version you are on

Log in to WordPress and go to Tools, then Site Health, then the Info tab, and open the Server section. The PHP version is listed there. Your hosting control panel will show it as well.

If it says 8.3 or higher, you are in good shape. If it says 8.2, plan a move before the end of December. If it says 8.1 or anything lower, your site is relying on your host for security fixes that the PHP project no longer provides, and it is worth asking them in writing what they patch.

How we can help: a PHP 8 compatibility upgrade for £250

Laptop on a table showing website code in an editor
Most PHP 8 problems come down to a handful of old plugins or a few lines in a theme.

If your site is stuck on old PHP because something breaks when you switch, we can fix that. For £250 we will upgrade your plugins and theme so that they are compatible with PHP 8 and your site can move to a supported version.

The work normally looks like this:

  1. We take a full backup and make a private copy of your site, so that nothing is tested on the live version.
  2. We switch the copy to PHP 8 and go through every plugin and the theme to find what fails and what throws warnings.
  3. We update what can be updated, replace abandoned plugins with maintained alternatives that do the same job, and correct the code in your theme and any custom plugins.
  4. We test the pages that matter to your business, including forms, checkout, login and search.
  5. We move the live site to PHP 8 and check it again.

You do not need to know what is wrong before you get in touch. If your host has warned you about an end-of-life PHP version, if you tried to upgrade and had to switch back, or if you simply have no idea what your site is running, that is enough to start with. If we find that a site needs more than a compatibility upgrade, for example a theme that has to be rebuilt from scratch, we will tell you before any work begins.

Contact us with your website address and we will take a look. If your hosting is the thing holding you back, our guide to WordPress hosting for small businesses explains what to look for, and it is worth making sure your WordPress backups are working before anyone changes anything. Every site we build is hosted with weekly backups and plugin and theme updates included, as set out on our pricing page.

Photos by Ilya Pavlov, Winston Chen and James Harrison on Unsplash.

Scroll to Top