Troubleshooting

Fix "There has been a critical error on this website"

Recover from the WordPress critical error message: use the recovery mode email, find the failing plugin or theme in the logs and get back into the dashboard.

BeginnercPanel hosting3 min read

Since version 5.2, WordPress catches fatal PHP errors and shows "There has been a critical error on this website" instead of a blank page. At the same time it emails the site administrator a special link that lets you log in with the broken plugin or theme paused. This guide shows how to use it and what to do when the email never arrives.

Before you start

  • Check the inbox of the address in Settings → General → Administration Email Address, including spam. The subject is "Your Site is Experiencing a Technical Issue".
  • Have cPanel access ready as a fallback.
  1. Open the email. It names the plugin or theme that caused the error and the error message.
  2. Click the link ending in wp-login.php?action=enter_recovery_mode and log in.
  3. WordPress shows a notice that you are in recovery mode and that the faulty extension is paused for you.
  4. Go to Plugins (or Appearance → Themes) and deactivate the named extension, or update it if an update is available.
  5. Click Exit Recovery Mode in the admin bar and test the site in a private window.

The link is valid for a limited time. If it has expired, the next fatal error triggers a new email, though WordPress limits how often it sends them.

No email? Find the error yourself

  1. Open cPanel → Files → File Manager and check the error_log file in the site folder, or cPanel → Metrics → Errors.
  2. Look for the latest PHP Fatal error. The path shows the culprit, for example wp-content/plugins/old-slider/.
  3. If there is no log entry, enable debug logging in wp-config.php and reload the broken page.

Disable the culprit without logging in

  • Plugin: rename its folder in wp-content/plugins, for example to old-slider-off.
  • Theme: rename the active theme's folder in wp-content/themes. WordPress switches to an installed default theme.
  • Unknown: rename the whole plugins folder to plugins-off, log in, rename it back and reactivate plugins one at a time.

Common causes

Error mentionsCauseFix
Allowed memory size exhaustedPHP memory limitRaise memory_limit in cPanel
Call to undefined functionMissing PHP extension or old code on new PHPEnable the extension or update the plugin
Cannot redeclareTwo plugins define the same functionDeactivate one of them
Uncaught TypeErrorPlugin not compatible with the PHP versionUpdate the plugin or adjust the PHP version
Failed opening requiredIncomplete update, missing fileReinstall the plugin or core

Change where the email goes

To send recovery emails to a developer instead of the site owner, add to wp-config.php:

define( 'RECOVERY_MODE_EMAIL', 'developer@example.com' );

Make sure WordPress mail is delivered reliably by sending it through SMTP.

After the fix

  • Check Tools → Site Health for remaining critical issues.
  • If the cause was an update, report it to the plugin developer with the error message.
  • Consider testing future updates on a staging site.

Next steps

Was this guide helpful?

Still stuck?

Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.