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.
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.
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
Frequently asked questions
What does 'There has been a critical error on this website' mean?
+WordPress caught a fatal PHP error and stopped the page from loading. It is almost always caused by a plugin, a theme, or a PHP version mismatch, and often appears right after an update or a host change. The message comes from WordPress's fatal error protection, added in version 5.2, which replaced the blank white screen.
How do I fix the critical error if I cannot log in?
+Check the administrator email for a message titled Your Site is Experiencing a Technical Issue, which contains a recovery mode link. If there is no email, use SFTP or your host's file manager to rename the plugin or theme folder named in the debug log, which deactivates it and brings the site back.
Where do I find the error details?
+Turn on logging by adding WP_DEBUG and WP_DEBUG_LOG to wp-config.php, reload the page, and open wp-content/debug.log. The PHP Fatal error line shows the type of error and the file path, which usually names the plugin or theme responsible.
Why did the critical error appear after I updated a plugin?
+The update may be incompatible with your WordPress or PHP version, conflict with another plugin, or have installed incompletely. Deactivating the plugin restores the site, then you can reinstall a clean copy, update the other plugin it conflicts with, or roll back to the previous version.
Can a PHP update cause the critical error?
+Yes. Hosts often upgrade PHP automatically, and older plugins and themes can fail on a newer version. Check the PHP version in your hosting panel, temporarily switch back to the previous version if you can, and then update or replace the incompatible plugin.
More from Insights
Let's keep the conversation going
We're equipped to tackle your challenges head-on. Learn more about how Inspirable can help your organization grow.