How to update PHP on your WordPress site safely
How to check your PHP version, choose which version to move to in late 2026, check your plugins and theme, switch it in cPanel, Plesk or your host's dashboard, test the site and switch back if anything breaks.
Updating PHP on a WordPress site means changing the version of PHP your hosting server uses to run it. It's usually one setting in your hosting control panel, and it can be switched back just as quickly. The real work is the preparation: checking your plugins and theme can cope with the newer version, taking a backup and testing the site straight afterwards.
If a message in your dashboard brought you here, it will look something like this:
PHP Update Required
Your site is running on an outdated version of PHP (7.4.33), which does not receive security updates and soon will not be supported by WordPress. Ensure that PHP is updated on your server as soon as possible. Otherwise you will not be able to upgrade WordPress.
It's a good time to look at it even if you haven't seen that box. PHP 8.2 stops getting security fixes on 31 December 20261 and WooCommerce 11.6 will need PHP 8.1 or newer when it arrives in February 2027.2 PHP 8.6 also came out on 19 November 2026,3 although that's not the version to pick just yet.
When a PHP update goes wrong, it's almost always an old plugin, theme or piece of custom code that the newer version won't run, so most of this guide is about checking before you switch.
Why your PHP version matters
PHP is the main programming language WordPress is written in. It runs on your hosting server, and your host decides which versions you can choose from.4
Each PHP version gets two years of active support, with bug and security fixes, then two more years of fixes for critical security problems only. After that it gets nothing at all.1 This is where each version stands today:5
| PHP version | Active support | Security fixes | What it means for a WordPress site today |
|---|---|---|---|
| 7.4 and older | Ended | Ended 28 November 2022 | No security fixes for almost four years. Move as soon as you can |
| 8.0 | Ended | Ended 26 November 2023 | No security fixes, and you can't update to WooCommerce 11.6 |
| 8.1 | Ended | Ended 31 December 2025 | No security fixes. Meets WooCommerce's new minimum, but that's all |
| 8.2 | Ended 31 December 2024 | Until 31 December 2026 | Fixes stop in about six weeks. Plan your move now |
| 8.3 | Ended 31 December 2025 | Until 31 December 2027 | WordPress's recommended minimum, good for about another year |
| 8.4 | Until 31 December 2026 | Until 31 December 2028 | My pick for most sites today |
| 8.5 | Until 31 December 2027 | Until 31 December 2029 | A good choice if your plugins and theme support it |
| 8.6 | Until 31 December 2028 | Until 31 December 2030 | Released 19 November 2026. Wait for plugins to catch up |
Security is the main reason this matters. In October 2026 PHP fixed two critical bugs, nicknamed PHP2Shell, that could let someone run code on a server without logging in. New releases came out for 8.2 to 8.5. Versions 7.4, 8.0 and 8.1 got only minimal patches for people who build PHP themselves, and nothing older was patched at all.6 More security releases followed on 19 November 2026 (8.2.36, 8.3.37, 8.4.28 and 8.5.13). The worst issues were rated critical but only affect unusual setups, and again only 8.2 to 8.5 got fixes.7
Plenty of sites are behind. Going by WordPress.org's figures, 31.5% of WordPress sites run a PHP version that no longer gets security fixes, and another 22.3% are on PHP 8.2.8 Unless they move, more than half of WordPress sites will be on unsupported PHP from January. PHP 8.3 is the most common version, on 28.2% of sites, and 8.6 is on about 0.1% so far.
31.5%
of WordPress sites run a PHP version with no security fixes
22.3%
run PHP 8.2, which loses security fixes on 31 December 2026
28.2%
run PHP 8.3, the most common version
0.1%
have moved to PHP 8.6 so far
Plugins are the other reason, since more of them now refuse to install or update on old versions. That can leave you stuck without their security fixes.
Check which PHP version your site uses
In the dashboard, go to Tools→ Site Health, click the Info tab and open the Server section. PHP version shows the exact version, such as 8.3.37.9
On a shop, WooCommerce shows it too, under PHP version in the Server environment section of WooCommerce→ Status.2 Your hosting control panel also shows the version set for each site.
The "PHP Update Required" box
WordPress checks your version against a list kept on WordPress.org, and remembers the answer for a week.10 If your version is below WordPress.org's threshold, administrators see a box on the dashboard titled PHP Update Required or PHP Update Recommended.11 Some hosts add an Update PHP button to it that takes you straight to the right setting.12
The Status tab in Site Health runs the same check. As of 21 November 2026, this is what each version gets:1314
| Your PHP version | Dashboard box | Site Health says |
|---|---|---|
| 7.4 or older | PHP Update Required | Critical issue: "outdated version of PHP ... which does not receive security updates and soon will not be supported by WordPress" |
| 8.0 | PHP Update Recommended | Critical issue: "outdated version of PHP ... which does not receive security updates. It should be updated." |
| 8.1 or 8.2 | None | Recommended improvement: "older version of PHP ... which should be updated" |
| 8.3 or newer | None | Passed test: "Your site is running a recommended version of PHP" |
Don't read too much into the lack of a box. WordPress.org's list still treats PHP 8.1 as getting security updates,13 but PHP's own support for 8.1 ended on 31 December 2025,5 so a site on 8.1 sees no dashboard warning at all.
The "soon will not be supported" wording on 7.4 is there because WordPress plans to raise its minimum to at least PHP 8.0 in future.10 Our guide to Site Health warnings covers the rest of that screen.
Choose which PHP version to move to
WordPress itself sets a low bar. It needs PHP 7.4 or newer, and that doesn't change in WordPress 7.2, due on 8 December.15 WordPress.org recommends PHP 8.3 or newer.16 Core is documented as fully compatible with every version from 7.4 to 8.5,17 and in May 2026 WordPress stopped labelling new PHP versions as "beta support", partly because the label had made some hosts and site owners wary of upgrading.18
WooCommerce is moving faster. From version 11.6 it needs PHP 8.1, and it recommends 8.3 or newer.2 Since 11.3, stores on PHP 7.4 or 8.0 see a notice headed "PHP version requirements will change soon".19 Stores that don't move can stay on 11.5, but that version only gets fixes for the most serious security problems.2
Which version I'd pick
For most sites, I'd move to PHP 8.4. It gets security fixes until the end of 20281 and WordPress lists it as fully supported from version 6.7 onwards.17 It's also been out for two years, so well-maintained plugins and themes have had plenty of time to catch up. About 11% of WordPress sites already run it.8
PHP 8.5 is a good choice too if your plugins and theme say they support it, and it buys you an extra year. PHP 8.3 meets WordPress's recommendation, but it only has 13 months of security fixes left, so you'd be doing this again next year. I'd only stop at 8.3 if a plugin you can't do without isn't ready for 8.4.
My take
For most WordPress sites today I'd choose PHP 8.4. It gets security fixes until the end of 2028, WordPress fully supports it and most maintained plugins have caught up. Choose 8.5 if your plugins and theme list it and stop at 8.3 only if something you rely on isn't ready. Leave 8.6 until your plugins say they support it.
Why I'd wait for PHP 8.6
PHP 8.6 only came out on 19 November. WordPress contributors say core is in good shape for it and confidence is high that WordPress 7.2 will be compatible, but they call the plugin ecosystem "the big unknown".20 A change in 8.6 breaks the way WordPress 7.1 flips images on servers using GD. WordPress 7.2 fixes it, but plugins that copied the old method may still break.2021 cPanel's own PHP packages only go up to 8.5 for now.22
When your important plugins and theme mention PHP 8.6 in their changelogs, and you're on WordPress 7.2 or later, it's worth a test on a staging copy. For most sites I'd expect that to take a few months.
Moving up from PHP 7.4 or 8.0
If you're on 7.4 or 8.0, the jump to a current version is the big one. PHP 8.0 removed several old functions, such as create_function() and each(), and turned many warnings into errors that stop the page.23 Code written for PHP 7 that nobody has touched since is where most breakages come from.
On a staging copy, I'd test the version you're aiming for straight away. If a lot breaks, trying 8.1 or 8.2 first can split the problems into smaller batches, but that's a judgement call rather than a rule.
Check your plugins and theme first
Start by updating WordPress, your plugins and your theme. WordPress.org's guide to updating PHP puts this straight after taking a backup.4 Do it a day or two before the PHP change, so if something breaks you know which change caused it. If an update itself causes problems, see our guide to a site broken by an update.
What "Requires PHP" tells you
Plugins and themes can declare the oldest PHP version they'll run on. It shows on their WordPress.org page as, for example, "PHP version 8.3 or higher". WordPress uses it to stop you activating a plugin your server is too old for, with an error like this:24
Error: Current PHP version (8.2.36) does not meet minimum requirements for Contact Form 7. The plugin requires PHP 8.3.
It holds back updates as well. Instead of an update link, the Plugins screen says "There is a new version of ... available, but it does not work with your version of PHP", and automatic updates skip it.2526
This is already happening with popular plugins. Contact Form 7, on more than 10 million sites, has needed PHP 8.3 since version 6.2 in October 2026. Before that it needed 7.4.27 A site on PHP 8.2 is told 6.2.5 exists but can't install it, so it stays on 6.1.7.
The setting only covers the oldest version, though. A plugin can't tell WordPress it's too old for a newer PHP, so WordPress won't warn you before you switch.24 That check is down to you.
Check each plugin's changelog and support pages
For each plugin and your theme, look at when it was last updated and whether its changelog or support pages mention the PHP version you're moving to. Something updated in the last few months is very likely fine. If you're not sure, ask the developer, as WordPress.org suggests.4
These are the usual blockers:
- Premium plugins and themes with lapsed licences, which stop updating through the dashboard. Our guide to premium plugins with expired licences covers getting the latest version.
- Old page builders, and themes bought years ago that came with their own bundled copy of a builder or slider plugin.
- Plugins that have been closed or abandoned. They won't get PHP fixes, so plan to replace them before you switch.
- Custom code from a past developer, in a child theme's
functions.phpor a site-specific plugin. Nobody is maintaining it, so it needs checking by hand.
You'll see the PHP Compatibility Checker plugin recommended in older guides. Its own page now says it's no longer actively maintained, and it only checks up to PHP 8.0,28 so I wouldn't rely on it. Testing on a staging copy with the debug log switched on tells you far more.
Back up and test on a staging copy
Take a full backup of your files and database, and keep a copy somewhere other than your hosting account. Check that your backup plugin or host can actually restore it. If you ever do need to restore, your host will usually need to put your old PHP version back first.4
A staging copy is a private copy of your site, and many hosts offer one, often in a click. Switch the staging copy to the new version and work through the tests below there before you touch the live site. WooCommerce gives shops the same advice.2
Check how your host applies the setting before you start. In cPanel's MultiPHP Manager the version is set per domain,22 so a staging subdomain with its own folder can run a different version from the live site. The setting lives in the domain's main folder, though, so domains that share a folder share the version, and a staging copy in a subfolder of the live site usually follows the live site's version.29 CloudLinux's Select PHP Version tool, found on some shared hosting, sets the version per hosting account,30 so every site in that account may change together. If yours works that way, ask your host how to test a different version safely.
Make the live change at a quiet time for your business. Shops should avoid the run-up to Christmas, which is one reason WooCommerce moved its own deadline until after the peak selling season.2 If your host doesn't offer staging, you can still make the change on the live site at a quiet time, with a backup taken and the old version written down.
Switch PHP in your hosting control panel
Where the setting lives depends on your host. These are the common ones, but your host's help pages have the final say. If you can't find the option at all, ask your host to make the change for you.
cPanel: MultiPHP Manager
In cPanel, open MultiPHP Manager in the Software section. Tick the box next to your domain, choose the version from the PHP Version menu and click Apply. If a version is missing from the menu, it isn't installed on the server or isn't available on your account.22
If your domain is marked Inherited, it's following the setting of a folder above it or, failing that, the server's default version, which only your host can set.2229 Choosing a specific version puts you in control, but it also means keeping it up to date is now your job.
cPanel with CloudLinux: Select PHP Version
Hosts that run CloudLinux add a Select PHP Version tool to cPanel's Software section.31 Extensions and options such as the memory limit are set separately for each PHP version there, so after switching, check they match what you had before.31 Some hosts offer both tools and one can stop the other working,30 so follow your host's guide on which to use.
Plesk
In Plesk, go to Websites & Domains, open PHP settings for the domain and choose the version from the menu. It's set per domain or subdomain, and if the version you want isn't listed, your host needs to add it.32
Managed WordPress hosting
Managed WordPress hosts usually have a setting in their own dashboard instead. On SiteGround, for example, it's Site Tools→ Devs→ PHP Manager. Its Managed PHP option moves sites on to SiteGround's default version automatically, and choosing a version yourself switches that off.33
Asking your host to do it
If you'd rather your host made the change, a short message is enough:
I'd like to move my WordPress site from PHP 8.2 to PHP 8.4. Can you confirm 8.4 is available on my plan and whether the change applies to just this site or my whole account? And can I switch back to 8.2 if I need to?
Test your site straight after switching
Clear your caching plugin, your host's cache and any service such as Cloudflare first. Otherwise you may be looking at saved copies of pages that never ran on the new version. Then go through the site in a private browser window while logged out, and again while logged in:
- Load the home page, a few inner pages, blog posts and search, plus anything with a slider, map or gallery.
- In the admin, open the dashboard and upload an image, then edit and save a page in whichever editor or page builder you use.
- Send a test message through each form and check the email arrives. If it doesn't, see our guide to contact forms not sending email.
- On a shop, test the checkout, shipping, tax and order emails. On staging you can use your payment provider's test mode. Don't switch the live shop to test mode, since real customers could check out without paying. Place a small real order instead, or ask your payment provider how they recommend testing a live shop. Our guide to WooCommerce checkout problems helps if it fails.
- Check scheduled jobs still run, such as scheduled posts, backups and, on WooCommerce, the queue under WooCommerce→ Status→ Scheduled Actions (also under Tools→ Scheduled Actions). A growing pile of past-due scheduled actions is a warning sign.
- Go back to Tools→ Site Health and confirm the new version shows. If the Status tab says "One or more recommended modules are missing", an extension didn't carry over to the new version and your host can add it.14
Check the debug log
Plenty of errors never show on screen, so check the log as well. On your staging copy, download a copy of wp-config.php, switch on WordPress's debug log, repeat the tests above and read wp-content/debug.log. Our guide to the debug log walks through it step by step. Switch debugging off and delete debug.log when you've finished.
You'll mostly see these types of message after a PHP change:34
- Deprecated means the code uses something a future PHP version will remove. It still works today. PHP 8.4, for example, deprecated a shorthand that older code often uses for optional function parameters,35 so some plugins log plenty of these. Pass them to the developer, because they're what breaks at your next upgrade.
- Warning means something went wrong but the page carried on. Look into it if it names a feature that's misbehaving.
- Fatal error means PHP stopped the page. This is what causes "There has been a critical error on this website", and it needs fixing before the live site moves.
Our guide explains which messages matter in more detail.
If something breaks, switch back
If the live site breaks after the change, go back to the same screen in your control panel and choose the version you wrote down. WordPress.org's guide gives the same advice,4 and it gets most sites working again straight away.
Then find out what failed, either on staging or with the live site safely back on the old version:
- If WordPress caught the error, the site's admin email address gets a message naming the plugin or theme at fault, with a link to log in using recovery mode. Our critical error guide explains how to use it.
- The debug log, or your host's PHP error log, shows the fatal error and the file it came from.
- Look for an update to that plugin or theme, or a replacement if it's no longer maintained, then test again on staging.
If you do need to restore a backup, ask your host to put the old PHP version back first, then restore it.4 And treat the old version as a stopgap. It still isn't getting security fixes, so set a date to sort out the problem and try again.
If your site can't run a supported PHP version
Sometimes testing shows the site only works on an old version because of its theme, a page builder or several plugins it relies on. Replacing one abandoned plugin is routine. When the problem is in the foundations, fixing it can cost close to a rebuild, and our guide on whether to fix or rebuild a WordPress site helps you weigh it up.
Some hosts run patched builds of old PHP versions supplied by long-term support vendors, and both PHP and WooCommerce suggest asking your host about it.619 That can buy you time. It won't help with plugins that refuse to install on old versions, though, so treat it as a bridge rather than a fix. If you'd like a second opinion on what's holding your site back, get in touch.
Common questions
Will updating PHP break my WordPress site?
Usually not, if WordPress, your plugins and your theme are up to date and still maintained. WordPress itself runs on everything from PHP 7.4 to 8.5,17 and breakages almost always come from old plugins, themes or custom code. WordPress.org's own guide says it should not be a problem but can't be guaranteed,4 which is why you back up, test on staging and note your old version first.
Is my host responsible for updating PHP?
Partly. Your host installs PHP, applies security patches and decides which versions you can choose. Picking your site's version and checking your plugins work with it is usually up to you or your developer. Some hosts move sites forward automatically, as SiteGround does with Managed PHP,33 and old versions eventually disappear from the menu. cPanel's own packages no longer include PHP 8.0, for example.22
Does a newer PHP version make WordPress faster?
A little, but don't expect a transformation. In Kinsta's benchmark of a default WordPress 6.8 install, the site handled about 148 requests a second on PHP 8.5 against 139 on PHP 7.4, roughly 7% more.36 In my experience caching, hosting and heavy plugins make far more difference, and security is the real reason to upgrade. If your site is slow, see our guide to a suddenly slow WordPress site.
Can I go back to the old PHP version?
Yes, in most cases. The old version stays in the same menu in your control panel, so switching back takes a minute, as long as your host still offers it. In cPanel a host can limit which versions your account can choose,22 and old versions are removed over time. Going back doesn't change your content, but it does leave you on the version you were trying to leave.
Need help updating PHP?
If you'd rather hand this over, get in touch for a fixed quote to check your plugins and theme, test the new version on a staging copy and make the switch. If a PHP change has already broken your site, my emergency WordPress support can get it working again. Many fixes are £50 all in, you'll get a fixed quote before I start and it's no fix, no fee. My maintenance plans keep WordPress, your plugins and your theme updated, with updates tested on a staging copy first, which makes the next PHP upgrade a much smaller job.
Supported Versions, PHP. ↩ ↩ ↩
New Requirement for WooCommerce 11.6: PHP 8.1+, WooCommerce Developer Blog, 29 September 2026. ↩ ↩ ↩ ↩ ↩ ↩
PHP 8.6.0 Released!, PHP, 19 November 2026. ↩
Get a faster, more secure website: update PHP today, WordPress.org Documentation. ↩ ↩ ↩ ↩ ↩ ↩ ↩
Unsupported Branches, PHP. ↩ ↩
Security advisory: Critical remote code execution vulnerabilities, update now, PHP, 21 October 2026. ↩ ↩
Upcoming Critical PHP Security Release, PHP, 18 November 2026, and the PHP 8.2.36, 8.3.37, 8.4.28 and 8.5.13 release announcements, PHP, 19 November 2026. ↩
PHP version statistics, WordPress.org, 21 November 2026. The 31.5% is the combined share of PHP 8.1 and older. ↩ ↩
class-wp-debug-data.php, WordPress source code on GitHub. ↩
misc.php (wp_check_php_version), WordPress source code on GitHub. ↩ ↩
dashboard.php (wp_dashboard_setup and wp_dashboard_php_nag), WordPress source code on GitHub. ↩
functions.php (wp_get_update_php_url and wp_direct_php_update_button), WordPress source code on GitHub. ↩
servehappy-config.php, WordPress.org source code on GitHub, and the Serve Happy API, checked 21 November 2026. ↩ ↩
class-wp-site-health.php (get_test_php_version and get_test_php_extensions), WordPress source code on GitHub. ↩ ↩
version.php ($required_php_version), WordPress source code on GitHub. ↩
Requirements, WordPress.org. ↩
PHP Compatibility and WordPress Versions, WordPress Core Handbook, updated 4 November 2026. ↩ ↩ ↩
PHP support clarification, spring 2026 edition, Make WordPress Core, 22 May 2026. ↩
class-wc-admin-notices.php, WooCommerce source code on GitHub. ↩ ↩
PHP & WordPress chat: Nov 2026, Make WordPress Core, 20 November 2026. ↩ ↩
class-wp-image-editor-gd.php (flip) in WordPress 7.1 and in trunk, WordPress source code on GitHub. ↩
MultiPHP Manager for cPanel, cPanel & WHM Documentation. ↩ ↩ ↩ ↩ ↩ ↩
Backward Incompatible Changes (migrating from PHP 7.4 to 8.0), PHP Manual. ↩
plugin.php (validate_plugin_requirements), WordPress source code on GitHub. ↩ ↩
update.php (wp_plugin_update_row), WordPress source code on GitHub. ↩
class-wp-automatic-updater.php (should_update), WordPress source code on GitHub. ↩
Contact Form 7 readme files for version 6.1.7 and version 6.2, WordPress.org Plugin Directory, and the Contact Form 7 plugin page. Version 6.2 was released on 6 October 2026. ↩
PHP Compatibility Checker, WordPress.org Plugin Directory. ↩
PHP Inheritance, cPanel & WHM Documentation. ↩ ↩
CloudLinux OS components (PHP Selector), CloudLinux Documentation. ↩ ↩
CloudLinux Manager UI (PHP Selector client plugin), CloudLinux Documentation. ↩ ↩
PHP Settings, Plesk Obsidian Customer's Guide. ↩
What Is Managed PHP Service and How to Enable It?, SiteGround Knowledge Base. ↩ ↩
Predefined error constants, PHP Manual. ↩
Deprecated Features (migrating from PHP 8.3 to 8.4), PHP Manual. ↩
PHP benchmarks, Kinsta, updated 13 December 2025. ↩