You update PHP in your hosting control panel, not in WordPress. The switch takes a minute. The work is making sure nothing breaks: update everything, take a backup, check your plugins and theme for code that won't run on the new PHP version, then switch and watch the site for errors for the next few days.
For most WordPress sites in 2026, PHP 8.4 is the version to aim for. If you're still on PHP 8.2 or older, plan the move now: PHP 8.2 stops getting security fixes on 31 December 2026.
Most PHP upgrades go fine. When one doesn't, it usually goes badly in one of two ways. Either the site shows "There has been a critical error on this website" a minute after the switch, or it looks fine for three days until a customer reports that checkout stopped working.
Both are avoidable. This guide shows you which PHP version to choose, how to find the plugins that will cause trouble before you switch, how to make the switch, and what to do if something breaks anyway.
Which PHP version should WordPress use in 2026?
Every PHP version gets two years of bug fixes and then two years of security fixes only. After that it gets nothing, not even fixes for known security holes. Here's where each version stands:
| PHP version | Security fixes until | Status now | For a WordPress site |
|---|---|---|---|
| 8.1 and older | Ended | End of life | Upgrade as soon as you can |
| 8.2 | 31 December 2026 | Security fixes only | Plan your upgrade now |
| 8.3 | 31 December 2027 | Security fixes only | Fine for now, WordPress's recommended minimum |
| 8.4 | 31 December 2028 | Active support | The best choice for most sites |
| 8.5 | 31 December 2029 | Active support | Good if your plugins are ready for it |
WordPress itself is not the problem. WordPress 7.1 fully supports PHP 8.2, 8.3, 8.4 and 8.5. WordPress recommends at least PHP 8.3, and its hosting handbook recommends 8.4 or later for live sites. The real question is whether your plugins and theme are ready, and that's what the rest of this guide is about.
What about PHP 8.6? PHP 8.6 is due on 19 November 2026. A brand-new PHP version is for testing, not for a live site. Give it a few months, until WordPress and your important plugins say they support it.
How to check your current PHP version
In your WordPress dashboard, go to Tools > Site Health, open the Info tab and expand Server. The PHP version is listed there. If it's out of date, the Status tab will usually show a warning about it too.
Your hosting control panel shows the same number, and it's where you'll change it later. If you manage several sites, check each one: hosts often keep older sites on the PHP version they were created with.
What actually breaks when you update PHP
Each new PHP version removes some old features and marks others as "deprecated", which means they still work but will be removed later. WordPress core keeps up with these changes. Plugins and themes don't always, especially ones that haven't been updated in a year or two. Problems fall into three groups:
- Will breakRemoved features. Code that calls something PHP no longer has causes a fatal error. Depending on where that code runs, you get a white screen, a "critical error" message or one page that stops working. Old examples are
create_function()andeach(), both removed in PHP 8.0. - Ask your hostMissing extensions. PHP 8.4 no longer includes IMAP, OCI8, PDO_OCI and pspell by default. Code that uses them is fine, but only if your host installs the extension separately. This mostly affects email-reading and database tools.
- Fix laterDeprecations. The code still works but writes a warning to your error log. Common ones are passing
nullto built-in functions (PHP 8.1), dynamic properties (PHP 8.2) and implicitly nullable parameters (PHP 8.4). They don't break your site today, but they will break it in a future version.
The important point: a plugin with 200 deprecation warnings is usually less risky than a plugin with one removed function. Counting problems tells you little. Knowing which kind they are, and whether that code actually runs on your site, tells you a lot.
How to update PHP in WordPress, step by step
Here's the full process. On a typical site, steps 1 to 5 take an afternoon. Leave a few days between step 4 and step 7 if you can, so you have time to fix things without pressure.
- Update WordPress, plugins and your themeGo to Dashboard > Updates and install everything that's waiting. Many PHP problems are already fixed in newer plugin versions, so this one step often clears most of the list.
- Make a full backupBack up both your files and your database, and keep a copy somewhere other than your server. Many hosts take daily backups, but check when the last one ran before you rely on it.
- Check your plugins and theme for the new PHP versionRun a PHP compatibility check against the version you plan to use. It reads the code of every plugin and theme and lists what will break, what needs your host and what can wait. More on this below.
- Fix what will breakUpdate the plugin if a newer version exists. If it doesn't, contact the developer or replace the plugin with a maintained one. For missing extensions, ask your host whether they can install them on the new PHP version.
- Test on a staging copyIf your host offers staging, switch the copy to the new PHP version first. Click through your main pages, log in, submit a form and, on a shop, place a test order.
- Start watching for errorsTurn on error monitoring on the live site before the switch, so you have a few "normal" days to compare with afterwards.
- Switch PHP in your hosting panelIn cPanel, look for MultiPHP Manager or Select PHP Version. In Plesk, it's under PHP Settings. Managed WordPress hosts usually have a PHP option on the site's settings page. If you can't find it, ask your host to do it.
- Watch the site for a weekCheck your main pages straight away, then keep an eye on errors for the next seven days. Some code only runs at checkout, at night or once a week, so a quick look isn't enough.
Coming from PHP 7.4 or older? Don't jump straight to 8.4 on a live site. Many old plugins break on PHP 8.0 itself. Check against your target version, fix what will break, and test on staging first.
How to check plugin and theme compatibility with a new PHP version
There are four ways to find out whether your plugins will survive the upgrade. They catch different things, so the safest plan uses more than one.
| Method | What it tells you | What it misses |
|---|---|---|
| Plugin pages and changelogs | When the plugin was last updated, and sometimes which PHP versions it supports | Most plugins never say which PHP versions they've tested |
| A compatibility scan | Every line of code that won't work on the target PHP version | Whether that code ever runs on your site |
| Testing on staging | What breaks on the pages you click through | Pages, payment methods and scheduled tasks you didn't try |
| Error monitoring after the switch | What actually fails on the live site | Nothing, but by then it's already happening |
A scan is the fastest way to see the whole picture, but most PHP compatibility checkers give you one long list. On a normal site, that's hundreds of warnings with no way to tell which ones matter. I built Upshift, a free plugin, to give plain answers instead and to keep watching after the switch.
Running a PHP compatibility check with Upshift
Install Upshift from Plugins > Add New Plugin, go to Tools > PHP Upgrade, choose the PHP version you plan to move to and click Check. It reads every plugin, theme, must-use plugin and drop-in as text, without running any of it, and puts each one in one of four groups:
- Will breakCode that stops working on the new PHP version. Fix these before you switch.
- Ask your hostCode that needs an extension newer PHP no longer includes by default. It works if your host installs it.
- Works, fix laterDeprecated code. It works today but will stop working in a future version.
- ReadyNothing found.
At the top you get a one-sentence answer and a short Do this first list. Open any plugin to see each problem with its file and line, what it means and how to fix it. You can download a CSV, print the report, or copy a plain-text summary to send to your developer or host.
Which problems matter: code that actually runs
This is the part most checkers skip. Turn on Smart results in Upshift's settings and leave it on for a few days. It records which plugin files load on your site and on which kind of page: the front end, admin, login, checkout, cart, shop, product pages and scheduled tasks.
Each problem is then marked with where it runs. A deprecation in your shipping plugin that says Runs on: checkout deserves attention before one in a tool that was "not seen running" for two weeks. It doesn't mean unused code is safe forever. Some code runs once a month. But it tells you where to start.
On one of the shops where I tested Upshift before release, the check found exactly one "will break" problem. It was in a bundled database tool that hadn't run once in twelve days. The busy shipping plugins that ran on every checkout only had "fix later" warnings. That shop could upgrade safely. A plain list of warnings would have said the opposite.
After the switch: watch for new errors
No check is perfect. Some code is built while the site runs, or loaded in unusual ways, and a scan can miss it. That's why the week after the switch matters as much as the check before it.
Upshift's Upgrade guard handles this part. Turn it on a few days before your host changes PHP. It learns how your site normally behaves, notices the PHP change by itself and compares the next seven days with the days before, plugin by plugin. If a plugin starts crashing or showing new errors, it names the plugin and tells you what to do. It can also email you about new crashes, at most once a day.
Without a plugin, you can use the WordPress debug log. Add these lines to wp-config.php, above the line that says "That's all, stop editing":
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
Errors are then written to wp-content/debug.log instead of being shown to visitors. Read it once a day for the first week, and turn it off again afterwards. The log keeps growing, and you'll have to work out by hand which plugin each error belongs to.
What to do if your site breaks after a PHP update
Don't panic. A PHP version change is one of the easiest changes to undo.
- Switch back first. Change PHP back to the old version in your hosting panel, or ask your host to. Your site should work again within a minute. Then fix the cause without customers watching.
- Check your email. When a plugin causes a fatal error, WordPress emails the site admin a "recovery mode" link. It lets you log in and deactivate the plugin that failed.
- No access to the dashboard? Connect with FTP or your host's file manager, go to
wp-content/pluginsand rename the folder of the plugin that failed. WordPress then deactivates it. - Find the plugin. The error message, your debug log or Upshift's Upgrade guard will name the file. Update that plugin, contact its developer or replace it before you try again.
PHP upgrade checklist
Keep this list for the next upgrade. With a new PHP version every year, there will be one.
Everything updated
WordPress, every plugin and your theme, including premium ones that update from their own site.
Fresh backup
Files and database, from today, stored away from your server.
Compatibility checked
No "will break" left in code that runs. Extensions confirmed with your host.
Tested on staging
Main pages, login, forms and, on a shop, a test order.
Monitoring on
Error monitoring started a few days before the switch, so there's something to compare with.
Quiet time and a way back
Switch when traffic is low, and know where the PHP setting is so you can switch back in a minute.
Check your site before your next PHP upgrade
Upshift is free on WordPress.org. It shows what will break on a newer PHP version, which problems run on your important pages, and which plugin fails after the switch.
- Checks plugins and themes against PHP 8.0 to 8.5
- Plain answers, with file, line and how to fix it
- Shows where each problem runs, from checkout to admin
- Watches for new errors for seven days after the switch
- No remote requests, no tracking, no account
Requires WordPress 6.2 and PHP 7.4 or later.
FAQ
Can updating PHP break my WordPress site?
Yes, if a plugin or theme uses code the new PHP version no longer supports. WordPress core itself handles PHP 8.2 to 8.5 fine. That's why you check your plugins and theme before the switch, and watch for errors after it.
Which PHP version should I use for WordPress in 2026?
PHP 8.4 for most sites. It has active support until the end of 2026 and security fixes until the end of 2028. PHP 8.3 is WordPress's recommended minimum. PHP 8.5 is fine if your plugins are ready for it.
Can I update PHP from the WordPress dashboard?
No. WordPress shows your PHP version under Tools > Site Health, but the version is set by your web server. You change it in your hosting control panel, or your host changes it for you.
How do I check if my plugins are compatible with PHP 8.4?
Run a PHP compatibility check against PHP 8.4. It reads the code of every plugin and theme and lists what won't work. Then test on a staging copy, and watch your error log for a week after the switch.
What happens when PHP 8.2 reaches end of life?
From 1 January 2027, PHP 8.2 gets no more security fixes. Your site keeps working, but any new security hole in PHP 8.2 stays open. Many hosts also move sites off end-of-life versions on their own schedule, so it's better to choose the time yourself.
How do I go back to the old PHP version?
Change it back in your hosting control panel, the same way you changed it. Your site should recover within a minute. If you can't reach the panel, ask your host.
Should I move to PHP 8.6 right away?
Not on a live site. Wait until WordPress and your important plugins say they support it, which usually takes a few months after release.
Is Upshift free?
Yes. It's free on WordPress.org and open source. It makes no remote requests, has no tracking and needs no account. Everything stays in your own database.
Muhammad Qasim
WordPress and WooCommerce developer for more than ten years. I build plugins for clients and my own products, including Upshift and Checkout Test Lab.
