WordPress Fatal Error? The Recovery Email Goes to Your Client, Not You

WordPress recovery mode email sent to developer instead of client

You update a plugin on a client site. The page reloads. White screen.

WordPress has actually handled this well since version 5.2. Instead of leaving you with nothing, it catches the fatal error, pauses the plugin that caused it, and emails a recovery link. Click the link and you are back in the admin, able to deactivate the broken plugin and get the site up.

There is one problem, and if you build sites for other people you already know what it is.

That email goes to the site’s admin address. Which is your client.

So you are sitting there with a dead site, a recovery link you cannot reach, and a message to write that starts with “can you check your email.” At 11pm. While the client watches their site show a blank page and quietly wonders whether hiring you was a good idea.

Here is how to make sure the link comes to you instead. Three ways, from free and manual to automatic.

First, what WordPress is actually doing

When a plugin or theme throws a fatal error, WordPress 5.2 and above does three things:

  1. Catches the error rather than showing a white screen
  2. Puts the site into recovery mode and pauses the offending plugin for admins
  3. Emails a recovery link to the address in Settings > General

Visitors keep seeing the site. You get a link that logs you in through a special session so you can fix things.

Two details worth knowing. The link is time limited, and by default WordPress waits a full day before it will send another recovery email for the same problem. So if the first email lands in a client inbox nobody checks, you are not getting a second one any time soon.

Fix 1: One line in wp-config.php, free, no plugin

WordPress has a constant for exactly this. Add it above the line that says “That’s all, stop editing”:

php

define( 'RECOVERY_MODE_EMAIL', 'you@yourdomain.com' );

Now the recovery link goes to you instead of the admin address.

That is the whole fix. If you only take one thing from this post, take that line and put it in the next site you touch.

The catch: it replaces the recipient rather than adding one. Your client no longer gets the email. On most maintenance arrangements that is exactly what you want. If the client also wants a copy, keep reading.

Fix 2: The filter, if you want both addresses

If you would rather the client stays informed and you get the link as well, use the recovery_mode_email filter in a small must-use plugin:

php

add_filter( 'recovery_mode_email', function ( $email ) {
    $email['to'][] = 'you@yourdomain.com';
    return $email;
} );

Put that in wp-content/mu-plugins/recovery-email.php rather than in the theme’s functions.php. A must-use plugin still loads when everything else is broken, which is the entire point.

Fix 3: Let a plugin handle it

If you look after more than a handful of sites, editing wp-config on every one of them gets old, and it is easy to forget on the site that eventually needs it.

I built this into my activity log plugin. Install it, enter your email, and the recovery link comes to you as well as to the client. No file editing, nothing to remember, and it works the same way on every site you install it on.

It also does what an activity log should do: records logins and failed attempts, user and role changes, plugin and theme activity, and edits to core settings. But the recovery link is the part I actually built it for.

It is free, with no signup and no paid tier. Here is what it does and what it deliberately does not do.

If the email never arrives at all

Sometimes recovery mode does not save you. The email goes to spam, or the site cannot send mail, or the error is bad enough that WordPress never gets far enough to email anybody.

The manual route always works:

  1. Connect over FTP, SFTP or your host’s file manager
  2. Go to wp-content/plugins/
  3. Rename the folder of the plugin you just updated, for example broken-plugin to broken-plugin-off
  4. WordPress cannot find it, deactivates it automatically, and the site comes back

If you do not know which plugin broke it, rename the whole plugins folder to plugins-off, confirm the site loads, then rename it back and reactivate plugins one at a time until it breaks again.

Same approach works for a theme. Rename the theme folder and WordPress falls back to a default theme.

While you are in wp-config, two more worth knowing

Turn recovery mode off during development:

php

define( 'WP_DISABLE_FATAL_ERROR_HANDLER', true );

On a local or staging site you usually want to see the actual error rather than a polite recovery message. Never set this on a live site.

Change how often WordPress will email you using the recovery_mode_email_rate_limit filter, if a day between emails is too long for your situation.

The habit that prevents most of this

Recovery mode is a safety net, not a plan. The things that actually stop this happening:

  • Update on staging first, particularly for anything touching payments or forms
  • Take a backup before you update, every time, no exceptions
  • Update plugins one at a time on sites that matter, so you know which one broke it
  • Put RECOVERY_MODE_EMAIL in wp-config on every client site you take over, on day one

That last one takes thirty seconds and you will be grateful for it exactly once, at a moment when thirty seconds of past effort feels like a gift.

Common questions

Why does WordPress send the recovery email to the client and not the developer?

Because it sends it to the administration email address in Settings > General, which on a client site is normally the client. WordPress has no idea who built the site. The RECOVERY_MODE_EMAIL constant exists precisely so you can change that.

How long is a WordPress recovery link valid?

It is time limited, and by default WordPress will not send another recovery email for the same issue for a full day. Use the link when it arrives rather than saving it for later.

Can I send the recovery email to more than one address?

Yes, with the recovery_mode_email filter shown above, or with a plugin. The RECOVERY_MODE_EMAIL constant replaces the recipient rather than adding one.

Recovery mode did not trigger at all. Why?

Some errors happen too early for the handler to run, particularly errors in wp-config itself, in a must-use plugin, or at the server level. In those cases go straight to FTP and rename the plugin folder.

Is recovery mode a security risk?

The link is single purpose and time limited. The realistic risk is that it sits in an inbox that other people can read, which is another argument for sending it somewhere you control.

The bottom line

WordPress already built the fix for this. It just sends it to the wrong person by default.

One line in wp-config solves it for a single site. A plugin solves it for all of them. Either way, do it before you need it, because the moment you need it is not the moment you want to be reading a blog post.

If your site is down right now and none of this is working, send me a message. I usually reply within five minutes, and a paused plugin is normally a ten minute problem. Here is how I handle broken sites.

Ahmad Dastageer, WordPress Developer
WRITTEN BY
Ahmad Dastageer Top Rated on Upwork

Full-stack WordPress developer with 8+ years building fast, SEO-ready sites in Elementor, WooCommerce and GoHighLevel. Still shipping production code every week.

Let's build something that works.