单一来源
当前只有一个可用来源,尚未完成多源交叉核验服务器室里的隐患:超50%的WordPress网站运行已停止支持的PHP
Over half of all self-hosted WordPress sites are running a version of PHP that will be out of official support by January. About a third are already on versions the PHP project has stopped fixing,1 and PHP 8.2, the second most popular version, joins them when its support ends on 31 December.2 It has been a lot worse, though, as just after PHP 7.4 reached end of life in 2022 the figure was closer to nine in ten.3
The best public figures are WordPress.org's own, so I've gone through them back to 2015, along with how hosts and Linux distributions handled October's PHP2Shell bugs on old versions and which PHP versions the 1,000 most popular plugins now ask for.
Which PHP versions are WordPress sites running?
PHP 8.3 and 8.2 lead comfortably, and in third place PHP 7.4 is still on 14% of WordPress sites four years after the PHP project stopped fixing it, which is more than PHP 8.4, even though 8.4 has been out for two years.2
These are shares of sites rather than visitors, so a parked or forgotten site that nobody visits counts the same as a busy shop, and I'd guess a lot of the old versions are on sites like that. PHP 8.6 only came out on 19 November, so it's barely registering yet.4
When each version stops getting official fixes
The PHP project gives each version two years of normal bug fixes, then two more years of security fixes only.2 After that, in PHP's own words, users "may be exposed to unpatched security vulnerabilities".
If nobody upgraded at all, more than half of WordPress sites would be past official support on 1 January, and four in five a year later when PHP 8.3 runs out too. People do upgrade, of course, and the share on 8.2 or older has fallen about 2.4 points since 2 November, so at that pace it'd be nearer 50% than 53% by 1 January.
October: PHP2Shell and an exception for old PHP
On 21 October the PHP project fixed two critical bugs, together known as PHP2Shell, that could let someone run their own code on a server without logging in.5 Details had leaked the day before,6 and it was serious enough that government sites in several European countries were taken offline as a precaution.7 I covered it at the time in that week's This week in WordPress.
The official fixes were for PHP 8.2 to 8.5, but the PHP project also made an exception for older versions: "Given the severity of these vulnerabilities, the PHP security team provided minimal source-backports for PHP 7.4, PHP 8.0, and PHP 8.1".5
Ubuntu went further, fixing every PHP version it supports back to 5.5 on Ubuntu 14.04,8 and CloudLinux, which makes an operating system for shared hosting, fixed all 16 versions its customers use, from 5.2 to 8.5.9 Its reasoning is that a shared server holds hundreds of sites, each pinned to the PHP version it was built for, and forcing them all onto a new one would break some of them.
November: no exception this time
Four weeks later, on 19 November, PHP put out another batch of security fixes, seven of them rated critical.10 Most need a fairly unusual setup to be exploited, but on some server configurations one could let someone run code on the server through an ordinary WordPress request.11
This time the official fixes were for 8.2 to 8.5 only, with no source patches for anything older. CloudLinux,12 Red Hat13 and Ondřej Surý's repository14 still patched their old versions, but a host that doesn't use something like those may have nobody patching its old PHP for these bugs.
Who still patches old PHP
Once the PHP project stops fixing a version, fixes can still come from four other places, and which of them applies (if any) depends on the host.
· Your server's Linux distribution. Distributions keep fixing the PHP they ship on their own timetable. Ubuntu 22.04 still fixes PHP 8.1, and 20.04 still fixes 7.4 through its paid Ubuntu Pro.8 Red Hat and Rocky Linux, a free rebuild of it, still fix 7.4,13 and Debian 12 and Red Hat will keep fixing 8.2 until 202815 and 2029.16 That only helps if the host uses the distribution's own PHP, though, and many shared hosts don't, because they offer several versions side by side.9
· A community repository. Ondřej Surý, who maintains PHP's packages in Debian, also runs a widely used repository of PHP builds for Debian and Ubuntu, and it still backports fixes to 7.4, 8.0 and 8.1.14
· A paid extended support service. TuxCare, part of CloudLinux, sells hosts a yearly licence for extended support of PHP 5.2 to 8.5. It aims to fix critical bugs within 14 days, had PHP2Shell fixes out the same day, and stops sending fixes if the licence lapses.17
· The host's own promise. WP Engine announced in 2022 that it would keep supporting PHP 7.4 "into 2024".18 It still offers 7.4 today and patched it for PHP2Shell, though I couldn't find anything saying for how long.19
Fixes like these usually keep the old version number,20 so a patched PHP 7.4 and an unpatched one look exactly the same from inside WordPress, and only the host can say which one a site has.
Are plugins moving on from old PHP?
Plugins on WordPress.org each say which version of PHP they need, and WordPress normally won't update a plugin to a version that needs newer PHP than the site has,21 so a site on older PHP stops getting that plugin's updates altogether, security fixes included. I pulled that setting for the 1,000 most popular plugins to see how many have moved on.22
Most haven't, with 94% of them still saying they'll run on PHP 7.4 or older, or not giving a minimum at all.
WordPress plugins say the oldest PHP version they need, but there's nowhere for them to say the newest one they've been tested on, so "PHP version 7.4 or higher" on a plugin's page doesn't mean anyone has tried it on 8.4. Even the minimum is just what the developer types into the readme, and some of those "older than 7.0" plugins probably haven't been tried on PHP that old in years. A "Tested up to" for PHP, like the one plugins already give for WordPress, was proposed in 2020 but hasn't been added,23 so nothing warns you before you switch.
A few very big ones are moving, though. WooCommerce 11.6, due in February, needs PHP 8.1, which it announced back in September, and shops on 7.4 or 8.0 will be stuck on 11.5, which only gets fixes for the most severe vulnerabilities.21 Hostinger's own plugin, on more than 3 million sites, already needs 8.1.22
Contact Form 7, on more than 10 million sites, moved faster, jumping from PHP 7.4 to 8.3 in version 6.2 in October.24 That follows a policy its developer published last December of requiring whatever PHP version WordPress recommends,25 but it rules out about 53% of WordPress sites, including everyone on PHP 8.2, which still has official support. Several recent reviews say an automatic update took their sites down,26 even though WordPress normally holds back a plugin update the site's PHP can't run.
None of the other big names I checked, including Elementor, Yoast SEO, Wordfence, Jetpack, Rank Math, WPForms, Gravity Forms and ACF, has announced a change yet, though Elementor and Gravity Forms already recommend 8.3,27 and these minimums can go up in any update.
Whether it should be a plugin's job to push sites onto newer PHP is another question. Plenty of people running WordPress sites don't know what PHP is, and the sites that stop getting updates are mostly the ones nobody is keeping an eye on, so they're the least likely to notice.
How quickly sites move on
Evidence
来源与证据
当前仅有一个可用来源,尚未完成多源交叉核验。
- 发布时间
- 内容处理
- AI 翻译 / 摘要,需结合原文核对
相关资讯
AI 翻译、摘要和解读仅用于辅助判断;涉及重要决策时,请回到上方来源核实。