BetterShield
Appearance
RecoverySign-inTwo-factor

Locked out of WordPress? How to get back in without FTP

· · 11 min read

Updated by Nazmul Hasan Rupok on

Getting locked out of WordPress usually happens at an inconvenient moment: a few mistyped passwords, a sign-in address you moved months ago, or a new phone without your authenticator app. The usual way out involves FTP, a database tool or a support ticket with your host.

For a lockout caused by BetterShield, its recovery tools can often help without changing files. A single-use recovery link is emailed to the site’s admin address when you activate it, printed codes work when email does not, and each kind of lockout has its own way out, from a browser or a terminal.

One thing to know first: these tools pause BetterShield’s own protections for a while. They do not change your password, and you still sign in with your own username and password.

Quick summary

  • A lockout after wrong passwords ends on its own. Automatic notices are conditional; Email Me an Unlock Link on the sign-in screen can request a link for an eligible lockout.
  • Your recovery link, or one printed recovery code, turns on safe mode for one hour, so the standard sign-in page works again.
  • A lost two-factor phone is covered by your ten backup codes, or by an administrator turning two-factor off for you.
  • With no link or code, a working administrator or authorized WP-CLI access can start recovery if WordPress can run.
  • Set it all up in advance on BetterShield › Protection › Recovery.

Common reasons you get locked out of WordPress

Most lockouts come from ordinary, honest slips:

  • Too many wrong passwords. A password manager fills in an old password, or you try a few from memory, and sign-in from your connection pauses.
  • A moved sign-in address you have forgotten. Without the bookmark, the standard sign-in page answers 404.
  • A lost two-factor device. A new, lost or reset phone takes your authenticator app with it.
  • A sign-in rule that is too strict. A blocked range that includes your own network, or a passkey-only rule and a missing passkey.
  • Email that never arrives. Reset and unlock messages never reach you, so you can’t log in to WordPress the usual way.
Match the symptom

Use the narrowest recovery route

Start with the message and the system that produced it.

  1. A BetterShield pause

    Wait or release that lockout.

  2. A missing second factor

    Use a personal backup code.

  3. A site-wide access problem

    Consider site recovery or the host.

A BetterShield pause

What this means
An attempt limit can end naturally or be released using the account email or another administrator.
Your next check
Check the expiry and the sending domain before following a recovery message.

A missing second factor

What this means
A personal backup code answers the app-code step. An administrator can help reset enrollment after verifying the person.
Your next check
Do not share the site-wide recovery sheet with everyone who loses a phone.

A site-wide access problem

What this means
BetterShield safe mode pauses its own enforcement. It cannot repair DNS, TLS, a host firewall or another plugin’s lockout.
Your next check
If WordPress cannot run or another system refuses the request, contact the operator of that system.
Recovery still needs a valid account password. Resolve the cause and verify normal sign-in before ending the recovery session.

The recovery link is a private address for your site, emailed at activation with the subject “[your site] Your BetterShield recovery link”. If a link has been used since, the newest one is in an email titled “[your site] Your BetterShield recovery link was used”.

  1. Open the newest link in your browser. Opening it changes nothing yet.
  2. On Pause protection and get back in?, press Pause protection and continue.
  3. The Protection is paused page says when the pause ends. Under Save your next recovery link, copy the new link somewhere safe.
  4. Press Go to sign-in and sign in with your username and password.

For that hour, BetterShield stops enforcing lockouts, the blocklist, a moved sign-in address, session limits and its two-factor step. Nothing is deactivated and no setting changes. Safe mode ends on its own, or sooner with End safe mode now on the Overview.

Each link works once, and using it issues the next one straight away. A link also stops working 90 days after it was issued, or as soon as a newer one is generated.

Printed recovery codes, for when email is the problem

Printed codes never touch email. Each sheet lists eight single-use codes and the address to use them at.

  1. Open the address printed on the sheet with one code added to the end, typed as printed.
  2. Press Pause protection and continue. Only that code is spent.
  3. The Protection is paused page says how many codes are left. Press Go to sign-in.

When your codes run low, issue a new set from the Recovery screen.

Match the lockout to its way back in

Too many wrong passwords

When your WordPress login is locked out after wrong passwords, BetterShield has paused sign-in from that connection, not your account. The pause ends on its own: 15 minutes by default, longer if it keeps happening within a day.

BetterShield automatically emails a lockout notice only when the account has used that network within the last 30 days, or its correct password was used. On a new network, choose Email Me an Unlock Link on the sign-in screen and enter your username or email address. A link is sent only when that lockout qualifies, to the address already saved on the account. Open it and press Clear the lockout. Another administrator can also press Release now under Lockouts on Protection › Login & Access.

A moved sign-in address

Use your recovery link or a printed code. While safe mode lasts, Go to sign-in takes you to the standard page. Once you are in, turn Custom sign-in address off under Signing in on Protection › Login & Access, or keep it and note the address somewhere off the site. See Hardening.

A lost two-factor device

  • Use a backup code. On the Authenticator app code or backup code screen, type one of your ten backup codes in place of the app code. Once you are in, if you manage BetterShield, another unused code under Turn off on Protection › Two-Factor turns it off, so you can set it up again on your new phone. Otherwise, on your Profile, Turn off, or move to a new phone turns it off with another unused code, or ask an administrator.
  • No backup codes left? An administrator opens your account under Users, finds Two-factor sign-in and presses Turn off two-factor for this account.
  • The only administrator? Your recovery link or a printed code gets you into the dashboard, because the two-factor step is not asked while safe mode lasts. While it lasts, your password turns two-factor off under Protection › Two-Factor, and an alert goes out when it does; then set it up again.

More in Two-factor and passkeys.

A sign-in rule that is too strict

Use your recovery link or a printed code, then fix the rule while you are in. A blocked range or user agent lives under Never allowed to sign in on Login & Access. On a passkey-only account, the recovery link or a printed code brings password sign-in back.

Email that never arrives

Printed codes are the answer, because they never depend on email. After you use a link, the Protection is paused page shows the next one on screen, so you are never waiting on an inbox for it.

  • Another administrator can still sign in. They can generate a new recovery link for you under Protection › Recovery, or fix whatever is blocking you.
  • You or your host can run WP-CLI. 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 recovery link. wp bettershield recover --end ends safe mode early. wp bettershield lockouts release --all --user=<login> lets every paused connection back in at once, and wp bettershield lockdown off --user=<login> lifts a site lockdown; each names an account that can manage BetterShield.

WP-CLI commands lists every option.

Before you need it

Set up your way back in while you can still sign in. On BetterShield › Protection › Recovery:

  • Generate a new link makes a fresh link and shows it once, with Copy link. It is not emailed, and the old link stops working. Keep it outside the site, such as in a password manager.
  • A link works for 90 days. In its last 14 days, Findings shows “The recovery link is close to expiring”.
  • Issue recovery codes shows eight codes once, with Print and Copy all.
  • Check readiness now checks the link, your unused codes, an administrator email address and the email path, without using a link or code. It also runs daily on its own.
  • Send a weekly recovery email check sends a test email to your alert recipients at most once a week. It is off by default. Mail accepted for sending is not proof it arrived, so look for it in your inbox.

Quick Setup covers the same ground in its Your way back in step. See Install and set up.

Why BetterShield checks your way back in first

The moment you tighten sign-in is the moment a small slip could keep you out. So before a Signing in fix such as Custom sign-in address, or before a role is added to Require two-factor of a role, BetterShield checks that you have a way back.

The check passes when there is a working recovery link or an unused printed code, and the recovery options were checked within the last day. If it does not pass, Check the way back in first says why and offers Check now or Open Recovery. Go ahead anyway is there too, and is recorded in the activity log. From WP-CLI, wp bettershield harden stops with the same reason until you add --force.

Passkey-only sign-in is stricter: adding a role is refused without a working recovery link or printed codes. Undoing a fix is never held up.

If recovery still cannot open the site

Identify where the request stops. A browser certificate warning, DNS error, hosting suspension or edge-firewall block happens before BetterShield can provide its recovery flow. A WordPress fatal error can also prevent the plugin from running. In these cases, use the hosting control panel or contact the host; issuing more BetterShield recovery codes will not repair that layer.

If the recovery page works but sign-in still fails, check the error before changing more settings. Safe mode does not know a forgotten password, remove another plugin’s two-factor step or change your host’s access rules. Use the narrowest recovery path and verify the site’s domain before entering a password or code.

Once back in, finish the recovery:

  1. Record the setting or missing credential that caused the problem.
  2. Correct it while the temporary pause is active, keeping the current session open.
  3. Store the replacement recovery link or fresh codes securely.
  4. End safe mode and test a fresh sign-in from a separate browser. If it fails, keep the recovery session and investigate before closing it.
  5. Review unexpected account, credential or settings changes. If the lockout coincides with unexplained activity, move to the first-hour response checklist.

Worked example (fictional): the sign-in page is blocked by a host firewall while the public home page still loads. BetterShield’s recovery link is blocked too. The correct operator is the host, which can inspect that rule; disabling WordPress protections would not address the request that never reached WordPress.

Common mistakes

  • Keeping the link or codes only on the site. A copy inside the site does not help when the site is what you cannot reach.
  • Opening an old link. Each link works once. Use the newest one.
  • Guessing at two-factor codes. After ten wrong codes in an hour, that account’s codes are not checked for a while, and wrong codes count toward a lockout. Use a backup code instead.
  • Leaving the cause in place. Safe mode ends after the hour, so fix what kept you out while you are in.

Frequently asked questions

Does the recovery link deactivate BetterShield?

No. It pauses BetterShield’s protections for one hour, with nothing deactivated and no setting changed. Safe mode then ends on its own.

Can I reset a WordPress login without FTP?

Yes, for anything BetterShield enforces: the recovery link, a printed code or wp bettershield recover brings back the standard sign-in page. These tools do not change passwords, though. A forgotten password goes through WordPress’s own Lost your password? link.

Can I get back in if my site cannot send email?

Yes. Printed recovery codes work without email, and wp bettershield recover needs neither email nor a user account.

Is lockout recovery part of the free plugin?

Yes. The recovery link, printed codes, lockout emails, two-factor backup codes and the WP-CLI commands are all in the free BetterShield plugin on WordPress.org. No account or sign-up is needed.

Conclusion

Match the recovery method to the system that refused access. BetterShield can pause its own enforcement; hosting, certificate and other-plugin problems need their own operator. A lockout ends on its own or with its email, a lost phone may be covered by personal backup codes, and site recovery can pause BetterShield rules while you fix the cause.

Spend a few minutes on Protection › Recovery today: save a fresh link, print your codes and press Check readiness now. The full reference is the Locked out guide, and Support is there if you get stuck.

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