How to Use WordPress Recovery Mode After a Critical Error

When a plugin or theme crashes your site, WordPress can email you a special link that lets you log in to a safe version of the dashboard, called recovery mode. This guide explains how WordPress recovery mode works, how to use the recovery mode email and link, why the link stops working, and what to do when the email never arrives. For finding and fixing the error itself, see WordPress Critical Error on This Website: How to Fix It -- this guide focuses on recovery mode.

How recovery mode works

When PHP hits a fatal error, WordPress checks which file caused it. If the file belongs to a plugin or a theme, WordPress:

  1. Shows "There has been a critical error on this website" instead of a blank page.
  2. Sends an email with the subject [Your Site Name] Your Site is Experiencing a Technical Issue. It names the plugin or theme, gives the error details and contains a recovery mode link.
  3. When you use the link, sets a cookie in your browser only. In that browser, WordPress skips loading the broken plugin or theme so you can reach the dashboard and fix it.

Recovery mode doesn't fix anything by itself. Visitors keep seeing the error until you deactivate, update or replace the item that failed.

When WordPress sends the email (and when it doesn't)

This is the part that confuses most people. The recovery mode email is only sent when all of these are true:

  • The error happened on an admin or login page. WordPress only sends the email when the crash happens in /wp-admin/, on wp-login.php, or during a few dashboard actions such as updating a plugin. If only your front page is broken and nobody has opened the dashboard, no email is sent.
  • The error came from a normal plugin or theme. Errors in WordPress core files, "must-use" plugins in wp-content/mu-plugins, drop-in files such as wp-content/object-cache.php, or wp-config.php don't trigger it. A memory error reported inside a wp-includes file won't either, even if a plugin caused it.
  • No recovery email was sent in the last 24 hours. WordPress sends at most one a day, even if the site keeps crashing. If yesterday's email went to an old address, you won't get another until the day has passed.
  • The email can actually be sent and delivered to the site's administration email address.

Tip: if your site shows the critical error but you haven't had an email, open https://example.com/wp-admin/ (with your domain) in your browser. If the error also happens there, that visit is what triggers the email.

Is the email genuine?

We always say don't click links in emails about your accounts. The recovery mode email is a rare exception, but only when all of these check out: it arrived just after you saw the critical error, it came from your own site (normally wordpress@example.com), and the link goes to your own domain, like this:

https://example.com/wp-login.php?action=enter_recovery_mode&rm_token=...&rm_key=...

If anything doesn't match, don't use it -- you can fix the site without the link (see below). A genuine recovery link only ever leads to your own site's normal WordPress login page. If a link leads to any other address, or a page asks for anything other than your WordPress username and password -- your email password, cPanel login or card details -- close it. For more on checking the email, see the critical error guide linked above.

How to use recovery mode

  1. Open the email and note the plugin or theme it names and the error details. That alone often tells you what to do.
  2. Click the recovery link, or copy it into your browser's address bar.
  3. You'll see Recovery Mode Initialized. Please log in to continue. Log in with a WordPress administrator username and password.
  4. The dashboard shows a notice such as One or more plugins failed to load properly. Click through to Plugins.
  5. The broken plugin is marked This plugin failed to load properly and is paused during recovery mode. Below it you'll see the error, for example An error of type E_ERROR was caused in line 42 of the file .../wp-content/plugins/some-plugin/some-file.php. Error message: ...
  6. Fix it: Deactivate the plugin, update it if an update is offered, or delete it and choose an alternative. For a theme, go to Appearance > Themes and switch to another theme.
  7. Click Exit Recovery Mode in the black toolbar at the top of the screen.
  8. Open your site in a private browser window to check what visitors see.

If the site still shows the critical error, another plugin may also be failing, or the problem is outside plugins and themes. Check the error log as described in the critical error guide.

Recovery link expired or not working

Message you seeWhat it meansWhat to do
Recovery key expired.The link is more than about a day old.Wait for a new email (it's sent the next time the error happens after the day is up) or fix the site without it.
Recovery Mode not initialized.The link has already been used, or a newer one replaced it. Each link works once.If you opened it before, recovery mode may already be active in that browser -- just go to /wp-admin/ and log in. Otherwise use a newer email, or fix without it.
Invalid recovery key.The link was cut off or changed, often by line-wrapping in the email.Copy the whole link carefully into the address bar.

Some email security filters at workplaces open links automatically to scan them. That can use up a single-use recovery link before you ever click it. If that keeps happening, set a different recovery address (below).

Recovery mode is tied to the browser where you opened the link. It lasts for up to a week unless you click Exit Recovery Mode or log out. Switching to another browser or device means you're not in recovery mode there.

The recovery email never arrived

  1. Trigger it. Visit https://example.com/wp-admin/. If the dashboard works fine, you don't need recovery mode -- just go to Plugins and fix things normally.
  2. Check spam and any filters in the inbox the email should go to.
  3. Find out which address it goes to. It's the Administration Email Address in Settings > General -- often an old address from when the site was built. If you can't reach the dashboard, check it in cPanel's Advanced > Terminal with WP-CLI (the flags stop the broken plugin from loading):
    cd ~/public_html
    wp --skip-plugins --skip-themes option get admin_email
    You can also find it in Databases > phpMyAdmin, in the wp_options table (your prefix may differ), row admin_email.
  4. See whether it was sent. In cPanel, go to Email > Track Delivery and search for mail to the admin address around the time of the error. A delivered message means it's in the inbox or spam; a rejected one shows why. See How to Find a Missing Email with Track Delivery.
  5. Remember the 24-hour limit. If one was already sent -- perhaps to that old address -- no new email goes out until the day has passed.

Send recovery emails to a better address

You can tell WordPress to send recovery emails somewhere other than the admin address. In Files > File Manager, edit public_html/wp-config.php and add this line above /* That's all, stop editing! */ (with your own address):

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

An outside address such as Gmail is a good choice, because it keeps working even if your site's email has problems. Keep your admin email up to date too.

Get a new email without waiting a day

If you've fixed the address and don't want to wait, clear the timer with WP-CLI, then visit /wp-admin/ again:

wp --skip-plugins --skip-themes option delete recovery_mode_email_last_sent

You don't need the email to fix your site

Recovery mode is a convenience. If the email is missing, expired or suspicious, you can switch off the broken plugin directly:

  • WP Toolkit: in cPanel, go to Domains > WordPress Management, open your site and switch the plugin off on its plugins tab.
  • File Manager: rename the plugin's folder in wp-content/plugins (for example some-plugin to some-plugin.off).
  • WP-CLI: wp --skip-plugins --skip-themes plugin deactivate some-plugin

The full steps, and how to find the error with WP_DEBUG, are in WordPress Critical Error on This Website: How to Fix It.

Common questions

Can visitors see my site while I'm in recovery mode?

No. Recovery mode only changes things for you. Visitors see the error until the plugin or theme is deactivated or fixed.

Can I forward the recovery email to my developer?

Better not -- the link works once, and emails get forwarded on. Copy the error details into a message instead, and give your developer their own WordPress login if they need one.

I logged in through recovery mode, but there's nothing paused

The error may be in core, a must-use plugin or a drop-in, which recovery mode can't pause. Check the error log or ask us.

Why does my site say "Please check your site admin email inbox"?

That's the wording WordPress uses on dashboard and login pages, while the front of the site shows a shorter message. It doesn't guarantee a new email went out -- if one was already sent in the last 24 hours, you won't get another yet.

Now it says "putting it in recovery mode"

If you're already in recovery mode and see There has been a critical error on this website, putting it in recovery mode, WordPress caught another failing plugin or theme and paused it too. Reload the dashboard and check both Plugins and Appearance > Themes.

Should I turn recovery mode off?

No. It only appears when something has already gone wrong, and it's a safe way back in.

Related guides

Still stuck? Open a support ticket and the Instant Access Internet Services team will help.

Ultrafast LiteSpeed hosting from InstantAccess.net: free SSL, free backups, cPanel included, no contracts. Check out our $10/month hosting.
  • wordpress recovery mode, recovery mode email not received, recovery key expired, your site is experiencing a technical issue, wordpress recovery link, recovery mode not initialized, RECOVERY_MODE_EMAIL, exit recovery mode
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to Create a WordPress Staging Site and Push It Live

A staging site is a private copy of your WordPress website where you can test new plugins, theme...

How to Install WordPress with WP Toolkit in cPanel

WP Toolkit lets you install WordPress on your hosting account in a couple of minutes, with no...

How to Log In to WordPress Admin from WP Toolkit

You don't need to remember your WordPress password to get into your site. WP Toolkit in cPanel...

How to Update WordPress, Plugins and Themes (and Turn On Auto-Updates)

Keeping WordPress up to date is the single best thing you can do to keep your site safe. This...

How to Move a WordPress Site from Another Host (WP Toolkit Import)

Moving a WordPress site from another host doesn't have to mean downtime or lost content. This...