“There Has Been a Critical Error on This Website”: How to Fix It
You open your site and instead of your homepage you get one plain line: There has been a critical error on this website. Sometimes there’s a link to “learn more about troubleshooting WordPress.” Your customers see the same blank page.
The good news: this error is almost always caused by one plugin, one theme, or the server’s PHP settings, and it’s usually fixable in under an hour. Here’s how to find the cause.
What the error actually means
WordPress shows this message when PHP — the language WordPress runs on — hits a “fatal error” and can’t finish loading the page. Since WordPress 5.2, instead of a white screen you get this friendlier message, and WordPress tries to email the site’s admin with details.
The most common causes:
- A plugin update that clashes with another plugin or your theme
- A theme update or a code change in
functions.php - Your host upgrading PHP, and an old plugin not supporting the new version
- The site running out of PHP memory
Step 1: Check the admin email inbox
Look for an email from your site with a subject like “Your Site is Experiencing a Technical Issue.” It usually names the plugin or theme that caused the crash and includes a special recovery mode link.
Click that link and log in. Recovery mode loads your dashboard with the broken plugin paused, so you can deactivate it, update it, or replace it. If you find the email, this is often a 5-minute fix.
No email? Check spam, and check which address is set as the admin email (it may be an old one). Then move to Step 2.
Step 2: Think about what changed
Errors rarely appear out of nowhere. Ask:
- Did you (or auto-updates) update a plugin, theme, or WordPress itself today?
- Did you add a code snippet?
- Did your host send an email about PHP or server changes?
If the answer points to one thing, start there.
Step 3: Turn on debug logging
To see the exact error, open wp-config.php in your hosting file manager (or via SFTP) and find the line define( 'WP_DEBUG', false );. Replace it with:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
Reload the broken page, then open /wp-content/debug.log. Near the bottom you’ll see a line starting with PHP Fatal error, followed by a file path. If the path contains /plugins/plugin-name/, that plugin is your culprit. If it contains /themes/, it’s your theme.
Important: set WP_DEBUG back to false when you’re done. Debug logs can expose details about your site.
Step 4: Deactivate the plugin without the dashboard
If you can’t log in, you can still switch a plugin off:
- In your file manager, go to
/wp-content/plugins/. - Rename the plugin’s folder — for example
contact-form-protocontact-form-pro-off. - Reload your site.
WordPress can’t find the renamed plugin, so it deactivates it. If you don’t know which plugin it is, rename the whole plugins folder to plugins-off, check the site loads, then rename it back and reactivate plugins one at a time from the dashboard until the error returns.
Step 5: Switch to a default theme
If the log points to your theme, rename your active theme’s folder in /wp-content/themes/. WordPress falls back to a default theme such as Twenty Twenty-Five, if one is installed. Your design will look different, but the site will load and you’ll know the theme is the problem.
Step 6: Check PHP version and memory
If the error started after your host changed PHP, your hosting control panel (cPanel or similar) usually lets you pick the PHP version. Switching back one version can get you online while you update the plugin that can’t handle the newer one. Treat this as a short-term fix — older PHP versions stop getting security updates.
If the log says “Allowed memory size exhausted”, add this line to wp-config.php above the line that says “That’s all, stop editing!”:
define( 'WP_MEMORY_LIMIT', '256M' );
Your host may cap this lower; if so, ask them to raise it.
Still stuck? Restore a backup
If you have a backup from before the error, restoring it is the fastest way back online. Then apply updates one at a time on a staging copy to find which one breaks the site.
When to hand it over
Call in help if:
- The site sells products or takes bookings, and every hour offline costs money
- The debug log points to WordPress core files, or to several plugins at once
- You’ve renamed folders and the error is still there
- You don’t have a recent backup
We fix WordPress critical errors from $39, and you pay only after your site is working again. We don’t need your main hosting password — see how we access your site. Get a free quote in chat.
How to stop it happening again
Most critical errors come from updates applied straight to a live site. Our care plans apply updates weekly and, from the Business plan up, test them on a staging copy first, with daily backups so there’s always a clean restore point.
