How to Fix the WordPress Critical Error
What the WordPress critical error means
You open your website and instead of your homepage you see one cold line: "There has been a critical error on this website. Please check your site admin email inbox for instructions." It looks alarming, but it is actually WordPress doing you a favor. Older versions showed the infamous white screen of death — a blank page with zero clues. Since WordPress 5.2, a fatal PHP error triggers this named message instead, and behind the scenes WordPress emails you a Recovery Mode link so you can get back into your dashboard and fix the cause.
A fatal PHP error simply means some code ran that PHP could not complete, so page generation stopped partway. The page never finished building, which is why visitors see the message on every page. The good news: your content lives in the database and the uploads folder, not in the crashed code, so your posts, pages, products, images, and comments are untouched. Almost every critical error is fixed by finding the one thing that changed — a plugin update, a theme update, new custom code, a PHP version change — and reversing it. The steps below go from the fastest fix to the deeper repairs, and most sites are back up within ten to twenty minutes.
Common causes
- A plugin update or activation gone wrong: the most common cause by far. An update changed a function your other plugins relied on, two plugins conflict, or the new code has a bug.
- A broken or outdated theme: themes run code on every page load. A theme update, a corrupted theme file, or a theme built for an older PHP version can crash the whole site.
- Custom code in the wrong place: a snippet pasted into functions.php, a code-snippets plugin, or a child theme edit with a typo or a function name that already exists.
- PHP memory limit exhausted: the classic "Allowed memory size exhausted" fatal error. Heavy plugins, large imports, or traffic spikes push the site past its memory allowance.
- Incompatible PHP version: your host moved you to PHP 8 while an old plugin only supports PHP 7, or a new plugin needs PHP 8.1+ while you still run 7.4.
How to fix the WordPress critical error — step by step
Work through the steps in order. Step 1 is the fastest fix and solves most cases on its own.
- Check your admin email for the Recovery Mode link. When WordPress catches a fatal error, it emails your site admin address with the subject line "Your Site is Experiencing a Technical Issue." That email contains the exact cause when WordPress knows it, plus a special Recovery Mode link. Open the link and log in. Recovery Mode pauses the faulty plugin or theme for your session only, shows you a notice naming the problem, and lets you deactivate the culprit with one click. Visitors still see the broken site while you work, but your dashboard is safe to use.
- Open Recovery Mode manually if the email never arrived. Missing recovery emails are extremely common: your site may not send mail at all, the admin address may be old, or the message may be sitting in spam. You can skip the email entirely. Go to
yoursite.com/wp-login.php?action=entered_recovery_mode, replacing yoursite.com with your domain. That takes you straight to the Recovery Mode login screen. Sign in with an administrator account and you land in the same safe dashboard the email link would have given you. - Turn on debug logging to see the real error. The critical error screen is vague on purpose, so you need the real fatal error line to fix the right thing. Open your site files through your hosting File Manager or an FTP client, find
wp-config.phpin the site root, and add three lines just above the line that says "That's all, stop editing! Happy publishing.":define( 'WP_DEBUG', true ); define( 'WP_DEBUG_LOG', true ); define( 'WP_DEBUG_DISPLAY', false );Save the file, reload the broken page once, then openwp-content/debug.log. The newest entries show the exact PHP Fatal error with the file path, line number, and usually the plugin or theme name. When you are done troubleshooting, setWP_DEBUGback tofalse. Debug mode must not stay on a live site. - Deactivate plugins through the files if you cannot reach wp-admin. If Recovery Mode does not get you in, go to your hosting File Manager or FTP and open
wp-content. Rename thepluginsfolder to something likeplugins-disabled, then reload your site. If it comes back, a plugin was the cause and WordPress will have deactivated every plugin at once. Rename the folder back toplugins, then rename individual plugin folders one at a time, reloading the site after each, to find the one that breaks it. Delete or replace the guilty plugin and keep the rest. - Switch to a default theme. If the site still fails with all plugins off, the active theme is the likely culprit. In
wp-content/themes, rename your active theme's folder — for examplemythemetomytheme-old— and reload the site. WordPress will automatically fall back to a default theme such as Twenty Twenty-Four or Twenty Twenty-Five. If the site loads on the default theme, your theme is broken: update it, reinstall a fresh copy from its source, or contact the theme developer with the fatal error line from your debug log. - Raise the PHP memory limit and check the PHP version. "Allowed memory size exhausted" is one of the most common fatal errors behind the critical message, especially on busy or plugin-heavy sites. Add
define( 'WP_MEMORY_LIMIT', '256M' );towp-config.phpabove the "stop editing" line, or ask your host to raise the limit. While you are at it, check the PHP version your site runs in your hosting control panel. Many plugins now require PHP 8.1 or newer, while some older plugins break on PHP 8. If the fatal error followed a PHP change, switch versions to match what your plugins support, then update WordPress core, plugins, and themes one at a time.
Did this fix it? Quick checklist
- Your site loads normally without the critical error message
- wp-admin is reachable and stays stable as you click around
- debug.log shows no new fatal errors after the fix
- The broken plugin or theme was updated, replaced, or removed, and WP_DEBUG is back off
If the error keeps returning after every plugin update, your update routine is the real problem: update on a staging copy of your site first, and always keep a recent backup before touching anything. Site owners who see critical errors only during traffic spikes should also ask their host about the memory limit and PHP workers — a limit that is fine on a quiet day can crash the site under load.
Frequently asked questions
What does the "There has been a critical error on this website" message mean?
It means WordPress caught a fatal PHP error that stopped your site from loading, and it is showing you this message instead of broken code or a blank page. Something ran code PHP could not complete: usually a bad plugin update, a broken theme, custom code in the wrong place, exhausted memory, or an incompatible PHP version. Your content almost always survives, because posts, pages, and media live in the database, not in the crashed code.
Is the critical error the same as the WordPress white screen of death?
They are related but not the same. The white screen of death was the older failure mode: a completely blank page with no explanation at all. WordPress 5.2 introduced the critical error message specifically to replace that blank screen with something useful, and it added Recovery Mode so you can reach your dashboard and fix the cause instead of guessing.
What if I never received the Recovery Mode email?
Check your spam folder first, then try opening Recovery Mode manually by visiting yoursite.com/wp-login.php?action=entered_recovery_mode and logging in as an administrator. Many sites cannot send email reliably, so a missing message is normal and does not block you. If wp-admin is completely unreachable, rename the wp-content/plugins folder through your hosting File Manager or FTP to deactivate every plugin at once and get the site back.
Does turning on WP_DEBUG fix the critical error?
No, it diagnoses it. Adding WP_DEBUG, WP_DEBUG_LOG, and WP_DEBUG_DISPLAY lines to wp-config.php creates a debug.log file in wp-content that records the exact file, line, and plugin behind the fatal error, without showing errors to visitors. You still have to act on what the log shows, usually by deactivating, updating, or replacing whatever it names. Always set WP_DEBUG back to false when you are finished.
Will the critical error delete my posts or pages?
Almost never. The error is a code crash, not data loss: your posts, pages, products, and media live in the database and uploads folder, and those are untouched by the failing plugin or theme. Once the culprit is deactivated, everything normally reappears exactly as it was. If you have a recent backup, you have an extra safety net, which is why keeping daily backups is the best long-term prevention.