WPThumbs
Themes Plugins By purpose By industry Best-of lists Fix it guides
Errors & downtime Beginner 3 min read

How to Fix "There Has Been a Critical Error on This Website"

This message looks worse than a white screen, but it is actually better news: WordPress caught the error, emailed you the cause, and left you a way in.

Updated 29 August 2026

Since WordPress 5.2, a fatal error no longer produces a blank page. Instead you get "There has been a critical error on this website" and, crucially, two things most people never use: an email containing the exact cause, and a recovery-mode link that logs you into a working dashboard.

Check the email first

WordPress sends that email to the address in Settings → General → Administration Email Address. Not the address on your user profile — the site address. If they differ, look in the right inbox, and check spam.

The email names the plugin or theme, the file, and the line number. It looks like this:

An error of type E_ERROR was caused in line 214 of the file
/wp-content/plugins/some-plugin/includes/class-loader.php

That is the whole diagnosis. Everything below is just how to act on it.

Use recovery mode

The same email contains a link ending in &wp_scrape_key=.... Open it. WordPress logs you in with the broken extension paused, so the dashboard works even though the site does not. From there you can deactivate the plugin, switch theme, or update the offending extension normally.

The link expires after 24 hours. If yours has, trigger the error again by reloading the broken page and WordPress will send a fresh one — though note it will not resend for the same error more than once per day, so you may need to wait.

If no email ever arrives

This is common, and it is usually not a WordPress problem: many hosts block PHP's mail() function outright, so the site cannot send anything. In that case fall back to the debug log:

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

Reload the broken page and read wp-content/debug.log. You will get the same information the email would have carried.

Worth fixing separately: if the site cannot send mail, it also cannot send password resets, order confirmations or contact-form notifications. An SMTP plugin pointed at a real mail service solves that permanently.

Deactivate without the dashboard

If recovery mode is not available, connect over SFTP and rename the folder of the plugin named in the error, inside wp-content/plugins/. WordPress deactivates anything it cannot find. Rename the theme folder if the error points there instead.

The most common underlying causes

  • A PHP version jump. The host upgraded PHP and a plugin that has not been updated in three years uses syntax that no longer exists. Check the plugin's "tested up to" and PHP requirements; if it is abandoned, replace it.
  • Two plugins doing the same job. Two caching plugins, or two SEO plugins, will fight over the same hooks. Run one of each kind.
  • A half-finished update. An update interrupted by a timeout leaves files missing. Re-run the update, or delete and reinstall the plugin — deleting a plugin does not delete its settings in the database.
  • A hand-edited theme file. A missing semicolon in functions.php is a fatal error. This is exactly why edits belong in a child theme or a code-snippets plugin.

Confirm the fix properly

Purge every cache — plugin, server and CDN — then load the site in a private window. Then check a second page type: a post, an archive, and the checkout if you run a shop. Fatal errors often only fire on one template, and testing only the home page will tell you the problem is gone when it is not.

Common questions

Where does the critical error email go?

To the administration email address in Settings → General, which is often different from the email on your own user profile. Check that address, including its spam folder.

Can I stop the message showing to visitors while I fix it?

Put the site into maintenance mode with a plugin, or upload a temporary .maintenance file in the site root. Visitors then get a proper "back soon" page rather than an error.

Is a critical error a sign of being hacked?

Usually not — it is far more often a plugin conflict or a PHP version change. But if it appeared alongside unexpected admin users, unfamiliar files, or redirects to another domain, treat it as a compromise and clean the site properly.