Skip to content
Technology for businesses since 2008

Help center · WordPress

How to update PHP on a WordPress site in cPanel without breaking it

To update the PHP version of a WordPress site, check the current version under Tools > Site Health, make a backup, confirm that your theme and plugins are compatible, and change the version in cPanel, under Select PHP Version or MultiPHP Manager, depending on your panel. Then open the site and the WordPress dashboard to test it. If something breaks, just choose the previous version in the same place.

This article is for anyone who manages a WordPress site on cPanel hosting and wants to move off an old PHP version without taking the site down. It covers why to update, how to check compatibility, how to change the version, how to test it, and what to do if the site breaks.

Why update the PHP version?

PHP is the programming language that WordPress, themes, and plugins are written in. Each version has a support period: after it ends, it stops receiving fixes, including security fixes. Running a site on an unsupported version increases the risk, and WordPress itself warns you in Site Health when the version in use is out of date.

There are other practical reasons:

  • New plugins and themes may require a minimum PHP version and stop working on older ones.
  • Newer versions tend to be faster, although the gain depends on the site.
  • WordPress defines a minimum and a recommended PHP version, and these change over time.

To find out which versions PHP still maintains, check the supported versions page on php.net. It is the right source, because the list changes every year.

How to check the current PHP version in WordPress

  1. Log in to the WordPress dashboard.
  2. Go to Tools > Site Health.
  3. Open the Info tab.
  4. Expand the Server section and look for the PHP version line.

On the Status tab, WordPress also shows an alert when the PHP version is out of date. If the dashboard does not open, you can see the version in cPanel itself, in the PHP version selector.

Before switching: what to prepare

Changing PHP does not alter your files, but it can make a plugin or theme stop working. So:

  1. Back up the files and the database. See how to back up WordPress.
  2. Note the current PHP version, so you can go back to it if you need to.
  3. Choose a quiet time, especially if the site is a store.
  4. Update WordPress, the theme, and the plugins first, following how to update WordPress, themes, and plugins safely. New plugin versions often fix incompatibilities.

How to check plugin and theme compatibility

No check can guarantee 100% compatibility, so combine these verifications:

What to check Where to look
PHP version required by the plugin or theme The plugin’s page on wordpress.org (requirements field) and the theme’s documentation
Plugins that have not been updated in a long time The Plugins tab in the dashboard and the plugin’s page on wordpress.org
Warnings about incompatible plugins Tools > Site Health and the Plugins screen
PHP errors already logged The error_log file in the File Manager, or the Errors option in cPanel

Abandoned plugins and themes are the ones that break most often. If one has not received an update in years, look for a replacement before raising the PHP version.

How to change the PHP version in cPanel

The name of the tool changes depending on the hosting panel. The general steps are these:

  1. Log in to cPanel.
  2. In the Software section, open Select PHP Version or MultiPHP Manager.
  3. Choose the site’s domain. In MultiPHP Manager, check the domain in the list. In the version selector, the choice applies to the account or to the domain, depending on the panel.
  4. Select the new PHP version.
  5. Apply the change with the button the panel offers, such as Apply or Set as current.

If your panel has none of these tools, ask your hosting provider’s support to make the change. For a more detailed walkthrough of the selector, see how to change the PHP version in cPanel.

Upgrade one version at a time instead of skipping several at once. That way, if something breaks, it is clear that the cause is that specific change.

How to test the site after the change

  1. Open the homepage and a few inner pages in an incognito window.
  2. Log in to the WordPress dashboard and open Tools > Site Health, to confirm that the new version appears under Info > Server.
  3. Test what is critical: contact forms, the cart and checkout, login, and file uploads.
  4. Check the cPanel error log. Warning messages (Deprecated or Warning) indicate old code that still works but should be updated. Fatal errors (Fatal error) require action.

What to do if the site breaks

If the site shows a 500 error, a white screen, or a critical error message after the change:

  1. Go back to Select PHP Version or MultiPHP Manager and choose the version you noted earlier.
  2. Apply the change and open the site. In most cases it comes back right away.
  3. Read the error log to find out which plugin or theme caused the problem.
  4. Update or replace that item, and only then try raising the version again.

If the site still does not come back, follow the steps in 500 error or white screen in WordPress. If nothing works, restore the backup you made before.

Frequently asked questions

Which PHP version should I use with WordPress?

Use a version that still receives PHP support and is compatible with your WordPress version, theme, and plugins. The list of supported versions changes every year, so check php.net and Site Health, which also shows the version recommended by WordPress.

Will updating PHP delete my site or my data?

No. Changing the PHP version does not delete files or the database. The risk is that an incompatible plugin or theme stops working, which is why a backup before the change is recommended.

How do I know which PHP version my WordPress site is using?

Go to Tools > Site Health, open the Info tab, and expand Server. The PHP version line shows the version in use. You can also see it in the PHP version selector in cPanel.

Can I test the new PHP version without affecting the live site?

The safest way is to test on a copy of the site, on a subdomain, with the new PHP version. If that is not possible, make the switch during a low-traffic period, with a backup, and be ready to go back to the previous version.

What are the “Deprecated” warnings in the error log?

They are warnings that the code uses a PHP feature that will be removed in the future. The site usually keeps working, but the plugin or theme should be updated. If the warning appears for an item that is no longer maintained, consider replacing it.

The site broke after the change. How do I roll back?

Open Select PHP Version or MultiPHP Manager in cPanel again and select the version the site used before. Apply the change and reload the site. Then use the error log to find which item is incompatible.

Do I need to update PHP for every site on the account?

It depends on the panel. In many cases the version is set per domain, so each site has its own; in others, it applies to the whole account. Check how your panel applies the change before switching, so you do not affect a site that has not been tested yet.

Who can do this for me if I don’t feel confident?

If the site is important and you would rather not touch it, contact MigraCloud and ask for help planning the switch, with a backup and testing.

More on WordPress

See all →

Help center

Looking for something else?

See all tutorials, organized by topic.