You open your website and instead of your homepage, you see one plain line: “There has been a critical error on this website.” Sometimes it adds, “Please check your site admin email inbox for instructions.” Your dashboard may be gone too.
It looks scary, but in most cases your content is safe. Nothing has been deleted. WordPress has simply hit a PHP error it can’t get past, so it stops loading the page and shows this message instead of a broken screen.
What usually causes it:
- A plugin that broke after an update, or clashes with another plugin
- A theme update or a bad edit to your theme’s functions.php file
- A PHP version your plugins or theme don’t support
- Your site running out of PHP memory
- Damaged WordPress core files, often after a failed update
This error was added in WordPress 5.2. Before that, the same problem showed up as the “white screen of death”: a completely blank page. The upside of the new message is that WordPress now tries to tell you what went wrong and gives you a way back in. This guide shows you how to use it, and what to do if it doesn’t work.
When This Happened to Me
I’ve seen this error on one of my own blogs, so I know the sinking feeling.
I was changing my theme at the time. Once the new theme was in place, I went ahead and updated my plugins as well. That’s when the site went down and showed the critical error message.
Looking back, I did too many things at once. A new theme plus a round of plugin updates is exactly the kind of mix that causes a clash, and when it breaks, you can’t tell which change did it.
I didn’t fix it myself. A developer friend of mine sorted it out and got the site working again.
After that, I made two changes that I still stick to:
- I installed UpdraftPlus for backups, so if anything breaks again, I can roll back instead of panicking.
- I moved to a good, stable theme and stopped switching themes on a live site.
If you’re reading this with a broken site right now, the steps below are what a developer would check. And once your site is back, set up backups before you do anything else.
First, Check Your Admin Email
Before you touch any files, open the inbox of the email address set as your site’s admin email. When this error happens, WordPress usually sends an email with a subject like “Your Site is Experiencing a Technical Issue.”
This email is gold. It tells you:
- Which plugin or theme caused the error, often with the file name and line number.
- A special recovery mode link. Click it, and you can log in to your dashboard even though the site is broken.
Once you’re in recovery mode, go to Plugins, find the one named in the email and click Deactivate. Then open your site in a private window. If the homepage loads again, you’ve found the culprit. Now you can look for an update, contact the plugin developer or replace it with something else.
Didn’t get the email? Check your spam folder. If it’s not there either, your site may not be able to send emails, or the admin email is an old address nobody checks. That’s common, and it’s fine. The steps below work without it.
How to Fix the Critical Error, Step by Step
Work through these in order. Most sites are fixed by step 1 or 2.
For most steps, you’ll need to reach your site’s files. You can do that through your hosting control panel’s File Manager (in hPanel, cPanel or similar) or with an FTP app like FileZilla. Your WordPress files are usually in a folder called public_html.
Before you start: If your host has a one-click backup, take one now. Then you can undo anything you change.
1. Turn off all plugins
Plugins cause most critical errors, especially right after an update.
- Open File Manager and go to public_html/wp-content/.
- Find the plugins folder and rename it to plugins-off.
- Reload your website.
If the site loads, a plugin was the problem. Rename the folder back to plugins. All your plugins will now show as deactivated in the dashboard. Turn them on one at a time, reloading the site after each one. When the error comes back, the last plugin you activated is the culprit. Delete it, roll it back to an older version or ask its developer for help.
2. Switch to a default theme
If disabling plugins didn’t fix it, your theme might be the cause.
- Go to public_html/wp-content/themes/.
- Make sure a default theme like Twenty Twenty-Five is in the folder. If not, download it from WordPress.org and upload it.
- Rename your current theme’s folder, for example mytheme to mytheme-off.
WordPress will fall back to the default theme. If the site loads, the problem is in your theme. This often happens after editing functions.php by hand. Undo your last change or restore the theme from a backup.
3. Turn on debug mode to see the real error
If you still can’t tell what’s wrong, ask WordPress to show you.
- Open the wp-config.php file in public_html.
- Find the line define( ‘WP_DEBUG’, false );
- Replace it with these three lines:
define( ‘WP_DEBUG’, true );
define( ‘WP_DEBUG_LOG’, true );
define( ‘WP_DEBUG_DISPLAY’, false );
Reload your site, then open wp-content/debug.log. Look for lines starting with PHP Fatal error. They tell you the exact file, and the folder name in the path (for example /plugins/some-plugin/) points to the plugin or theme at fault.
Important: Change WP_DEBUG back to false once you’re done. Leaving it on can expose information about your site.
4. Check your PHP version
Old plugins can break on newer PHP versions, and new plugins can break on old ones. If the error started right after your host upgraded PHP, or you changed it yourself, that’s a strong clue.
In your hosting panel, look for a setting called PHP Configuration, PHP Version or Select PHP Version. Switch to the version you were using before, or to one your plugins support, and reload the site. WordPress recommends PHP 8.3 or newer, but use whichever version your theme and plugins actually work with.
5. Increase the PHP memory limit
If the debug log says something like “Allowed memory size exhausted”, your site ran out of memory. Add this line to wp-config.php, just above the line that says “That’s all, stop editing!”:
define( ‘WP_MEMORY_LIMIT’, ‘256M’ );
If that doesn’t help, your hosting plan may have a lower limit. Ask your host to raise it.
6. Replace WordPress core files
A failed or interrupted update can leave core files damaged.
- Download a fresh copy of WordPress from WordPress.org and unzip it on your computer.
- Upload the wp-admin and wp-includes folders to your site, replacing the old ones.
- Don’t upload the wp-content folder or wp-config.php. Those hold your content and settings.
7. Restore a backup
If nothing else works and you have a recent backup from before the error, restoring it is often the fastest fix. Most hosts let you restore from their dashboard in a few clicks.
8. Ask your host for help
Your hosting support team can see server error logs that you can’t. Tell them the time the error started and anything you changed just before. Good hosts fix this kind of problem every day.
If you’re seeing a different message, like “500 Internal Server Error”, our guide on how to fix the 500 error covers it. For other common problems, see WordPress troubleshooting: how to fix the most common errors.
Quick Reference: Cause and Fix
| If the error started after… | Likely cause | Try this first |
| Updating or installing a plugin | Broken or clashing plugin | Rename the plugins folder |
| Updating or editing your theme | Theme code error | Switch to a default theme |
| Your host upgraded PHP | PHP version mismatch | Switch back to the older PHP version |
| Adding a heavy plugin or page builder | Not enough memory | Raise the memory limit |
| A WordPress update that didn’t finish | Damaged core files | Re-upload wp-admin and wp-includes |
| Nothing you can think of | Unknown | Turn on debug mode, then ask your host |
How to Stop It Happening Again
You can’t avoid every error, but a few habits make them rare and easy to undo.
- Keep backups. Daily automatic backups, from your host or a plugin like UpdraftPlus, mean you’re never more than a day away from a working site.
- Update one thing at a time. If you update ten plugins at once and the site breaks, you won’t know which one did it.
- Use a staging site for big changes. Many hosts offer a one-click staging copy. Test theme and major plugin updates there first.
- Delete plugins you don’t use. Fewer plugins means fewer things that can break, and fewer security holes.
- Stick to well-known plugins. Pick ones with lots of active installs, good reviews and recent updates.
- Don’t edit theme files directly. Use a child theme or a code snippets plugin instead, so one typo can’t take down your whole site.
- Check your admin email. Make sure the admin email in Settings > General is one you actually read, so you get the recovery link next time.
- Choose a good host. Reliable hosting with backups, staging and helpful support makes all of this easier. See our pick of the best web hosting for small businesses.
Related guides: How to Fix “Error Establishing a Database Connection” in WordPress (Step by Step)
FAQ
Will I lose my posts and pages?
Almost never. Your content is stored in the database, and this error comes from PHP code. Fixing the code brings everything back as it was.
Can I fix it without FTP or coding?
Often, yes. If you get the recovery mode email, you can fix it from the dashboard. If not, your hosting panel’s File Manager lets you rename folders without any special software. You don’t need to write any code for steps 1 and 2.
Why does only the dashboard show the error, but the site works?
Some plugins only run in the admin area. The fix is the same: find and turn off the plugin causing it.
Is the critical error a sign my site was hacked?
Usually not. It’s almost always a plugin, theme or PHP problem. But if you see strange new files, unknown admin users or redirects to other sites, treat it as a hack and talk to your host.
I fixed it, but the error came back. Why?
The faulty plugin probably got reactivated, or updated again on its own. Turn off auto-updates for that plugin until the developer releases a fix.
What’s the difference between this and the 500 error?
Both mean the server hit a problem. The critical error is WordPress’s own friendly message for PHP fatal errors. A 500 error can also come from server settings, like a broken .htaccess file. Many of the fixes overlap.
Final Word
The critical error message looks alarming, but it’s one of the more fixable WordPress problems. Start with your admin email. If that doesn’t help, turn off your plugins, then your theme. Nine times out of ten, you’ll have your site back within minutes.
And once it’s working again, take a backup. Future you will be glad you did.


