BetterShield
Appearance
RecoverySign-inTwo-factor

WordPress recovery mode vs a recovery link: which gets you back in

· · Updated · 9 min read

WordPress recovery mode and a security recovery link solve different problems: recovery mode gets you past a plugin or theme that crashed the site, and BetterShield’s recovery link gets you past a sign-in rule that stops you from signing in. If you only have the first, a lockout from your own security settings has no way out except your host. This guide explains what each one covers, what it cannot do, and how to set up the second one before you need it.

If you are already locked out, start with Locked out of WordPress? How to get back in without FTP. This post is the one to read first, while everything still works.

Quick summary

  • WordPress recovery mode is part of WordPress itself. It pauses a plugin or theme that caused a fatal error, so you can sign in and deal with it.
  • BetterShield’s recovery link is for the opposite situation: the site runs fine, but a sign-in rule, such as a lockout or a two-factor step, will not let you in.
  • Either of your BetterShield routes (the recovery link or a printed recovery code) starts safe mode for one hour. Nothing is deactivated and no setting changes.
  • You set both up on BetterShield › Protection › Recovery, and BetterShield checks every day that they would still work.
  • A recovery route is only as good as the place you saved it, so keep the link in your password manager, not only in an inbox.

Two different things go wrong

A site can fail you in two ways, and they look similar from the outside because both end with a screen you cannot get past.

In the first, the code is the problem. A plugin or theme update contains an error, PHP stops, and visitors see a message that the site has a technical issue. Nothing about your sign-in is wrong. The site itself cannot finish loading.

In the second, a rule is the problem. The site loads, but you cannot sign in: a sign-in lockout has counted your wrong passwords, the two-factor step wants a device you no longer have, or a role now needs passkey-only sign-in. Nothing has crashed. A protection is doing its job on the wrong person.

WordPress has an answer for the first. A security plugin has to supply the answer for the second, because the rule that blocks you is the plugin’s own.

What WordPress recovery mode does

WordPress watches for fatal errors caused by a plugin or theme. When one happens, it shows a message to visitors and emails the site’s administration email address a special link. Opening the link starts recovery mode for your browser session: you can sign in, WordPress pauses the broken plugin or theme for you, and you can deactivate or update it from the dashboard. The WordPress core team’s announcement describes how it works.

It is useful, and it is automatic. It also has limits worth knowing:

  • It starts only when WordPress detects a fatal error. A sign-in lockout is not a fatal error, so it never triggers.
  • It pauses the faulty extension, not the rule that blocks your sign-in. If the recovery email reaches you but your account is locked out, you are still locked out.
  • It depends on the administration email address being one you read.

BetterShield gives you two ways back in that need no password: a recovery link and printed recovery codes. Either one starts safe mode for an hour. For that hour BetterShield stops enforcing its protections, so the standard sign-in page works again. Your settings stay as they were, and everything comes back when safe mode ends. The Locked out doc lists exactly what safe mode pauses.

WordPress recovery modeBetterShield recovery link or code
FixesA plugin or theme that crashed the siteA sign-in rule that blocks you
StartsAutomatically, after a fatal errorWhen you open the link or use a code
Reaches you byAn email to the administration addressA saved link, printed codes, or WP-CLI
What it pausesThe faulty plugin or theme, for your sessionBetterShield’s protections, for one hour
Needs emailYesThe link is emailed once; codes work without email

The two do not overlap, which is the point of having both.

Set up your way back in

Do this on a day when nothing is wrong. Open BetterShield › Protection › Recovery.

  1. Find your recovery link. BetterShield emailed the first one to the site’s administration address when you activated it, with the subject “[your site] Your BetterShield recovery link”. Save it in your password manager, in this site’s entry.
  2. Issue printed codes. Press Issue recovery codes. BetterShield shows eight single-use codes once, with Print and Copy all. Keep the sheet away from your computer. A new set replaces every unused code.
  3. Press Check readiness now. BetterShield checks the link, the codes, the administrator address and the email path at once, without using any of them.
  4. Turn on Send a weekly recovery email check. It emails your alert recipients at most once a week, so you find out early if recovery email stops arriving.

From the terminal, wp bettershield recover turns safe mode on for one hour and needs no user account. Add --hours=4 for longer (1 to 24 hours) or --new-link to print a fresh link once. See WP-CLI commands.

With Ask for my password before removing a protection on, generating a link and issuing codes ask for your password.

  • The link works once, stops working 90 days after it was issued, and is shown only once, because the site keeps just a fingerprint of it. Using it shows the next link on screen and emails a copy to the administration address.
  • The codes do not expire and work without email. Using one spends only that code, and it does not issue a new link.
  • Ten wrong codes from one connection within an hour stop codes working from it for up to an hour.

What it can break, and how to undo

  • A new link retires the old one for good, including a copy you saved. Generate one when someone who has seen it leaves, not as a habit.
  • A new set of codes retires old sheets. Destroy the old paper.
  • Safe mode is temporary. End safe mode now ends it sooner, and everything it paused comes back on its own after the hour.
  • If email is unreliable, the link you saved is your route in. This is why we suggest storing it somewhere other than your inbox.

Undo is built in. Safe mode changes no setting, so ending it, or letting the hour pass, puts the site back as it was.

If you have also turned on a site lockdown, safe mode stands it down for the hour and it returns when safe mode ends, so lift it from the Recovery tab while you are in.

Check it is working

  • The tab’s tiles: Recovery link reads Ready, Missing, Expired or Not delivered, and Printed codes shows how many are left.
  • Findings: Your recovery options aren’t fully set up (Low) appears while any readiness check fails, and The recovery link is close to expiring (Medium) appears in the link’s last 14 days.
  • The activity log records “Recovery link generated” and, when you use one, “Safe mode started” and “Safe mode ended”.
  • BetterShield also checks before you make a sign-in change. Applying a Signing in fix, or adding a role to Require two-factor of a role, first confirms you hold a working link or an unused code. See Set up recovery.

We recommend keeping both kinds of recovery: the link is the quick way back, and the codes still work when email does not. Keep the link in your password manager, print the codes, and turn on Send a weekly recovery email check. Press Check readiness now before you require two-factor or passkey-only sign-in of a role, and make sure the administration address is an inbox someone reads, because WordPress’s own recovery mode uses it too.

If you also use two-factor, read WordPress 2FA backup codes vs recovery codes next: backup codes cover a lost device, and recovery codes cover a locked-out site. They are different sheets of paper.

Frequently asked questions

Does WordPress recovery mode help if a security plugin locks me out?

Not by itself. Recovery mode starts when WordPress detects a fatal error from a plugin or theme, and a sign-in lockout is not one. For a lockout, use your BetterShield recovery link or a printed code.

Will opening the recovery link deactivate BetterShield?

No. It starts safe mode for an hour, with nothing deactivated and no setting changed. BetterShield stops enforcing its protections during that time, and everything returns when safe mode ends.

What if I have lost both the recovery link and the printed codes?

Another administrator can generate a new link for you under Protection › Recovery. If you or your host can run WP-CLI, wp bettershield recover turns on safe mode for an hour without any user account. The Locked out doc lists every route.

How often should I replace the link and the codes?

When someone who has seen them leaves, after the site moves to a new address, and when Findings says the link is close to expiring. Issue a new set of codes when only a few are left.

Can I rely on the weekly recovery email check alone?

No. It tells you whether recovery email is being accepted for sending, and it holds no link or code. Keep the link and the printed codes as well.

Conclusion

WordPress recovery mode and BetterShield’s recovery link are two separate safety nets. One catches a crashed plugin or theme, and the other catches a sign-in rule that has turned on you. Set up the second while nothing is wrong, so you never have to call your host to get into your own site. BetterShield is free on WordPress.org, and the full steps are in Set up recovery.

Close the open doors today

Install the free plugin. The first audit runs when you activate it, and all but one of the fixes wait for your choice.

Requires WordPress 6.7 or newer and PHP 8.0 or newer.

Get BetterShield