Home / Guides

Server guide

Upgrade PHP on cPanel and WordPress without breaking the site

An old PHP version stops getting security fixes, and a rushed upgrade can break a site. Test on one domain, then move the rest.

2 min readUpdated November 2026 by the RootManage teamWorks on Ubuntu, Debian, AlmaLinux and Rocky unless noted

The short answer

Check which versions are supported, test the new version on one domain, read the error log, fix or replace what breaks, then move the rest and keep the old version until you are sure.

Know where you are

Check which PHP versions are still supported at php.net, and what each site uses now. In WHM, open MultiPHP Manager to see the version of every domain.

Back up and make a test copy

Take a backup. Better, clone the site to a test subdomain and try the new version there first.

Check compatibility

  • Update WordPress, the theme and every plugin first. Old ones are the usual problem.
  • Look for plugins that have not been updated for years. Replace them.
  • For custom code, search for removed or changed functions in the PHP migration guides.

Switch one domain

In MultiPHP Manager, change the version for one domain only. Open the site, the admin area, a form, checkout and a cron-run task. Read the error log of the account.

Read the logs

terminal
tail -n 50 /home/USERNAME/logs/*error*
tail -n 50 /home/USERNAME/public_html/error_log

Deprecation notices are warnings to fix later. Fatal errors need a fix or a rollback.

Roll out and clean up

  • Move the other domains one by one.
  • Keep the old PHP version installed for a short time as a way back.
  • Remove versions you no longer use, and set the server default to a supported one.

Questions people ask

Will WordPress work on the newest PHP?

Core usually does. Plugins and themes decide. Test with your own set.

Can I run different versions for different sites?

Yes. MultiPHP Manager sets a version per domain.

The site shows a white screen after the change. What now?

Switch back to the old version, read the error log, fix the cause, and try again.

Want a person to look at it?

Tell us what you see. We reply with what we think is wrong and what it would take to fix it.