Your host has emailed you about a PHP update, or your dashboard shows a "PHP Update Required" warning. You know you should do it, but you've also heard of sites going blank right after the switch. If you need to update PHP in WordPress without breaking your site, this article will help you.
We are here to help you check what's ready, switch safely and recover if something breaks. This guide is based on four threads in the WordPress.org Fixing WordPress forum, WordPress's official PHP compatibility table, php.net, and our tests on the Rahul Vithala test site in WordPress Playground, run on both PHP 7.4 and PHP 8.3 with two harmless test plugins.
Related Articles
- How To Know PHP Version In WordPress
- PHP 8.6 And WordPress: What's New And Should You Upgrade Yet?
- How To Fix "There Has Been A Critical Error On This Website"
Why Your PHP Version Matters
PHP is the language WordPress runs on, and each version only gets security fixes for a few years. When we checked php.net on November 30, 2026, PHP 8.2's security support was ending on December 31, 2026. PHP 8.3 is covered until the end of 2027, 8.4 until 2028 and 8.5 until 2029. Anything older than 8.2 no longer gets security fixes at all.
WordPress recommends PHP 8.3 or newer. It still runs on PHP 7.4, but its requirements page warns that older versions have reached end of life. On our test site, WordPress 7.1.5 running on PHP 7.4 showed this warning on the dashboard:

Step 1: Check Your PHP And WordPress Versions
Go to Tools → Site Health → Info → Server to see your PHP version. Our guide to finding your PHP version shows other ways.
Then check that your WordPress version supports the PHP version you want. WordPress's official compatibility table lists WordPress 7.0 and 7.1 as supporting PHP 7.4 through 8.5. Older versions stop sooner: WordPress 6.2 isn't listed as supporting PHP 8.3, and WordPress 5.8 stops at PHP 8.0.
This matters more than it seems. In one forum thread we covered in our guide to a site broken after an update, an owner's two sites, still on WordPress 5.8, showed only a white page after a PHP change on the host's side. Setting PHP to 7.4 brought them back.
Step 2: Update Your Plugins And Theme First
In one thread, a site owner on PHP 5.6 asked how to move to PHP 8.3. A forum moderator said plugins were the more likely problem and gave this order:
- Make a backup.
- Install all pending plugin and theme updates.
- Upgrade PHP to the newest version your current WordPress supports (see Step 1).
- Run another round of plugin and theme updates, since some need a newer PHP version.
- Update WordPress.
- Check that everything is up to date.
If your WordPress is very old, you may need to go in stages: raise PHP, update WordPress, then raise PHP again.
In another thread, the same moderator suggested looking for plugins that haven't been updated in two or more years, since they may not work with the latest PHP version. Remove them or find a replacement.
What WordPress Checks For You
Plugins can declare the PHP version they need. We added a test plugin that says it needs PHP 8.2 to our PHP 7.4 site, and WordPress refused to activate it:

WordPress's code also blocks plugin updates that need a newer PHP version than yours. It lists them but won't install them. That's why the moderator's step 4 matters: some updates can only be installed after you switch.
What WordPress Can't Check
Many older plugins don't declare a PHP version at all. To see what happens then, we wrote a harmless test plugin with a common piece of old code, create_function(), which PHP 8.0 removed.
On PHP 7.4, the plugin worked, but the debug log had repeated deprecation notices: "Function create_function() is deprecated". On PHP 8.3, the same plugin took down the whole site, including the dashboard, with "There has been a critical error on this website." The log named the cause: "Call to undefined function create_function()".
So before you switch, turn on the debug log on your current PHP version, with WP_DEBUG_DISPLAY set to false so visitors don't see errors, and look for "Deprecated" lines. They can point to plugins likely to break, though a clean log is no guarantee. Turn debugging off when you're done. Our guide to PHP errors in WordPress explains how the debug settings work.
Step 3: Switch PHP In Your Hosting Panel
WordPress itself can't change PHP. It's a server setting, though some hosts add an "Update PHP" button to the dashboard warning that opens their own tool. As a forum moderator explained, it depends on your hosting: your host installs the new PHP packages unless you run the server yourself.
- Shared hosting: a forum member suggested looking for "PHP version" or "MultiPHP Manager" in your control panel, or asking your host's support.
- Staging first: if your host offers a staging copy, switch PHP there and test before touching the live site.
- XAMPP on your computer: a moderator explained that the poster's XAMPP had no update feature for PHP. Back up your
htdocsfolder and export your databases, then install the newest XAMPP package, ideally in a new folder. Our XAMPP guide covers the setup.
After switching, open your site and your dashboard in a private window, and check a few key pages, forms and your checkout if you have one.
If Your Site Breaks After Switching
First, switch PHP back to the old version in your hosting panel. That usually brings the site back, as long as you haven't yet installed updates that need the newer PHP. Then find the cause:
- Read the error log. A moderator said your host's error log shows the cause, and that it's most often a plugin.
- Switch off that plugin by renaming its folder in
wp-content/plugins, as our critical error guide shows. - Check the admin email inbox. On our PHP 8.3 test, the dashboard error page said to check the site admin email inbox for instructions. WordPress tries to email a recovery mode link to that address, at most once a day by default and only if your server can send email. We couldn't test the email itself, because Playground can't send mail.
One thread described a loop: the site needed newer PHP to update WordPress, but newer PHP broke the dashboard. A forum member suggested updating WordPress manually over FTP. The moderator suggested updating plugins on the old PHP first, removing plugins abandoned for two or more years, and checking the error log. The owner had said their plugins were already up to date and deactivating them didn't help, and the thread wasn't resolved.
Common Mistakes To Avoid
- Jumping straight to the newest PHP: make sure your WordPress version supports it first.
- Switching before updating plugins: old plugin code is the most common thing to break.
- Ignoring "Deprecated" notices: in our test, they were the early sign of the fatal error.
- Forgetting the database: a moderator noted that hosts still running very old PHP may also run a very old database version.
Update PHP In WordPress: FAQs
Which PHP version should I use?
WordPress recommends 8.3 or newer. If your WordPress version, theme and plugins all support it, 8.3, 8.4 or 8.5 are good choices, all with security support into 2027 or later.
Can I update PHP from the WordPress dashboard?
Not with WordPress itself. PHP runs on your server, so you change it in your hosting control panel, ask your host, or change it yourself if you run the server. Some hosts add an "Update PHP" button to the dashboard warning that opens their tool.
Will updating PHP make my site faster?
The dashboard warning on our test site said newer PHP versions "may increase your site's performance". The main reason to update, though, is security support.
Final Words
To update PHP in WordPress safely, check your WordPress version against the compatibility table, update your plugins and theme, look for "Deprecated" notices, then switch in your hosting panel and test. If anything breaks, switch back and read the error log. Let us know in the comments which PHP version you moved to.
Sources
We checked these sources for this guide on November 30, 2026:
- PHP Compatibility and WordPress Versions, Make WordPress Core
- Requirements and Update PHP, WordPress.org
- Supported Versions, php.net
- plugin.php and update.php, WordPress on GitHub
- WP 6.2.x & Upgrading from PHP 5.6.x to 8.3, Updating php, Updating PHP 8.5.12 and websites not loading after update, WordPress.org Support




