Update PHP version in WordPress safely: backup, test, change, verify
|

How to Update PHP Version in WordPress Safely (Step by Step)

Your WordPress dashboard says “PHP Update Required”, or a plugin refuses to install because your PHP is too old. Updating PHP is usually quick, but it is also one of the few changes that can take a working site down in a second, because every plugin and theme you run has to cope with the new version. This guide is a safe order of steps: check, back up, test, change, verify, and a way back if something breaks.

Facts and version dates below were checked against the sources linked in each section on 28 October 2026. PHP support dates change, so re-check the PHP supported versions page before you choose.

Step 1: find out which PHP version you are running now

In the WordPress dashboard go to Tools, Site Health, open the Info tab, expand Server and read the PHP version line. WordPress’s own “Update PHP” guide uses exactly this path.

That number is the one that matters: it is the PHP that serves your website. Do not rely on php -v from an SSH session. The command line can use a different PHP than the web server, and on some hosts the two differ on purpose. See which PHP setting wins on cPanel for how that happens.

Step 2: choose a target version

WordPress’s requirements page recommends PHP 8.3 or greater. It also says WordPress works with PHP 7.4 and above, but warns that older versions have reached end of life and “may expose your site to security vulnerabilities”. The PHP project’s own support table shows which branches still get fixes (dates as shown there on 27 October 2026):

PHP branch Active support until Security fixes until
8.2 31 Dec 2024 31 Dec 2026
8.3 31 Dec 2025 31 Dec 2027
8.4 31 Dec 2026 31 Dec 2028
8.5 31 Dec 2027 31 Dec 2029

A newer branch gives you a longer period of security fixes, but the newest version is not automatically the best choice for your site: your plugins and theme have to support it. A sensible rule is to pick a branch that WordPress core, all your plugins and your theme support, that your host offers, and that still receives security fixes from PHP, preferably the 8.3 or greater that WordPress recommends. If a plugin you depend on has not been updated for a long time, that is the thing to fix first.

Step 3: back up before you change anything

WordPress’s guide says a backup “will let you revert your site to how it is right now in the event anything goes wrong”. Take a full backup of the files and the database, and check that you can download it. A backup that sits only on the server you are about to change is not much protection.

Step 4: update WordPress, plugins and themes first

Update WordPress core, your plugins and your theme to the latest versions that your current PHP supports, then confirm the site still works. Newer releases are often the ones that add support for newer PHP versions, so this step removes many problems before you start. If an update asks for a newer PHP than you have, that is a sign to plan the PHP upgrade together with that update and test both on a staging copy.

Step 5: check compatibility

WordPress’s guide suggests the PHP Compatibility Checker plugin to scan your code for problems with a newer PHP, and it says the plugin “isn’t perfect” and can miss items or flag false positives. Treat its report as a list of things to look at, not a guarantee either way. If something is flagged, contact the plugin or theme author, and if they do not respond, look for a maintained alternative.

If your host or setup allows it, test the new PHP version on a staging copy of the site first. The WordPress guide does not mention staging. I recommend it as an extra step, because it lets you see real errors away from the live site (a local copy of the site works too).

Step 6: change the PHP version

PHP runs on the server, so the change is made in your hosting control panel, or by your host’s support team. The steps differ between hosts. WordPress’s guide tells you to ask your host if you cannot find the setting, and it offers a template message for that request. On cPanel hosting, see how to change the PHP version in cPanel.

If your host does not offer a newer PHP at all, ask them when it will be available. If the answer is never, that is a good reason to move to a host that does.

Step 7: verify the site

  1. Reload Tools, Site Health, Info, Server and confirm the PHP version really changed.
  2. Visit the home page, a post, the login page and any page with a form or checkout.
  3. Check the Site Health “Status” tab for new warnings.
  4. If the old version still shows after you changed it, one possibility is that a setting closer to your site overrides the control panel. Others are that the change was not applied, or was made for a different domain. See which PHP setting wins on cPanel.

If something breaks: roll back

WordPress’s guide says that if something goes wrong you can change the PHP version back yourself, or ask your host to restore the previous version, and then restore your backup if the site is still damaged. Rolling back the PHP version first usually brings a broken site straight back, which gives you time to find the plugin that does not support the new version.

Checklist

  1. Read the current PHP version in Site Health.
  2. Pick a target that your plugins, theme and host all support. WordPress recommends 8.3 or greater.
  3. Take a full backup and confirm you can download it.
  4. Update WordPress, plugins and theme.
  5. Run a compatibility check, and test on staging if you can.
  6. Change the PHP version in the host’s control panel, or ask the host.
  7. Confirm the new version in Site Health and test the key pages.
  8. If the site breaks, set the previous PHP version back, then restore the backup if needed.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *