“There Has Been a Critical Error on This Website”: What It Means and What to Do

WordPress hit a fatal PHP error and stopped. Here is what the message means, how recovery mode and debug logs help, and how to get the site back safely.

“There has been a critical error on this website.” It’s one of the most alarming messages a site owner can see — and one of the more fixable ones. It means WordPress hit a fatal PHP error and stopped rather than show a broken page.

Your content isn’t gone. Something in the code — almost always a plugin or theme — failed, and the job is to find which one.

What the message means

Since version 5.2, WordPress catches fatal errors and shows this message instead of a blank white screen. Behind the scenes it tries to identify the plugin or theme responsible and emails the site’s administration address with details and a special link to recovery mode.

Step 1: check for the recovery mode email

Look in the inbox — and spam folder — of the email address set under Settings → General. The message names the extension that caused the error and contains a link that lets you log in with that extension paused. From there you can deactivate it, check for an update, or switch themes.

Step 2: turn on the debug log

If the email didn’t arrive, the debug log tells you what failed. Add these lines to wp-config.php, above the line that says “That’s all, stop editing”:

wp-config.php
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );

Reload the page, then open wp-content/debug.log. Look for the line that starts with “PHP Fatal error” — the path in it usually points to a folder inside wp-content/plugins/ or wp-content/themes/.

Step 3: deactivate the cause

Once you know the culprit, deactivate it. Without dashboard access, you can:

  • Use WP-CLI: wp plugin deactivate plugin-folder-name, or switch to a default theme with wp theme activate.
  • Rename the folder via SFTP: renaming a plugin’s folder makes WordPress deactivate it.

When it’s a memory error

If the log says “Allowed memory size exhausted”, the site ran out of PHP memory. Raising the limit can get it running again, but it treats the symptom: a sudden jump in memory use usually points to a heavy plugin, a large import or a loop in custom code worth investigating.

Step 4: clean up and prevent a repeat

  1. Switch debug mode off again once you’ve found the cause.
  2. Check key pages, forms and — for stores — the checkout.
  3. Decide whether to roll back the plugin, wait for a fix, or replace it.
  4. Check your PHP version; incompatibilities often surface after a server upgrade.
  5. Make sure uptime and SSL monitoring is in place, so the next outage reaches you before your visitors do.

If this happened right after updates, our guide to a site broken after an update covers the next steps in more detail.

Frequently asked questions

What causes the WordPress critical error?

A fatal PHP error — most often a plugin or theme that’s incompatible with the installed version of WordPress, another plugin or the server’s PHP version. Running out of memory is another common cause.

I didn’t get the recovery mode email. What now?

Check the spam folder of the site’s administration email address. If nothing arrived — common when the site can’t send email — use the debug log, SFTP or WP-CLI to find and deactivate the plugin or theme causing the error.

Is my data lost?

Almost never. The error stops WordPress from rendering pages, but your content, orders and settings remain in the database.

Should I leave debug mode on?

No. Switch it off once you’ve found the cause, and never display errors publicly on a live site — the log can reveal details about your server.

Comfy flying and waving you over

Let’s take website upkeep off your list.

Send your URL and tell me what you want to hand over. I’ll review the fit, suggest a plan and explain any work needed before care starts.

Tell us about your site