"There has been a critical error on this website": How to Find and Fix It
If your site suddenly shows "There has been a critical error on this website. Please check your site admin email inbox for instructions.", WordPress has caught a fatal PHP error and shut down the frontend (and often wp-admin) to protect itself. This usually happens after a plugin or theme update, or after a PHP version change on the host.
This guide walks through Recovery Mode when the email arrives, and the FTP / wp-config.php path when it does not — the situation most people hit.
What "There has been a critical error on this website" means
Since WordPress 5.2, a fatal PHP error no longer dumps a white screen with no context. Instead, WordPress shows this message and tries to email the site admin a one-time Recovery Mode link so you can log in with plugins temporarily disabled and fix the culprit.
Common triggers:
- A plugin or theme update that is incompatible with your PHP version
- A jump to PHP 8.x when a plugin still uses deprecated APIs
- A conflicting plugin combination after installing something new
- Corrupted or incomplete plugin files after a failed update
Fix 1: Use the Recovery Mode email (when it arrives)
- Open the inbox for the email address set as the WordPress admin (Settings → General → Administration Email Address).
- Find the message from WordPress about a critical error / recovery mode. Check spam if needed.
- Click the Recovery Mode link in the email. It logs you into a limited dashboard with the broken plugin or theme flagged.
- Deactivate the plugin (or switch the theme) named in the notice.
- Reload the front of the site. If it loads, update or replace the offending plugin, or contact its author. Then exit Recovery Mode.
If the email never arrives — which is very common on shared hosts with flaky mail — use Fix 2.
Fix 2: Enable debugging in wp-config.php (no recovery email)
Connect to your site with FTP, SFTP, or your host’s file manager. Open wp-config.php in the WordPress root (the same folder as wp-admin and wp-content).
Find the line that says /* That's all, stop editing! Happy publishing. */ and above it, paste:
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);Save the file. Reload the broken page once so WordPress writes the error, then open:
/wp-content/debug.log
Near the bottom you will see a fatal error pointing to a file path — almost always inside a specific plugin or theme folder. Note that folder name.
Important: Keep WP_DEBUG_DISPLAY set to false on a live site so visitors never see raw PHP errors. Turn debugging off again after you fix the site (set WP_DEBUG back to false or remove the three lines).
Fix 3: Deactivate the culprit via FTP
Once debug.log names the plugin (or you want a fast binary search without the log):
- Go to
/wp-content/plugins/. - Rename the offending plugin’s folder — for example,
bad-plugin→bad-plugin-disabled. WordPress will stop loading it. - Reload your site. If the critical error is gone, you found the cause.
- If you do not know which plugin it is, rename the whole
pluginsfolder toplugins_old, confirm the site loads, then restore folders one at a time until the error returns.
For a theme-related fatal error, switch themes by renaming the active theme folder under /wp-content/themes/ so WordPress falls back to a default theme (e.g. Twenty Twenty-Four).
Fix 4: Check PHP version compatibility
Many critical errors appear right after the host upgrades PHP to 8.0, 8.1, 8.2, or 8.3. In your hosting panel:
- Confirm which PHP version is active for the site.
- Temporarily roll back one minor version if a plugin is not yet compatible.
- Update plugins and themes, then move back to a supported PHP version.
WordPress and well-maintained plugins support modern PHP; outdated “set and forget” plugins are the usual holdouts.
Optional: raise memory if the log shows exhaustion
If debug.log mentions Allowed memory size … exhausted instead of a named plugin bug, add this above the “stop editing” line in wp-config.php:
define('WP_MEMORY_LIMIT', '256M');
define('WP_MAX_MEMORY_LIMIT', '512M');Some managed hosts ignore these constants and require a panel setting or support ticket to change memory_limit. If the lines have no effect, ask your host.
After the site is back
- Update or replace the broken plugin/theme, or leave it deactivated if you no longer need it.
- Disable debugging in
wp-config.php. - Delete or empty
wp-content/debug.logif it contains sensitive paths (optional but tidy). - Take a backup before the next bulk update so you can roll back quickly.
Quick checklist
- Exact message: There has been a critical error on this website
- Try Recovery Mode from the admin email first
- If no email: enable
WP_DEBUG/WP_DEBUG_LOG, readdebug.log - Rename the plugin (or theme) folder via FTP to deactivate it
- Confirm PHP version compatibility after host upgrades
Related: WordPress white screen of death after an update · stuck maintenance mode (.maintenance file)