Skip to content

WordPress critical error after PHP update: how to fix it calmly

That critical error after a PHP update is usually one plugin or theme. Here's how to get the site back up safely, find the culprit and stop it happening again.

Seeing "There has been a critical error on this website" right after your host changed the PHP version? That's the classic WordPress critical error after PHP update, and it almost always means one plugin, theme or piece of custom code uses PHP that the new version no longer accepts. PHP stops with a fatal error, and WordPress shows that message instead of your page. Your posts, pages, orders and settings are still safe in the database.

The calm way out has 3 parts. Get the site back up with the recovery mode email WordPress sends, or by switching PHP back in your hosting panel. Find the plugin or theme that failed. Then update or replace it and move PHP forward again.

Do this in 5 minutes: search the inbox of your site's admin email for "Your Site is Experiencing a Technical Issue", and check spam too. If the email is there, it names the plugin or theme that failed and gives you a login link that gets you past the error.

WordPress critical error after PHP update: what it means

PHP is the programming language WordPress is written in. Your host runs it and lets you choose the version. Each new version removes or tightens some older features, so code that worked yesterday can stop today.

Since WordPress 5.2, fatal error protection catches these errors and shows a message instead of a blank white page. Visitors see "There has been a critical error on this website." On the login page or dashboard, it adds "Please check your site admin email inbox for instructions." WordPress's Common WordPress errors guide lists the usual causes:

  • A plugin conflict
  • A theme compatibility issue
  • An incompatible PHP version
  • Hitting the PHP memory limit
  • Corrupted WordPress files

When the error appears minutes after a PHP change, the new version is rarely the real problem. One plugin or theme just isn't ready for it. That's good news: you don't need to rebuild anything, you need to find one folder.

Start with the recovery mode email

When a plugin or theme causes a fatal error, WordPress emails the site's admin address with a secret recovery link. The subject line reads "[Your site name] Your Site is Experiencing a Technical Issue", and the email says whether WordPress caught the error in one of your plugins or in your theme, and names it.

  1. Open the email and click the recovery mode link.
  2. Log in with an administrator account.
  3. WordPress pauses the plugin or theme that caused the error. Check the Plugins and Themes screens to see which one.
  4. Deactivate that plugin, or switch to another theme. This is the step that fixes the site for visitors.
  5. Open your homepage in a private browser window to confirm it loads.

Step 4 matters. Recovery mode pauses the broken plugin only for you, the person in recovery mode. WordPress's developers say the pause "does not have any global implications", so visitors keep seeing the error until you deactivate, update or replace the plugin.

No email? Check spam, then check where it went. It goes to the Administration Email Address under Settings > General, and WordPress's Settings documentation advises sites set up by a developer or agency to make sure that address is one your business can access. By default WordPress sends this email at most once a day, so don't wait for another one.

Not sure what is costing you leads?

Send your website and we will record a free 2 minute video showing the 3 fixes we would make first.

Get my free video audit

Get the site back up: switch PHP back, safely

If recovery mode isn't an option, the quickest fix is to switch PHP back to the version you had before, on the same panel screen you used to change it. Our guide on how to update PHP version in WordPress shows where that setting lives in cPanel, Hostinger, Plesk, SiteGround and Bluehost.

One rule before you click: the version you go back to must still be supported and patched. On October 21, 2026, PHP released fixes for 2 critical remote code execution flaws, CVE-2026-109618 and CVE-2026-109619, known as php2shell. According to the php.net security advisory, the fixed versions are:

  • PHP 8.5.12 or later
  • PHP 8.4.27 or later
  • PHP 8.3.36 or later
  • PHP 8.2.35 or later

The same advisory says PHP 8.1 and older no longer receive updates from the PHP project. If your site ran 8.1 or 7.4 before, don't go back there: fix the plugin instead, or ask your host for help. After any switch, check the full version number in Tools > Site Health > Info > Server.

Treat a rollback as breathing room, not the fix. php.net's supported versions page shows PHP 8.2 gets security fixes only until December 31, 2026 (more in our post on PHP 8.2 end of life). Some hosts also limit how far back you can go, so if your old version isn't in the menu, ask support.

Find the cause: error logs and the debug log

If you didn't get the email, the error log tells you exactly which file failed.

Check your host's error log

Look in your hosting panel first. In cPanel, the Errors page under Metrics shows the 300 most recent web server error log entries. Depending on how your host runs PHP, PHP errors may be logged elsewhere, so if you can't find them, ask your host or use the WordPress debug log below.

Turn on the WordPress debug log

WordPress can write every error to a file. Open wp-config.php in your site's main folder using your host's File Manager or an FTP app, and add these 3 lines above the comment that tells you to stop editing:

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

These come from WordPress's Debugging in WordPress guide. The first turns on debug mode, the second saves errors to wp-content/debug.log, and the third keeps them off the screen. Reload the broken page once, open debug.log and search for "PHP Fatal error". The file path on that line names the culprit: wp-content/plugins/ plus a folder name means a plugin, wp-content/themes/ means a theme.

When you're done, remove the 3 lines and delete debug.log, since the same guide says debug tools are not recommended on live sites.

Deactivate plugins or the theme without the dashboard

If you can't log in at all, deactivate plugins from File Manager or FTP. WordPress's troubleshooting FAQ describes this method:

  1. In wp-content, rename the plugins folder to plugins.hold. This disables every plugin but keeps their settings.
  2. Log in at yoursite.com/wp-admin/plugins.php. WordPress shows a message that the plugins are missing.
  3. Rename plugins.hold back to plugins. Every plugin now shows as deactivated.
  4. Reactivate them one at a time, checking the site after each. The one that brings the error back is your culprit.

If the log already named the plugin, rename only that plugin's folder, for example old-slider to old-slider-off. If the theme is the problem, rename the active theme's folder inside wp-content/themes. When the active theme's files are missing, WordPress switches to a default theme if one is installed, so keep one on every site.

Common causes and the fix for each

Once you know which plugin or theme failed, the fix usually follows one of these patterns.

SymptomLikely causeFix
Email or log names a plugin you haven't updated in monthsOutdated pluginUpdate it. If no update exists, replace it with a maintained plugin.
Error names a paid add-on for a page builder, form or store pluginAdd-on and main plugin out of step, often after a license lapsedRenew or log in to the vendor account, then update the add-on and main plugin together
Log path points to wp-content/themes/Old theme or child theme codeUpdate the theme, or use a default theme until it's fixed
Log says "Call to undefined function"Code calling a function PHP removedUpdate the plugin, or have a developer rewrite custom code
Log says "Allowed memory size exhausted"PHP memory limit reachedRaise the memory limit in your host's PHP settings, or ask your host
Same error after switching PHP backSomething else changed, such as an automatic updateRestore your latest backup, then investigate

The usual suspect is code that hasn't kept up. PHP 8.0, for example, removed functions older plugins relied on, including create_function() and each(), according to php.net's PHP 8.0 migration notes, and code that calls a removed function stops with a fatal error. Maintained plugins have already adapted, so updating usually solves it. Premium add-ons update through the vendor, often only while your license is active, so update the add-on and its main plugin together. Custom snippets in a child theme's functions.php or in wp-content/mu-plugins never update themselves and need rewriting.

When to call a developer

Owner-level steps fix most cases. Bring in a developer, or a team that builds and maintains WordPress sites, when:

  • The log points to custom code, a child theme or mu-plugins
  • The failing plugin has no update and no clear replacement
  • The error persists with every plugin deactivated and a default theme active
  • Your old PHP version was 8.1 or older, so rolling back isn't safe
  • You see anything else odd, like admin users you don't recognize
For your developer or host: reproduce the error on staging with WP_DEBUG_LOG on, and clear the deprecation notices too, since deprecated features are the ones later PHP versions remove. Confirm the server runs a patched build (8.2.35, 8.3.36, 8.4.27, 8.5.12 or later) and restart PHP-FPM or the web server after package updates so running workers load it.

How to prevent it next time

A PHP update shouldn't be a gamble. Before the next one:

  1. Back up files and the database, or confirm your host's latest backup exists and you know how to restore it.
  2. Update in order. WordPress first, then your theme and plugins, including premium add-ons. Check the site. Only then change PHP.
  3. Test on staging if your host offers it: switch the staging copy's PHP version and click through it.
  4. Retire stale plugins. Each plugin's WordPress.org page shows when it was last updated. One untouched for years is the likeliest to break.
  5. Check the admin email address so the recovery email reaches someone who reads it.
  6. Write down your current PHP version so you know what to switch back to.
  7. Switch at a quiet time and test your forms, phone links and checkout straight after.

What to do next

If your site is down right now, start with the recovery email, or roll back to a patched PHP version. Once it's back, find the failing plugin and fix it properly so you can move forward to a supported version.

If you'd like a second pair of eyes first, send us your site and we'll record a free 2 minute video audit showing the 3 fixes we'd make first.

Common questions

Will switching PHP back fix the critical error?

Usually, yes, if the error started right after the PHP change, because the plugin or theme that broke still works on the older version. Only go back to a version that's still supported and patched, such as PHP 8.2.35, 8.3.36, 8.4.27 or 8.5.12 or later, never 8.1 or older. Then fix the plugin, because PHP 8.2 support ends on December 31, 2026.

What if I didn't get the recovery mode email?

Check your spam folder, then check which address WordPress uses: the Administration Email Address in your General settings. If someone else set up the site, the email may have gone to them. WordPress sends this email at most once a day by default, so don't wait for another. Use your host's error log or the WordPress debug log to find the plugin instead.

Is my content lost when WordPress shows a critical error?

No. The critical error means PHP stopped while building the page, not that anything was deleted. Your posts, pages, products, orders and settings live in the database and stay there. Once you deactivate or fix the plugin or theme that failed, or switch PHP back, the site loads normally again. Still, take a backup before you change anything else.

How do I know which plugin caused the critical error?

The quickest clue is the recovery mode email, which names the plugin or theme WordPress caught. If you don't have it, turn on the WordPress debug log and search wp-content/debug.log for "PHP Fatal error". The file path on that line, such as wp-content/plugins/plugin-name, tells you which one failed. Deactivate that plugin first, then check the site.

Can I just stay on the older PHP version?

Only for a short while. Each PHP version gets security fixes for a fixed period, then none. PHP 8.2 stops receiving security fixes on December 31, 2026, and PHP 8.1 and older already get no updates from the PHP project. Staying behind leaves known security holes open, so treat a rollback as time to fix the plugin, not a permanent setting.

Get your free video audit

The 3 fixes we'd make first on your site, within 1 business day.

Send my website
Free video auditWhatsApp