Lorixen.
EN

WordPress critical error after an update: a recovery order

Short answer: A blank page or the message "There has been a critical error on this website" after an update almost always means one piece of PHP code has stopped WordPress from loading. Work in a fixed order: check the admin inbox for the recovery-mode email, read the debug log, switch off plugins, fall back to a default theme, then look at memory and PHP version. Most sites are back up within the first three steps.

A broken site at 9 pm on a Friday feels like a disaster, but the fix is usually small. The trick is not to try everything at once. Change one thing, reload the site, and note what happened. That way you know which change fixed it, and you can tell your developer or host exactly what you saw.

Before you touch any files, take a copy. Your hosting control panel almost certainly has a backup or download option; use it, even if the site is already broken.

Step 1: Look for the recovery-mode email

When WordPress hits a fatal error, it shows visitors a short error screen and, in many cases, emails the site's admin address. That email names the plugin or theme that crashed and includes a secret link to recovery mode. The WordPress core team's announcement of the feature explains that recovery mode sets a cookie in your browser and pauses the faulty extension for you only, so you can log in and deal with it while visitors still see the error.

  • If the email arrived: click the link, log in, and go to Plugins (or Appearance → Themes). The paused item is flagged. Deactivate it, then check the front of the site.
  • If no email arrived: check spam, and check which address is set as the admin email. Old sites often still point at a developer's or a former employee's mailbox. Then move to Step 2.

Step 2: Turn on the debug log

The official debugging guide shows the lines to add to wp-config.php, above the line that says "That's all, stop editing!": set WP_DEBUG and WP_DEBUG_LOG to true and WP_DEBUG_DISPLAY to false. Errors are then written to wp-content/debug.log instead of being printed on the page.

Open the site once so the error happens, then open debug.log in your host's file manager. Read the last "PHP Fatal error" line. It normally contains a file path, and the path tells you who is responsible:

  • Path includes wp-content/plugins/plugin-name/: that plugin is the cause. Go to Step 3 and start with it.
  • Path includes wp-content/themes/theme-name/: go to Step 4.
  • Message says "Allowed memory size … exhausted": go to Step 5.
  • Message mentions a PHP function that "does not exist" or a syntax error after a PHP upgrade: see Step 6.

When you have finished, set debugging back to false. The same handbook suggests blocking public access to the log file, because it can reveal paths on your server.

Step 3: Switch off plugins without the dashboard

If you can reach the dashboard, deactivate plugins there one at a time. If you can't, WordPress's troubleshooting FAQ and its list of common errors describe the file method:

  1. Connect with SFTP or open your host's file manager.
  2. Go to wp-content/plugins.
  3. Rename the single suspect folder (for example add -off to the end). WordPress can no longer find it, so it stays inactive.
  4. Reload the site.
  • If the site comes back: you've found it. Leave that plugin off and check for a newer version, or a note on its support forum, before switching it on again.
  • If it doesn't, or you had no suspect: rename the whole plugins folder to plugins_old. That deactivates everything. If the site now loads, rename the folder back, then rename plugin folders one by one until the error returns.

Expect to reactivate plugins manually afterwards. Keep a list of what was active before you started.

Step 4: Fall back to a default theme

A theme or child theme that calls a function a plugin used to provide is a classic cause after an update. If you can log in, activate a default theme such as one of the "Twenty" themes. If you can't, rename your active theme's folder in wp-content/themes; WordPress will look for another installed theme. Make sure at least one default theme is still installed before you try this.

  • If the site works on the default theme: the problem sits in your theme or child theme. Check for an update, or ask whoever built it to look at the error line from Step 2.
  • If it still fails: put the theme back and continue.

Step 5: Give PHP more memory

The wp-config.php reference explains WP_MEMORY_LIMIT for the "Allowed memory size exhausted" message, with examples such as define( 'WP_MEMORY_LIMIT', '96M' ); and a separate WP_MAX_MEMORY_LIMIT for the admin area. Your hosting plan sets the ceiling, so a value above what the host allows does nothing.

  • If raising the limit fixes it: fine for now, but find out what is so memory-hungry. The same page notes that persistent memory problems usually point to code that needs fixing rather than more memory.

Step 6: Check the PHP version and core files

Some hosts upgrade PHP on a schedule, and an older plugin may break on the new version. Your control panel usually shows the PHP version and lets you choose another one. Switching back temporarily can get you online while you update the plugin.

WordPress's list of common errors also names corrupted core files and failed automatic updates as causes. If the log points at files in wp-includes or wp-admin, the manual update route in the documentation replaces core files without touching your content.

Step 7: Roll back, then stop it happening again

Rolling a plugin back to its previous version is reasonable for a few days, not for months: old versions stop getting security fixes. Core developers have also worked on automatic rollback when a plugin auto-update causes a fatal error, set out in their 2024 merge proposal; check your own version's release notes rather than relying on it.

Habits that make the next update dull:

  • Update one plugin at a time and look at the site between updates, especially checkout, booking and contact forms.
  • Keep a dated backup before each round of updates.
  • Remove plugins you no longer use instead of leaving them deactivated.
  • Test big updates on a staging copy first, if your host offers one.
  • Make sure the admin email goes to a mailbox someone actually reads.

FAQ

Is the critical error message a sign that my site was hacked?

Usually not. It is the standard message for a fatal PHP error, and updates are the most common trigger. If you see files you don't recognise or unexpected admin users, treat it as a separate problem and get help.

Will deactivating plugins delete my settings?

Renaming a plugin folder only stops it loading. Its settings normally stay in the database and come back when you reactivate it, though a few plugins behave differently.

Why do visitors still see the error when I'm in recovery mode?

Recovery mode pauses the broken plugin or theme for your browser only. The site stays broken for everyone else until you deactivate or fix the cause.

How long should debug mode stay on?

Only while you're diagnosing. Switch WP_DEBUG off afterwards and delete or protect the log file.

For a WordPress site that keeps breaking with every round of updates, tell us what it runs on and we can look at a calmer update routine.

Sources

WhatsAppLet’s talk