Troubleshooting guide

"There has been a critical error on this website"

The least helpful error message in WordPress, and one of the more fixable. Here is what it means and how to work back to the actual cause.

10 min read webfix, Garden City NY

You load your website and instead of your homepage you get a short white page reading "There has been a critical error on this website." Sometimes it adds "Learn more about troubleshooting WordPress." That is the whole message. No detail, no clue, nothing to act on.

It is alarming, but it is also one of the more recoverable WordPress failures. In most cases nothing has been lost: your content is still in the database and your files are still on the server. Something in the PHP code stopped execution, and WordPress is showing you a polite wall instead of a raw error. Here is how to work back to the cause.

Before anything else: back up

If you can reach your hosting control panel, take a full backup of files and database now, before you start changing things. Recovery is much less stressful when you can undo your own troubleshooting.

What the message actually means

It means a fatal PHP error. Some piece of code, almost always a plugin or theme, tried to do something impossible and PHP halted. Since WordPress 5.2 there is a "fatal error protection" layer that catches this and shows the generic notice instead of exposing error details to the public. That is good for security and unhelpful for you.

The three overwhelmingly common triggers:

Less common but worth knowing: a corrupted file from a failed update, an edit to a theme file with a syntax error in it, or a compromised site where injected code is broken.

Step 1: check your email

WordPress emails the site administrator address when this happens, and that email is the single most useful thing you have. It usually names the plugin or file responsible, and it contains a recovery mode link.

Recovery mode logs you into wp-admin with the offending plugin paused, so you can deactivate or update it normally. Check the inbox for the admin email address on the site, and check spam. If that email arrived, you may be done in two minutes.

Step 2: turn on the error log

If there is no email, get the real error yourself. Using your host's file manager or FTP, edit wp-config.php and find the line mentioning WP_DEBUG. Set up logging like this, above the "That's all, stop editing" comment:

Reload the site, then open wp-content/debug.log. The last entries will name a file path. That path tells you which plugin or theme is responsible, which is the whole battle. Turn WP_DEBUG back off when you are finished, because leaving it on is a security and performance problem.

Step 3: rule out plugins

If you cannot get into wp-admin at all, you can still deactivate plugins from outside WordPress. Over FTP or your host's file manager, go to wp-content and rename the plugins folder to something like plugins-off. WordPress will not find any plugins and will deactivate them all.

  1. Rename wp-content/plugins to plugins-off, then load your site.
  2. If the site comes back, a plugin is your culprit. Rename the folder back to plugins.
  3. Now go into wp-content/plugins and rename individual plugin folders one at a time, checking the site after each, until the site recovers. The last one you renamed is the problem.
  4. If the site is still broken with all plugins disabled, move on to the theme.

Step 4: rule out the theme

The equivalent trick works for themes. In wp-content/themes, rename your active theme's folder. WordPress will fall back to a default theme such as Twenty Twenty-Four if one is present. If the site loads, the theme, or more often a customization in the theme, is the cause.

This is also where badly done edits show up. If someone recently pasted a snippet into functions.php, that is a prime suspect. A single missing semicolon or brace there will take down the entire site.

Step 5: check PHP version and memory

If plugins and theme are both clear, look at the environment.

Step 6: restore, if it comes to that

If you have a recent backup and the site has been down long enough to be costing you real business, restoring is a legitimate and often the fastest answer. Restore to the most recent point before the failure, then work out the cause on a copy rather than on your live site.

This is also the moment when people discover that the backup they were counting on does not exist, or has never been tested. If that is you, fix that first once the site is back.

What not to do

How to not be here again

If you would rather not do any of this

All of the above is doable, and none of it is fun while your site is down and the phone is not ringing. If you would rather hand it over, that is what we do. We read the logs, find the actual cause, fix it, and tell you in plain English what happened and how to stop it recurring.

Site down right now?

Call us. We fix WordPress critical errors, white screens, and failed updates for Long Island businesses, usually the same day, with a flat quote before we start.

Keep reading