How to Update the PHP Version in WordPress Safely
Check your PHP version, back up, update plugins, then switch to PHP 8.3 or newer in cPanel without breaking your WordPress site, and fix errors if it does.

Quick answer: Check your current PHP version in Tools → Site Health → Info → Server, take a full backup, update WordPress, your theme and plugins, then switch to a newer PHP version in your hosting panel (cPanel’s MultiPHP Manager or Select PHP Version). Test the site straight away and switch back if anything breaks.
PHP is the programming language WordPress runs on. Your host decides which PHP version your site uses, and many sites are still running an old one simply because nobody changed it. A newer version is faster and, more importantly, still receives security fixes. This guide shows how to update it without breaking your site.
Which PHP version should you use?
WordPress.org recommends that hosts support PHP 8.3 or greater. The WordPress Hosting Team goes further and recommends PHP 8.4 or later for production sites. WordPress itself still runs on PHP 7.4, but versions that have reached end of life no longer get security updates.
| PHP version | Status in late 2026 | What to do |
|---|---|---|
| 7.4 and older | End of life | Update as soon as possible |
| 8.0, 8.1 | End of life | Update |
| 8.2 | Security fixes end on 31 December 2026 | Plan the update now |
| 8.3 | Security support until end of 2027 | Fine for most sites |
| 8.4, 8.5 | Actively supported | Best choice if your plugins support it |
Support dates come from the WordPress Hosting Team’s compatibility pages linked at the end of this guide. Check them again before you update, because they change every year.
Step 1: Check your current PHP version
In your WordPress dashboard, go to Tools → Site Health → Info and open the Server section. The line “PHP version” shows what your site is running. Site Health’s Status tab also warns you if the version is outdated.
Step 2: Back up the whole site
Changing PHP rarely damages data, but an incompatible plugin can make the site show an error. A backup means you can always get back to a working state. Back up both the files and the database, and store a copy outside your hosting account. Our guide on backing up WordPress for free with UpdraftPlus shows how.
Step 3: Update WordPress, your theme and plugins
Most PHP problems come from old plugin or theme code. Before you change PHP:
- Update WordPress core from Dashboard → Updates.
- Update every plugin and theme.
- Delete plugins and themes you are not using. Inactive code can still cause problems later.
- For each important plugin, open its page on WordPress.org and check “Tested up to” and the date it was last updated. A plugin that has not been updated for two years or more is a warning sign.
Step 4: Test on a staging copy if you can
If your host offers a one-click staging site, create one, change its PHP version first and click through the important pages: the home page, a post, the contact form and any checkout. If you don’t have staging, do the update at a quiet time of day and keep the hosting panel open so you can switch back quickly.
Step 5: Change the PHP version in your hosting panel
The exact screen depends on the host. These are the two common ones in cPanel:
MultiPHP Manager
In cPanel, open MultiPHP Manager, tick your domain, choose the new version from the drop-down at the top right and click Apply.
Select PHP Version (CloudLinux hosts)
Some hosts show Select PHP Version instead. Choose the version from the “Current PHP version” drop-down and click Set as current. Keep the default extensions unless your host or a plugin tells you otherwise.
Other dashboards
hPanel, Plesk and managed WordPress hosts have a similar PHP setting, usually under “Advanced” or “PHP configuration”. Search the host’s help pages for “change PHP version”.
Multiple sites on one account: in MultiPHP Manager each domain can have its own version. Change only the site you have backed up and tested.
Step 6: Test the site immediately
- Open the home page and a few posts in a private browser window.
- Log in to the dashboard and open the plugins page.
- Submit your contact form and check that the email arrives.
- Go back to Tools → Site Health → Info → Server and confirm the new version is shown.
If you see “There has been a critical error on this website”, switch the PHP version back in the hosting panel first. The site should recover within a minute. Then find the plugin causing it using our guide to fixing the critical error message.
Step 7: Find the plugin that is not compatible
To see exactly what failed, turn on the error log. In wp-config.php, above the line that says “That’s all, stop editing!”, add:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
Switch to the new PHP version again, load the page that broke, then open wp-content/debug.log in File Manager. The error usually names the plugin folder, for example /plugins/old-slider/. Update or replace that plugin, then set WP_DEBUG back to false.
Frequently asked questions
Will updating PHP delete my posts?
No. Your posts, pages and settings are in the database, which a PHP update does not change. The risk is that an old plugin stops working, which you can fix by switching back.
Can I go back to the old PHP version?
Yes. Choose the old version in the same hosting screen. Do this only as a temporary fix while you replace the incompatible plugin, because old versions stop receiving security updates.
Does a newer PHP version make WordPress faster?
Usually yes. Each major PHP release has brought performance improvements, and moving from an old 7.x version to 8.x is often noticeable. Combine it with caching for the best result; see our speed guide.
I don’t see a PHP option in my hosting panel. What now?
Some hosts manage PHP for you. Contact their support and ask them to move your site to PHP 8.3 or newer.
Sources
- WordPress requirements (WordPress.org)
- Server environment recommendations (WordPress Hosting Team)
- PHP and database compatibility by WordPress version (WordPress Hosting Team)