On 21 October, the PHP team shipped an emergency security release. Two flaws, nicknamed PHP2Shell, let an attacker run code on a web server, and both were rated 9.2 out of 10 for severity. Hosting companies saw attack attempts on the same day. PHP 8.2, 8.3, 8.4 and 8.5 got new official versions with the fix. PHP 7.4, 8.0 and 8.1 only got source patches, because those versions are already past their end of life.
That week was a good test for every WordPress owner. If your host updated PHP for you, you were safe. If your site runs on an old PHP version, the honest answer is that you are depending on your host to keep patching software that the PHP team no longer supports.
This guide explains which PHP version your WordPress site should run today, what tends to break when you upgrade, and a calm way to make the switch without taking your site offline.
Where WordPress Sites Stand Right Now
WordPress itself is not the problem. WordPress 7.0, released in May, works with every PHP version from 7.4 up to 8.5, and the WordPress Hosting Team now recommends PHP 8.4 or 8.5 for new sites. The slow part is everything else, meaning hosts, old themes and plugins that nobody has updated in years.
WordPress.org publishes live numbers on which PHP versions its sites use. The figures below were checked in mid October, and next to them are the official support dates from the PHP team.
| PHP version | Share of WordPress sites | Security fixes end | What it means for you |
|---|---|---|---|
| 7.4, 8.0 and 8.1 | About 31% together | Already ended | Upgrade as soon as you can |
| 8.2 | 23.9% | 31 December this year | Plan the upgrade now |
| 8.3 | 26.4% | 31 December next year | Safe for now, plan for next year |
| 8.4 | 9.2% | 31 December 2028 | Best choice for most sites |
| 8.5 | 3.8% | 31 December 2029 | Fastest, but test plugins carefully |
Put the first two rows together and you get a surprising result. When the year ends, more than half of all WordPress sites will be running a PHP version that no longer gets security fixes. Only about one site in eight runs PHP 8.4 or 8.5 today.
Is the Upgrade Worth It for Speed
Many hosts and agencies sell PHP upgrades as a big speed boost. The latest benchmark from Kinsta tells a more honest story. A plain WordPress site handled about 143 requests per second on PHP 8.3 and about 148 on PHP 8.5. That is a gain of roughly 4%, which most visitors will never notice.
Online stores are different. In the same test, a WooCommerce shop went from about 54 requests per second on PHP 8.3 to 71 on PHP 8.5, which is about 32% more capacity. For a busy store, that can mean faster checkout pages during a sale. There is one catch. In October, WooCommerce still listed PHP 8.4 as its newest tested version, so stores should test 8.5 on a copy of the site before they switch.
So the main reason to upgrade is security and support, not speed. If you also want a faster site, caching and image work usually do more, as we explain in our WordPress speed optimization service.
What Usually Breaks, Based on Real Support Threads
Most PHP upgrades go smoothly. When something breaks, it is almost always an old plugin or theme, not WordPress itself. Reading the WordPress.org support forums shows the same few patterns again and again.
One site owner moved from PHP 7.4 straight to 8.4 and found that the desktop layout suddenly looked like a tablet view, with a wide white border around the page. There was no error message at all. They switched back to 7.4 and the problem went away, but the thread was never solved because their developer was no longer available. In another thread, the Advanced Cron Manager plugin stopped with a fatal error on PHP 8.4. The plugin author released a fix four days after the report.
These stories show the three kinds of problems you can expect.
- A white screen or "critical error" message. This is a fatal error, usually from a plugin that uses code PHP removed years ago. Our guide to fixing the WordPress critical error shows how to find which plugin it is.
- A layout that looks wrong, with no error. A theme function returns something different on the new PHP version, so styles or page parts are missing. This is the hardest type to spot, because nothing tells you about it.
- Many "Deprecated" notices in the log. These are warnings, not errors. The site keeps working, but the plugin will break in a later PHP version unless it gets updated.
The lesson from these threads is simple. Big jumps, such as 7.4 straight to 8.4, cause most of the trouble. And when a plugin breaks, the fix often already exists in a newer version of that plugin.
Not sure your plugins are ready for a new PHP version? Our WordPress maintenance team tests the upgrade on a staging copy, fixes what breaks and switches your live site only when everything works.
An Upgrade Plan You Can Finish in One Afternoon
For a normal business site, the whole upgrade usually takes two to four hours, and most of that time is testing. The order of the steps matters more than the speed, so do them one by one.
- Check your current version. In WordPress, go to Tools, then Site Health, then the Info tab, and open the Server section. Write down the PHP version you see there.
- Take a full backup. Save both the files and the database, and keep a copy outside your hosting account. Our WordPress backup guide explains how.
- Update everything first. Update WordPress, your theme and all plugins on the current PHP version. Many compatibility fixes are already waiting in those updates, as our guide to updating WordPress safely shows.
- Make a staging copy. Most hosts can create one in a few clicks. Switch only the staging copy to the new PHP version.
- Turn on the debug log on staging. This saves every warning to a file, so you see problems that do not show on the screen.
- Click through the pages that earn you money. Test the home page, contact forms, booking or checkout, login and the admin area. Compare the layout with the live site on both desktop and phone.
- Read the log and fix what you find. Update or replace any plugin that shows fatal errors. Plugins that have not been updated for more than a year are the first ones to check.
- Switch the live site and watch it for two days. Change the PHP version in your hosting panel, then check the error log and your forms again over the next 48 hours.
To turn on the debug log in step 5, add these lines to the wp-config.php file of the staging site, just above the line that says "That's all, stop editing". The last line keeps errors hidden from visitors.
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
If you are on PHP 7.4, it is safer to move one step at a time, for example to 8.2 first and then to 8.4, testing each time. A smaller jump makes it much easier to see which change caused a problem.
If Something Goes Wrong After the Switch
The good news is that a PHP upgrade is easy to undo. In most hosting panels, you can switch back to the previous PHP version in less than a minute, and your content stays exactly as it was. Do that first, so visitors can use the site again, and then look for the cause on staging without any time pressure.
Going back should only be a short break, though. Your old version will stop getting security fixes, and as the October patch showed, attacks can start on the same day a flaw becomes public. Keeping PHP up to date is part of a regular WordPress maintenance checklist, together with updates, backups and security checks. If a site was already hacked through an old server, our WordPress malware removal service can clean it and move it to a safe PHP version.
