You open your website and instead of your home page you see one line: There has been a critical error on this website. If you’re logged in, it may add Please check your site admin email inbox for instructions.
It looks alarming, but it’s one of the more fixable WordPress problems. Your content is almost always still there. WordPress has hit an error it can’t recover from, and it’s showing this message instead of a half-broken page.
What the message actually means
WordPress, its plugins and your theme are written in PHP. When a piece of that code fails badly enough (a “fatal error”), PHP stops running the page. Since version 5.2, WordPress catches those failures and shows a message like this one instead of a blank white screen.
At the same time, WordPress tries to email the site’s admin address with the subject “Your Site is Experiencing a Technical Issue”. That email names the plugin or theme that caused the error, when it can tell, and includes a link to log in using recovery mode.
The usual causes
- A plugin or theme update. By far the most common cause. A new version has a bug, or no longer works with another plugin you use.
- A PHP version change. Hosts upgrade PHP from time to time. Older plugins and themes that haven’t been updated can fail on the newer version.
- Running out of memory. A heavy plugin or a big import can use up the memory your host allows, which also shows up as a fatal error.
- An update that didn’t finish. If an update was interrupted, some files can be left half-replaced.
Safe first steps
- Don’t reinstall WordPress or start deleting plugins. That can turn an easy fix into lost settings or content.
- Check the admin email inbox, including spam. If the recovery email arrived, use its link to log in. WordPress pauses the faulty plugin or theme for your session, so you can get into the dashboard and deactivate or update it.
- Think about what changed recently. An update, a new plugin, or an email from your host about PHP is usually the answer.
- If no email came, your host’s control panel usually has an error log. The last fatal error in it normally names the file, and the file path shows which plugin or theme it belongs to.
If you’re comfortable with a few technical steps
You can turn on WordPress’s own error log by adding these lines to wp-config.php, above the line that says “That’s all, stop editing”:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
Reload the site, then open wp-content/debug.log. The fatal error will be near the bottom. When you’re done, set WP_DEBUG back to false, because the log can grow and shouldn’t be left running.
If the log points to a plugin and you can’t reach the dashboard, you can deactivate it by renaming its folder in wp-content/plugins using your host’s file manager or FTP. WordPress treats a renamed plugin as deactivated.
If you have a recent backup from before the problem started, restoring it is often the quickest way back. Then update one thing at a time to find the cause.
How to stop it happening again
A lot of critical errors come from updates nobody checked. Updating plugins one at a time, with a backup first and a quick look at the main pages afterwards, catches most of them before visitors do. That’s what a maintenance plan is for.
Need it fixed now?
If your site is showing this message and you’d rather not dig through logs, we can fix it for a flat $199, with no plan needed. We back up what’s there first, find the cause, fix it, and send you a short note on what happened.