"Critical error" on your WordPress site
The message "There has been a critical error on this website" gives no detail by default: that’s deliberate, WordPress hides the real error to avoid exposing sensitive information. You need to go find it in the logs to know what to fix.
How I go about it
-
Enabling debugging
I set WP_DEBUG and WP_DEBUG_LOG to true in wp-config.php to reveal the real error in wp-content/debug.log instead of the generic message.
-
Reading the PHP error
I read the full trace: file, line, function at fault. Most of the time it’s a deprecated function or a missing file in a plugin or the theme.
-
Isolating by renaming
I rename the suspect plugin’s folder (or the whole wp-content/plugins) to disable it without going through the admin, which is often inaccessible in this situation.
-
Checking compatibility
I check the server’s PHP version: many critical errors appear after an automatic PHP upgrade at the host, incompatible with an old plugin.
-
Fixing and going back online
I fix, update or replace the faulty element, clear any active caches (caching plugin, server cache) and switch WP_DEBUG back to false.
Reading debug.log: what the last line tells you
Depending on the WordPress version, the screen shows “There has been a critical error on this website” or similar wording; behind it, the useful log line starts with PHP Fatal error. The path it quotes names the culprit: wp-content/plugins/plugin-name/ for a plugin, wp-content/themes/theme-name/ for the theme. The messages I come across most:
Uncaught Error: Call to undefined function: the plugin calls a function that no longer exists in the server’s PHP version, or that belongs to a plugin it depends on which is deactivated — a WooCommerce add-on while WooCommerce itself is off, for instance.Allowed memory size of … bytes exhausted: the memory limit has been reached. RaisingWP_MEMORY_LIMITunblocks things, but you still need to find what uses so much.Cannot redeclare: two plugins, or one plugin installed twice, declare the same function.Failed opening required: a file is missing, the typical sign of an interrupted update. Reinstalling the same version of the plugin is often enough.syntax error, unexpected: a file was edited by hand, usually the theme’sfunctions.phpthrough the admin file editor.
No FTP access: recovery mode, and its limits
Since version 5.2, when a plugin or the theme causes a fatal error, WordPress emails the admin address a message containing a recovery mode login link. That link opens the admin area with the faulty component paused, so you can deactivate it without FTP. It is temporary, and it never arrives if the admin address is out of date or the site cannot send email. In that case, renaming the plugin folder over FTP or through the host’s file manager remains the safest route.
If the critical error only appears on the basket or checkout page, the culprit is almost always the payment gateway or a shipping plugin, which are only called at that step: see WooCommerce payment problems. And if the same symptom hits another platform, the mechanism is explained in where a 500 error comes from.
What I handle regularly
- "There has been a critical error on this WordPress website" message
- Completely blank screen, front end or WordPress admin
- Error appearing right after an automatic plugin or WordPress update
- Site working then broken with no apparent action, often after a silent PHP update from the host
- Can’t access wp-admin to disable the plugin at fault
The most common causes
On a WordPress site, the critical error overwhelmingly comes from a conflict between plugins, or an incompatibility between a plugin/theme and the server’s PHP version. A function called by an old plugin may have been removed in a recent PHP version, causing an immediate fatal error.
The second common case is an interrupted update: a network drop or timeout during an automatic plugin update, leaving half-written files. WordPress sometimes detects this and switches on a maintenance mode that stays stuck (a .maintenance file at the root).
Finally, exceeding the PHP memory limit (WP_MEMORY_LIMIT) can also cause this kind of error, particularly on sites with many active plugins at once or large data imports.
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
Worth reading next
-
Turning on WordPress debug mode
To read the real message behind the critical error screen.
-
Reading WooCommerce error logs
Where the log files live and how to spot the useful line.
-
Recovering from a failed update
When the error appeared right after an update.
-
Plugin conflicts after an update
Isolating the plugin at fault without disabling everything blindly.
-
Updating PHP under WordPress
The host’s PHP upgrade is the leading cause of a critical error “when nothing was touched”.
-
500 error: the same mechanism, any CMS
To understand what a fatal error produces on the server, whatever the platform.
Describe your need in one minute
A few targeted questions so I can reply with an estimate rather than another questionnaire.