WordPress: change the PHP version without breaking the site

How to move WordPress to PHP 8.4 safely: backup, staging, plugin updates, the switch in cPanel, CloudLinux or Plesk, a check afterwards and a clear way back.

Which version to pick

Pick the newest branch that your plugins and theme run on. We recommend PHP 8.4: upstream supports it until 31 December 2028 and most hosts offer it. See the upgrade guide. 8.3 is a sound second choice, supported until 31 December 2027.

Whatever branch you pick, the build must be a fixed one: 8.5.12, 8.4.27, 8.3.36 or 8.2.35, or newer. We do not recommend 8.2. Upstream support ends on 31 December 2026, so you would have to move again within weeks.

Picking a branch in a panel does not always get you the latest build. Check the result afterwards as described below.

Before you switch

  1. Take a full backup. Files and database, through your host or a backup plugin. Download it and confirm it opens. WordPress describes the steps in its backup guide.
  2. Update everything. WordPress core, your theme and every plugin. Old plugin code is the most common reason a site breaks after a PHP jump.
  3. Remove what you do not use. Deactivate and delete unused plugins and themes. Every plugin you remove is one less thing that can fail.
  4. Find abandoned plugins. A plugin with no update in years is the likeliest to fail on 8.4. Replace it before the switch.
  5. Use staging if you have it. Many hosts offer a copy of the site. Switch there first, click through the site, then switch production.

If you are on PHP 7.4 or 8.0, the jump is large. Read PHP 7.4 to 8.4 first. From 8.1 or 8.2 the gap is smaller: 8.1 to 8.4 and 8.2 to 8.4.

Make the switch

Menu names vary by version and host. Your host may rename or restrict these screens.

cPanel: MultiPHP Manager

  1. Open Software > MultiPHP Manager.
  2. Tick the domain.
  3. Choose the PHP version in the dropdown, for example ea-php84.
  4. Click Apply.

cPanel with CloudLinux: Select PHP Version

  1. Open Software > Select PHP Version.
  2. Choose the version in the selector at the top.
  3. Click Set as current.
  4. Check the Extensions list. Tick the ones WordPress and your plugins need, such as mysqli, curl, mbstring, gd and zip.

A fixed alt-php build may not exist yet for every branch. CloudLinux said on 21 October that builds were still being prepared. See CloudLinux.

Plesk

  1. Go to Websites & Domains and open the domain.
  2. Open PHP Settings.
  3. Choose the PHP version, and prefer a PHP-FPM handler over an Apache module.
  4. Click OK.

Plesk says Linux fixes exist for its PHP 8.2 to 8.5 builds. Details are on the Plesk page.

Other hosts

Look for "PHP version" or "PHP settings" in the panel. Host-specific paths and what each host has said are on the hosts page. If a panel lets you pick between mod_php (the "Apache module") and FPM, pick FPM. Of the affected SAPIs, mod_php is the highest risk.

Check the result

  1. Load the home page, a few inner pages, the login screen and any form. For a shop, go through checkout up to the payment page.
  2. Open Tools > Site Health > Info > Server in WordPress. The PHP version must be the new branch, and the build must be a fixed one. How to read it: check your PHP version.
  3. If the branch is right but the build is older than 8.4.27 (or 8.3.36), ask your host whether the fix is installed and the workers restarted.
  4. Watch the site for a few days. Scheduled jobs and rare pages fail later than the home page does.

Rollback plan

White screen or critical error

Switch the panel back to the old version and the site runs as it did before. Look for the cause on a staging copy while the live site keeps running.

To find the cause, turn on logging on the staging copy in wp-config.php:

// wp-config.php, for debugging only. Remove afterwards.
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );

Repeat the switch there and read wp-content/debug.log. It names the plugin or theme file that fails. Update that plugin or theme, replace it, or ask its author for a fix.

Treat the old version as a way back for hours or days. As long as it runs, the site stays exposed. Set a date for the second attempt. If you cannot get off an old branch, read cannot upgrade yet.

If your host offers nothing newer

Then the options are a different plan or a different host. If your host only offers PHP 8.1 or older, ask whether it patches those packages itself. The questions are in which situation you are in, and recommendations lists where to turn when a guide is not enough.

Last reviewed on 22 October 2026.