Available for projects & agency overflow · Quick reply, from the person who does the work

"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.

Describe my issue Send a message

How I go about it

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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. Raising WP_MEMORY_LIMIT unblocks 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’s functions.php through 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.

wp-config.php
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);

Worth reading next

Describe your need in one minute

A few targeted questions so I can reply with an estimate rather than another questionnaire.

impact
message
declencheur
debug (facultatif)
acces (facultatif)
Please provide an email or a phone number so I can get back to you.

Please provide an email or a phone number so I can get back to you.

Frequently asked questions

Am I at risk of losing my posts or orders?
No. The critical error stops pages from displaying, it doesn’t affect the database. Your content, orders and customers stay intact.
Why did the site break on its own when I hadn’t touched anything?
It’s common: an automatic plugin update, or a PHP version upgrade decided by the host without warning, is enough to break a site that had been stable for months.
What access do I need to give you?
FTP or SSH access to read the files and logs, and database access. If wp-admin is reachable, its credentials help too but aren’t essential.
How long does it take to get the site back online?
In most cases, identifying the faulty plugin or file takes under an hour once access is available. The fix itself depends on what’s broken.
How do I stop this happening again?
I can limit automatic updates on sensitive plugins and set up a test environment to validate updates before applying them in production.
What if the recovery mode email never arrives?
First check the spam folder of the admin address, the one in WordPress’s general settings, which is often out of date. If nothing arrives, go through FTP or the host’s file manager: renaming the faulty plugin’s folder in wp-content/plugins deactivates it at once, and its settings stay in the database.