WordPress still calls PHP 8.1 secure. PHP stopped fixing it in 2025
PHP 8.2 loses security fixes on December 31, 2026, leaving 53% of WordPress sites on end-of-life PHP. How to check your version, and what Site Health misses.
By Meet ModiAsk WordPress.org whether PHP 8.1.34 is secure and it says yes, in JSON: "is_secure": true. The PHP project stopped fixing 8.1 on December 31, 2025. In October it fixed two remote code execution bugs in every branch from 8.2 up, and 8.1 got a source patch you have to build yourself. The yes comes from one line in a config file on wordpress.org, last changed in July 2025, when it was still true.
So which PHP version should a WordPress site run? 8.3 at the least, 8.4 if your plugins allow it. WordPress recommends 8.3, PHP 8.3 gets security fixes until December 31, 2027, and PHP 8.2, which 22.1% of WordPress sites run, gets its last one on December 31, 2026. If nobody moves, 53.2% of WordPress sites will be on a PHP branch the PHP project no longer fixes on January 1. Here is how to check yours, and why the check WordPress gives you will not say any of this.
PHP 8.2 end of life: what happens on December 31
PHP branches get two years of bug fixes, then two years of security fixes only, then nothing. The supported versions page on php.net says a branch past that point "is no longer supported. Users of this release should upgrade as soon as possible, as they may be exposed to unpatched security vulnerabilities." The dates, as php.net lists them:
- PHP 8.2: released December 8, 2022. Security fixes until December 31, 2026.
- PHP 8.3: released November 23, 2023. Security fixes until December 31, 2027.
- PHP 8.4: released November 21, 2024. Bug fixes until December 31, 2026, security fixes until December 31, 2028.
- PHP 8.5: released November 20, 2025. Security fixes until December 31, 2029.
- PHP 8.6: released November 19, 2026. Security fixes until December 31, 2030.
- PHP 8.1 and older: no longer on the page. The last 8.1 release, 8.1.34, came out on December 18, 2025.
The last few months show what being on an unsupported branch costs, and they are why this deadline matters more than most.
- Dec 31, 2025PHP 8.1 reaches end of life.
- Oct 19, 2026Ubuntu's php8.5 changelog gets an entry with the fixes for CVE-2026-109618 and CVE-2026-109619, two days before the public advisory. php.net says distributions got the patches in advance.
- Oct 21, 2026php.net publishes a security advisory: two critical bugs that "can allow unauthenticated remote code execution", fixed in 8.5.12, 8.4.27, 8.3.36 and 8.2.35. For 8.1 and older, "minimal source-backports" on GitHub, and nothing packaged.
- Nov 19, 2026PHP 8.6.0 ships, alongside security releases 8.2.36, 8.3.37, 8.4.28 and 8.5.13. No backports for older branches this time.
- Dec 31, 2026PHP 8.2 reaches end of life.
- Feb 2027WooCommerce 11.6 is planned to require PHP 8.1 or newer.
The October advisory is worth reading in full if you run PHP anywhere. It says the risk is highest for mod_php, "with a demonstrated exploit where an unauthenticated request can trigger the attack before any application code runs." Before any application code runs means your WordPress security plugin never gets a look. The advisory on php.net also lists stopgaps for anyone who cannot update, and is blunt that they "do not make an installation safe." The next bug like that, after December 31, gets no packaged fix for 8.2 from php.net. Whether it gets a source patch the way 8.1 did in October is up to the PHP security team, case by case.
What PHP version WordPress sites actually run
WordPress.org publishes the share of sites per PHP branch as plain JSON. I read it on November 29 and added the branches up. The idea and most of the surrounding numbers come from Adam Greenough's write-up, which was on the Hacker News front page this weekend. My totals are a day later than his and within a tenth of a point:
$ curl -s https://api.wordpress.org/stats/php/1.0/
{"4.4":0.008,"5.1":0.002,"5.2":0.121,"5.3":0.245,"5.4":0.161,"5.5":0.141,
"5.6":1.228,"7.0":0.525,"7.1":0.312,"7.2":1.24,"7.3":1.231,"7.4":13.9,
"8.0":3.217,"8.1":8.791,"8.2":22.08,"8.3":28.315,"8.4":11.291,"8.5":7.071,
"8.6":0.119}
# summed by branch
<=8.1 (past end of life today): 31.122
<=8.2 (past end of life on Jan 1): 53.202
<=7.4: 19.114
<7.4 (below WordPress 7.0 minimum): 5.214Two of those lines are odd. 13.9% of sites are on PHP 7.4, which the PHP project stopped fixing in November 2022. And 5.2% are below 7.4, the minimum since WordPress 7.0, which means they are on an older WordPress too. WordPress raised the minimum to 7.4 using the rule it has used for years: drop a branch once fewer than 5% of sites run it.
How to check your WordPress PHP version
In the dashboard: Tools, then Site Health, then the Info tab, then Server. The PHP version line there is the PHP_VERSION constant of the PHP running your site, with the patch number. That number is what you want. The Status tab will also give you a verdict, which is the part I would not trust, for reasons in the next section.
On the server, php -v answers the same question for the command-line PHP. That is not always the PHP serving your site. A host that offers several versions can run the web pool on one and the shell on another, so trust the Site Health number over the shell when they disagree.
How to check the PHP version of a website you don't run
Sometimes the response headers tell you. PHP adds an X-Powered-By header when expose_php is on. I started PHP's built-in server on this machine and asked it:
$ php -S 127.0.0.1:8099 -t www &
$ curl -sI http://127.0.0.1:8099/
HTTP/1.1 200 OK
Host: 127.0.0.1:8099
Connection: close
X-Powered-By: PHP/8.5.4
Content-type: text/html; charset=UTF-8
$ grep -n '^expose_php' /etc/php/8.5/*/php.ini
/etc/php/8.5/cgi/php.ini:395:expose_php = Off
/etc/php/8.5/cli/php.ini:395:expose_php = On
/etc/php/8.5/fpm/php.ini:395:expose_php = OffThe built-in server uses the CLI config, where Ubuntu leaves it on. The FPM config, which is what serves a real WordPress site on this setup, has it off. So a missing header tells you nothing, and as the next part shows, a present one tells you less than it looks like.
Why Site Health says PHP 8.1 is fine
WordPress does not decide this on your server. wp_check_php_version() in core sends PHP_VERSION to an API on wordpress.org called Serve Happy, caches the answer for a week, and Site Health turns the answer into a label. The API is public, so I asked it about every branch:
$ for v in 7.4.33 8.0.30 8.1.34 8.2.36 8.3.37 8.5.0 8.5.4; do
printf "%-7s " $v
curl -s "https://api.wordpress.org/core/serve-happy/1.0/?php_version=$v"
echo
done
7.4.33 {"recommended_version":"8.3","minimum_version":"7.4","is_supported":false,"is_secure":false,"is_acceptable":false}
8.0.30 {"recommended_version":"8.3","minimum_version":"7.4","is_supported":false,"is_secure":false,"is_acceptable":false}
8.1.34 {"recommended_version":"8.3","minimum_version":"7.4","is_supported":false,"is_secure":true,"is_acceptable":true}
8.2.36 {"recommended_version":"8.3","minimum_version":"7.4","is_supported":false,"is_secure":true,"is_acceptable":true}
8.3.37 {"recommended_version":"8.3","minimum_version":"7.4","is_supported":true,"is_secure":true,"is_acceptable":true}
8.5.0 {"recommended_version":"8.3","minimum_version":"7.4","is_supported":true,"is_secure":true,"is_acceptable":true}
8.5.4 {"recommended_version":"8.3","minimum_version":"7.4","is_supported":true,"is_secure":true,"is_acceptable":true}The API's code is in the wordpress.org repository, and the answer is less clever than I expected. Each flag is one version_compare() against a constant, and the constants live in a config file with five of them:
// The lowest branch of PHP which is actively supported.
define( 'SUPPORTED_PHP', '8.3' );
// The lowest branch of PHP which is receiving security updates.
define( 'SECURE_PHP', '8.1' );
// The lowest branch of PHP which is still considered acceptable in WordPress.
// Sites with a version lower than this will see the ServeHappy dashboard widget urging them to update.
define( 'ACCEPTABLE_PHP', '8.1' );The comment is right and the value is stale. SECURE_PHP went from 7.4 to 8.1 in a commit on July 8, 2025, when 8.1 really was getting security fixes. The file changed once more, in May 2026, to raise the minimum to 7.4, and SECURE_PHP stayed at 8.1. On November 29 the live API still agrees with the file.
Here is what that does on a site running 8.1.34. Site Health's PHP test in class-wp-site-health.php walks down the flags in order. Not 8.3 or newer, not "supported", but "secure", so it stops at: "Your site is running on an older version of PHP (8.1.34), which should be updated", filed as recommended. A site on 8.0.30 gets "does not receive security updates", filed as critical, with a Security badge. And because ACCEPTABLE_PHP is 8.1, the dashboard widget that nags admins to update never shows for 8.1 either. About 8.8% of WordPress sites run 8.1 and see the mild version.
I have written before about a status message that blamed the network for a decision the server made. Same shape here: the label is a guess dressed up as a fact, and the person reading it has no way to tell. If nobody edits the file by January 1, 8.2 sites will get the same "should be updated" while being in exactly the position 8.1 sites are in now.
Does the PHP version number tell you if you're patched?
Only if your PHP came from php.net. The check above throws away everything except the branch, so 8.5.0, which is missing every fix since November 2025 including October's remote code execution pair, gets the same green answer as anything else on 8.5. The reverse happens with distribution packages. The PHP on this machine is Ubuntu 26.04's:
$ php -v | head -1
PHP 8.5.4 (cli) (built: Nov 19 2026 00:22:49) (NTS)
$ dpkg -l php8.5-cli | tail -1
ii php8.5-cli 8.5.4-0ubuntu1.6 amd64 command-line interpreter for the PHP scripting language
$ zcat /usr/share/doc/php8.5-cli/changelog.Debian.gz | grep -E '^php8.5 \(|^ -- ' | head -6
php8.5 (8.5.4-0ubuntu1.6) resolute-security; urgency=medium
-- Bruce Cable <bruce.cable@canonical.com> Thu, 19 Nov 2026 11:22:49 +1100
php8.5 (8.5.4-0ubuntu1.5) resolute-security; urgency=medium
-- Marc Deslauriers <marc.deslauriers@ubuntu.com> Mon, 19 Oct 2026 10:35:18 -0400
php8.5 (8.5.4-0ubuntu1.4) resolute-security; urgency=medium
-- Isabel Garcia Contreras <isabel.garcia@canonical.com> Wed, 13 Oct 2026 15:05:38 -0400
$ zcat /usr/share/doc/php8.5-cli/changelog.Debian.gz \
| awk '/^php8.5 \(8.5.4-0ubuntu1.6\)/,/^ -- /' \
| grep -oE 'CVE-[0-9]+-[0-9]+' | sort -u | wc -l
17Upstream 8.5 is at 8.5.13. Going by the version string, this PHP is nine releases behind. Going by the changelog, the October entry carries the patches for CVE-2026-109618 and CVE-2026-109619, and the November 19 entry patches 17 more CVEs, dated the same day php.net shipped its batch. A scanner that reads X-Powered-By: PHP/8.5.4 flags this server, and it is wrong. The same scanner reading PHP/8.5.13 off a server someone compiled once and forgot would wave it through. The version number is a hint about where to look, not an answer.
How to update the PHP version in WordPress before January
- Read the exact version in Site Health, Info, Server. Ignore the Status tab's tone. If the branch is 8.2 or older, you have a deadline, whatever the label says.
- Check what your plugins and theme need before you switch. Contact Form 7 6.2 already requires PHP 8.3, so on 8.2 you are stuck on the old release. WooCommerce 11.6 will require 8.1 from February 2027.
- Switch on a staging copy first. Most managed hosts and cPanel's MultiPHP Manager let you pick the version per site. Turn on WP_DEBUG_LOG and load the pages that make money: checkout, forms, login.
- If your PHP comes from a distribution, judge it by the package changelog, not the version: zcat the changelog.Debian.gz on Debian and Ubuntu, rpm -q --changelog on Red Hat and its relatives.
- If you are staying on 8.2 into 2027 on purpose, know who is patching it. Per Greenough's survey, Debian 12 and Red Hat will patch 8.2 until 2028 and 2029, Ondřej Surý's repository backports to older branches, and TuxCare sells extended support. A host that compiles its own PHP and stops at 8.2.36 is none of those.
The plugin side is where I expected the trouble to be, so I counted. WordPress.org's plugin API lists each plugin's declared minimum PHP. Here are the 1,000 most popular:
$ curl -s -g "https://api.wordpress.org/plugins/info/1.2/?action=query_plugins&request[browse]=popular&request[per_page]=250&request[page]=1"
... pages 1 to 4, tallied by requires_php
plugins: 1000
none 155
<7.0 198
7.0-7.3 160
7.4 428
8.0 26
8.1 15
8.2 12
8.3 6
7.4 or older or none: 941 (94.1%)Greenough's count from the day before was 429 and 25 in two of those rows, so the list moves a little day to day. Either way, 94% of the plugins people install most will still let themselves be activated on PHP 7.4. A low minimum does not mean the plugin is tested there. It means nothing stops you.
The catch: what I could not check
I did not run WordPress here. The Site Health wording above is read from core's source and matched to the API's live answers, not taken from a screenshot of a running admin panel. The logic is short enough that I am confident in it, but it is a reading, not a run.
I cannot tell you whether SECURE_PHP is stale by accident or on purpose. Nothing I found explains it, and there is a fair argument for leaving it: some 8.1 sites are on distributions or hosts that still patch it, and Ubuntu 22.04 fixes 8.1 according to Greenough's survey. If that is the reason, the API is answering "is this probably patched by someone" while the comment says "is PHP still fixing this", and Site Health has no way to know which one your server is.
The stats only count sites that check in with wordpress.org, and they do not say how many sites on old branches are on a patched distribution build. So "53% on end-of-life PHP" means 53% on branches php.net no longer fixes. How many of those are actually unpatched, nobody has a number for. Not WordPress, not Greenough, not me.
And upgrading has a real cost. A PHP major version removes things, and old plugins are where those removals land. If you run one site with five plugins, this is an afternoon. If you run fifty client sites on 7.4 with a page builder from 2019, it is a project, and that is probably the real reason 53% of WordPress sites are where they are.
When is PHP 8.2 end of life?
PHP 8.2 reaches end of life on December 31, 2026. Until then it gets security fixes only, the last so far being 8.2.36 on November 19, 2026. After that date php.net publishes no more 8.2 releases, so a new vulnerability stays open unless your Linux distribution or a paid vendor backports the fix.
What PHP version should I use for WordPress?
Use PHP 8.3 or newer for WordPress. WordPress recommends 8.3, and PHP 8.3 gets security fixes until December 31, 2027. PHP 8.4 runs to December 31, 2028, and WordPress 6.8 and later support it, so pick 8.4 if your plugins and theme work on it. Test on a staging copy first.
How do I check my WordPress PHP version?
Go to Tools, then Site Health, then the Info tab, and open the Server section. The PHP version line shows the exact version your site runs, patch number included. On the server, php -v shows the command-line PHP, which can differ from the one serving the site, so trust the Site Health number if the two disagree.
Is PHP 8.1 still supported?
No, PHP 8.1 has been out of support since December 31, 2025, and 8.1.34 was its last release. In October 2026 the PHP team published a source-only patch for two critical bugs on 8.1, but no new release. Some distributions, such as Ubuntu 22.04, still ship patched 8.1 packages.
Why does WordPress Site Health say my old PHP version is secure?
Site Health asks a wordpress.org API, which compares your PHP branch to a fixed cut-off. That cut-off is still 8.1, set in July 2025, so any 8.1 or 8.2 version counts as secure. The check also ignores the patch number, so it cannot tell a patched server from an unpatched one.
What happens if my WordPress site runs an unsupported PHP version?
The site keeps working, which is why so many stay put. What stops is security fixes from php.net, so the next critical PHP bug may never get a packaged fix for your branch. Plugins also start refusing to update: Contact Form 7 6.2 already needs PHP 8.3, and WooCommerce 11.6 will need 8.1.
- Supported Versions, PHP
- Security advisory: Critical remote code execution vulnerabilities, update now, PHP
- PHP 8.6 release announcement, PHP
- PHP version statistics API, WordPress.org
- servehappy-config.php, WordPress.org on GitHub
- Bump servehappy versions (commit 569a3c0), WordPress.org on GitHub
- class-wp-site-health.php, WordPress on GitHub
- Dropping support for PHP 7.2 and 7.3, Make WordPress Core
- PHP support clarification, Make WordPress Core
- WooCommerce PHP 8.1 requirement, WooCommerce
- php8.5 package changelog, Ubuntu
- The Elephant in the Server Room: Over Half of WordPress Sites Run PHP That's End of Life by January, Adam Greenough
More Posts
Next.js 16.5 compiles 4.2x faster. This blog got 1.35x
Next.js 16.5 on a 92-page static site with 2 cores: cold Turbopack compile went from 7.0 s to 5.2 s with 21% less memory. Not 4x. Warm builds didn't move.
I made a post-quantum SSH key. GitHub never answered it
A post-quantum SSH key is one ssh-keygen command in OpenSSH 10.6. GitHub, GitLab, Bitbucket, Codeberg and sourcehut can't use it, and GitHub just hangs.
I painted over a 4-digit code and read it back from the pixels outside the box
Can you unredact an image? From lossy WebP, yes: I got a hidden 4-digit code back from pixels 96 px outside the box. JPEG with a 16 px margin leaked nothing.