Skip to content

Upgrade WordPress to PHP 8.3 Safely: Step-by-Step Guide

Upgrade WordPress to PHP 8.3 Safely: Step-by-Step Guide
Upgrade WordPress from PHP 7.4 or 8.1 to PHP 8.3 without breaking your site

Why now? The PHP2Shell flaws (CVE-2026-109618 and CVE-2026-109619) were fixed on October 21, 2026, and old PHP branches get no official fix. Read the main PHP2Shell guide
The short version
  1. Back up files and database, and keep a copy off the server.
  2. Update WordPress core, theme and plugins first, and replace any plugin that is abandoned.
  3. Test PHP 8.3 on a staging copy, then switch the live site and check the error log.

Many WordPress sites stay on PHP 7.4 or 8.1 for one reason: someone is afraid an old plugin will break. That fear is fair, but staying on old PHP is now the bigger risk. The official PHP fixes for PHP2Shell cover 8.5.12, 8.4.27, 8.3.36 and 8.2.35, while 8.1 and older get no official release. This guide shows a safe, beginner-friendly way to move to PHP 8.3 and roll back quickly if something goes wrong.

Which PHP version should you move to?

Your PHP nowStatusWhat to do
8.4 or 8.5Fixed release existsStay, and update to 8.4.27 or 8.5.12 (or newer).
8.3Fixed release existsGood target. Make sure you are on 8.3.36 or newer.
8.2Ends Dec 31, 2026Patch to 8.2.35 now, then plan the move to 8.3 or 8.4.
8.1, 8.0, 7.4No official releaseOnly a vendor or host backport helps. Upgrade to 8.3 or newer.
7.3 and olderNo fixUpgrade as soon as possible. Do it in steps with a staging copy.

A panel label such as “PHP 8.3” does not show the patch level. Ask your host to confirm the PHP2Shell fix is installed, and double-check support dates on php.net before you plan.

The safe upgrade order

Safe upgrade order: 1 Back up, 2 Update, 3 Replace, 4 Switch PHP, 5 Test, 6 Go live
Update WordPress and plugins first, then switch PHP. Doing it the other way round is what causes most breakage.

Step-by-step

Step 1 · 5 min
Find your versions

WordPress: Tools → Site Health → Info → Server shows your PHP version. Note your WordPress, theme and plugin versions too.

wp core version
php -v
wp plugin list --fields=name,status,version,update_version
Step 2 · 10 min
Back up files and database

Use your host’s one-click snapshot or a backup plugin, and keep a copy off the server. With WP-CLI you can also export the database:

wp db export before-php-upgrade.sql

A backup you have never restored is only a hope, so try restoring it on a staging copy.

Step 3 · 15 min
Check plugin compatibility

For each plugin, open its WordPress.org page and check three fields:

  • Last updated: no update in about two years usually means abandoned (rule of thumb).
  • Tested up to: should match a recent WordPress version.
  • Requires PHP: must not demand something older than 8.3.

Pay extra attention to login and security plugins and backup or database plugins, because a break there can lock you out or stop your backups. Also search each one in the Patchstack or Wordfence vulnerability database.

Step 4 · 10 min
Update core, theme and plugins
wp core update
wp plugin update --all
wp theme update --all

Delete plugins and themes you do not use. Replace anything abandoned with a maintained alternative before you touch PHP.

Step 5 · 15 min
Test PHP 8.3 on staging first

Most good hosts offer a one-click staging copy. If yours does not, use a subdomain clone. On the staging copy, switch PHP to 8.3 (or 8.4) and turn on logging by adding this to wp-config.php:

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);

Then visit the homepage, a post, the login page, search, contact forms and (for stores) the cart and checkout. Errors go to wp-content/debug.log. Remove the debug lines when you are done.

Step 6 · 5 min
Switch the live site
  • Shared hosting: pick PHP 8.3 or 8.4 in cPanel MultiPHP Manager, Plesk or your host’s dashboard. The switch also restarts PHP for your site.
  • VPS: update packages, then restart PHP-FPM (or Apache with mod_php).
  • Docker: use a fixed tag such as php:8.4.27-fpm and rebuild.
sudo systemctl restart php8.3-fpm

Do the switch at a quiet time of day, and keep the panel open so you can change back.

Step 7 · 10 min
Verify and test again

Check Tools → Site Health for the new version, then repeat your checks: login (including 2FA and social login), forms, checkout, scheduled backups. Read the PHP error log for new warnings. Finally, ask your host to confirm the PHP2Shell patch is installed, since the version label alone does not prove it.

Fix common errors after the upgrade

What you seeLikely causeFix
White screen or “critical error” messageA plugin or theme does not support the new PHPRead debug.log for the file name. Rename that plugin’s folder in wp-content/plugins through File Manager or FTP to switch it off.
Locked out of wp-adminA login or security plugin brokeRename its folder the same way, log in, then update or replace it.
“Deprecated” warnings in the logOld code that still works for nowNot urgent. Tell the plugin author, or plan a replacement.
Checkout or payment failsOld payment, shipping or courier pluginUpdate it, ask the developer for a PHP 8.3+ release, or roll back PHP and replace it.
Backups stopped workingOld backup pluginUpdate or replace it, and test a new backup and restore.
Rollback plan
If you cannot fix it quickly
  1. Switch PHP back to the previous version in your panel.
  2. Confirm the site works again.
  3. Fix the plugin on staging.
  4. Try the upgrade again.

Going back is only a short break. If you must stay on old PHP for a while, ask your host about a vendor-patched build and keep a firewall such as Cloudflare in front of the site.

After upgrading
Do not forget secrets

If your site ran unpatched PHP on or after October 21, treat passwords and keys as possibly exposed. Change WordPress admin, hosting, SFTP and database passwords, refresh the security salts, and rotate payment and API keys. Full list in the main PHP2Shell guide.

Frequently asked questions

Will PHP 8.3 break my site?

Only if something on it is old. Well-maintained themes and plugins usually work. That is why you update first and test on staging before touching the live site.

Can I skip straight from 7.4 to 8.3?

You can, but test carefully, because old code has had more time to break. Use a staging copy, and if it fails, try 8.2 as a stop on the way, then move on.

Is 8.3 or 8.4 better?

Both have fixed releases (8.3.36 and 8.4.27). 8.4 lasts longer, 8.3 is more widely compatible. Pick the newest one your plugins handle on staging.

Does upgrading PHP alone make my site safe?

It closes the PHP2Shell hole only if the build is the patched one. You still need to update plugins, use two-factor login and keep backups.

My host only offers old PHP.

Ask for a vendor-patched package in writing. If they cannot provide one, move to a host that supports current PHP.

Next, read the full PHP2Shell protection guide for host status, the 12-point checklist and what to do if you were already hit.

This guide is general information, not a security audit. For business-critical or breached sites, involve your host or a security professional.

Written by

MNM is a blogging expert with over 10 years of experience. Since 2020, he has been a top destination for bloggers to find tips and growth strategies for their blogs. The content created by MNM is clear and of high quality, especially for those who want to begin their blogging journey.

Share X Facebook