sfw/fix
Critical Error high

There Has Been a Critical Error on This Website

WordPress's fatal-error protection caught an uncaught PHP error from a plugin, theme, or PHP incompatibility and replaced the page.

What you see

There has been a critical error on this website.
Learn more about troubleshooting WordPress.
(On the admin side: "There has been a critical error on this website. Please check your site admin email inbox for instructions.")

What’s actually happening

The front end (or wp-admin) shows this one-line message instead of the page. It is WordPress 5.2+ catching a fatal PHP error so you do not just get a blank White Screen of Death. Unlike the old WSOD, WordPress emails the site admin a recovery-mode link and the actual file and line that crashed. The error itself is logged — it is not really "generic" once you look in the right place.

Common causes

  • A plugin throwing a fatal error — a bad update, a conflict with another plugin, or calling a function that no longer exists
  • A theme fatal (functions.php) or a half-finished/incompatible theme update
  • PHP version mismatch: code using syntax or functions removed in the server's PHP version (very common after a host bumps PHP, e.g. to 8.x)
  • Exhausted PHP memory_limit, so a legitimate operation dies mid-request with a fatal allocation error
  • A corrupted core file or an edit with a syntax error (a stray brace in functions.php via the theme editor)

How to fix it

  1. Read the admin email or recovery-mode link firstCheck the inbox for the address in Settings -> General. The mail is titled like "[Your Site] Your Site is Experiencing a Technical Issue" and names the offending plugin/theme plus the file and line. Click its recovery-mode link to log in to a special admin session where the broken extension is paused, so you can fix or delete it from inside wp-admin.
  2. Get the real error from the debug logIf no email arrived, turn on logging in wp-config.php: set WP_DEBUG to true, WP_DEBUG_LOG to true, and WP_DEBUG_DISPLAY to false. Reload the page, then read /wp-content/debug.log. The last fatal line gives you the exact file, function, and line number — that is your culprit, not guesswork.
  3. Isolate the plugin or theme over SFTPNo admin access? Rename /wp-content/plugins to plugins_off to disable everything; if the site returns, rename it back and disable plugins one at a time to find the bad one. For a theme fatal, rename the active theme's folder so WordPress falls back to a default (Twenty Twenty-x).
  4. Fix the actual causeUpdate or roll back the offending plugin/theme to a compatible version. If the log shows an out-of-memory error, raise the limit (define('WP_MEMORY_LIMIT', '256M'); in wp-config.php or via php.ini). If it is a PHP-version error, switch the site's PHP version in the host panel or update the code that broke. Re-upload a clean copy of any corrupted core file.
  5. Turn debug display back offOnce fixed, set WP_DEBUG and WP_DEBUG_LOG back to false (or at least keep WP_DEBUG_DISPLAY false) so errors are not exposed to visitors on the live site.

Stop it recurring

Stage and back up before updates, keep PHP and extensions on supported versions, and never edit functions.php directly on a live site through the theme editor.

Related errors