Home›Insights›WordPress Critical Error: How to Fix "There Has Been a Critical Error on This Website"
WordPress

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

WordPress shows 'There has been a critical error on this website.' This guide explains what triggers it, how to use the recovery mode email and the debug log to find the cause, and how to fix the plugin, theme, or PHP problem behind it.

I
Inspirable Editorial•7 min read

The message There has been a critical error on this website means WordPress caught a fatal PHP error and stopped loading the page. It is the friendlier, more informative cousin of the white screen of death. WordPress added this fatal error protection in version 5.2, so instead of a blank page you get a message, and often an email with a way to recover. The cause is nearly always a plugin, a theme, or a PHP version mismatch, and the fix is to identify which one and correct or remove it.

The critical error message looks alarming, but it is WordPress protecting you. It caught a fatal error and stopped, instead of leaving you with a blank screen.
Site down or broken right now?
Talk to a USA-based WordPress support team. Call and we will start on it.
Call 844-455-2800Send us a message

What the critical error message means

The critical error is triggered when something in the code throws an error that PHP cannot recover from, such as calling a function that does not exist, a missing file a plugin expects, a syntax error in a theme file, or running out of memory. It most often appears right after you update a plugin, theme, or WordPress itself, install something new, edit a theme file, or after your host upgrades PHP. If the error appears only on certain pages, a specific plugin or template used on those pages is the suspect.

Start with the recovery mode email

Start with the recovery mode email, because it is the fastest route. WordPress sends a message to the site's administrator email address with the subject Your Site is Experiencing a Technical Issue. It names the plugin or theme that triggered the error and includes a special recovery mode link. Opening that link lets you log in to the dashboard in a protected state where the faulty plugin or theme is paused. From there you can deactivate or update it normally and then exit recovery mode. If the email never arrived, check spam and confirm which address is set under Settings, General, because the notice goes only to that address.

Read the error in the debug log

If there is no email, or recovery mode does not help, read the actual error. Using SFTP or your host's file manager, open wp-config.php and add: define( 'WP_DEBUG', true ); define( 'WP_DEBUG_LOG', true ); define( 'WP_DEBUG_DISPLAY', false ); Reload the page once and open wp-content/debug.log. The most useful line is the one beginning PHP Fatal error. Read three things in it: the type of error, such as Uncaught Error, Call to undefined function, or Allowed memory size exhausted; the file path, which names the plugin or theme folder; and the line number. A path inside wp-content/plugins or wp-content/themes tells you exactly which one to deal with.

Fixing a plugin or theme error

To fix a plugin or theme error, deactivate the one named in the log. If you cannot reach the dashboard, rename that plugin's folder in wp-content/plugins, adding -off to the name. The site should load again. Then work out why it failed: it may need an update to be compatible with your WordPress or PHP version, it may conflict with another plugin, or the update that just ran may have been incomplete, in which case reinstalling a clean copy of the same plugin fixes it. If the log names a theme, rename the theme folder so WordPress falls back to a default theme, then restore or reinstall the theme. If you edited a theme file recently, undo that edit first.

When the cause is your PHP version

A plugin that worked yesterday and breaks today without any update on your side usually means the PHP version changed. Many hosts upgrade PHP automatically, and older plugins and themes can fail instantly on a newer version with errors such as a deprecated function or an undefined constant. Check the PHP version in your hosting control panel and compare it with what the plugin supports. As a short-term step you can switch the site to the previous PHP version, then update or replace the incompatible plugin and move forward again. The reverse also happens: a brand-new plugin that requires a newer PHP than your host runs will throw a fatal error the moment it activates.

Core files, memory, and everything else

If the log points to WordPress core files, a failed update may have left core incomplete, and re-uploading fresh copies of the wp-admin and wp-includes folders from wordpress.org, without touching wp-content, repairs it. If the log shows memory exhausted, add define( 'WP_MEMORY_LIMIT', '256M' ); to wp-config.php, or ask your host to raise the PHP limit. If nothing in the log explains it, restore a recent backup from before the error appeared, then re-apply updates one at a time on a staging copy so you can see which one breaks. And if the error showed up with no change on your side, check for a compromise: see our guide on the WordPress site is hacked warning signs. For related blank-page problems, see the white screen of death guide.

Get the critical error fixed

If you would rather not troubleshoot the critical error yourself, or the steps above did not clear it, Inspirable's USA-based team can take it from here. Call 844-455-2800 or contact us and we will find the cause, restore the site, and explain what happened in plain language. See our WordPress support services for how emergency fixes and monthly support work. A WordPress care plan from $49.99 a month, with encrypted backups every 5 hours and managed updates, is what prevents most of these errors in the first place.
Call 844-455-2800Send us a message

Frequently asked questions

I
Inspirable Editorial
Enterprise WordPress development since 2012