NewThe WP Tutoring WordPress training platform is live — on demand video courses and interactive WordPress lessons. Free lessons included.Start free
Helping site owners learn WordPress since 2012 · (844) WP-TUTOR
Maintenance

Wordfence Locked Me Out — How to Get Back Into WordPress

Locked out by Wordfence? Every way back in — email unlock, FTP plugin rename, 2FA recovery codes — plus the settings that stop it recurring.

WT
WP Tutoring TeamWordPress Instructors
Updated Aug 8, 2026
2 min read
Table of contents

Getting locked out of your own site by your own security plugin is a rite of passage — Wordfence's brute-force protection can't always tell an owner with a forgotten password from an attacker. Here's every way back in, fastest first, and the settings that prevent round two. Screenshots from Wordfence on WordPress 7.0, August 2026.

TL;DR The 30-second version
  • Fastest: click "unlock email" on the lockout page and use the emailed link.
  • No email access? Rename wp-content/plugins/wordfence via FTP/file manager → log in → rename back.
  • 2FA lockout: use a recovery code from when you set 2FA up.
  • Afterward: allowlist your IP and raise the lockout thresholds for logged-in mistakes.
Try the unlock email

The block page Wordfence shows includes a link to receive an unlock email at the site's admin address. If you control that inbox, this is the 60-second fix: click the link, log in, done.

Disable Wordfence over FTP (the universal key)

Connect with FTP/SFTP or your host's file manager and rename:

wp-content/plugins/wordfence  →  wp-content/plugins/wordfence-off

WordPress deactivates a plugin it can't find, the lockout disappears, and you can log in normally. Rename the folder back afterward and Wordfence reactivates with settings intact. (This works for any misbehaving plugin — it's the most useful WordPress rescue trick there is.)

2FA lockouts: recovery codes

If two-factor authentication is what's blocking you, the login form accepts one of the five recovery codes generated when 2FA was enabled:

Wordfence Login Security's 2FA setup with recovery codes

Each code works once. No codes saved? Use the Step 2 rename, log in, then reset 2FA properly — and download the new codes.

Stop it happening again

Back inside, visit Wordfence's brute-force settings:

Wordfence's options screen

  • Allowlist your IP so your own office/home never triggers lockouts.
  • Set failures-before-lockout to something humane (10+) — attackers get blocked either way; you get room for typos.
  • Confirm the site's admin email is one you actually read: it's where unlock links go.
Locked out at 2am?

This is literally what wp.support is for — describe the lockout and get walked through the exact rescue for your hosting setup, any hour.

Keep learning

Frequently asked questions

How long does a Wordfence lockout last?
Whatever the "Amount of time a user is locked out" setting says — commonly 4 hours by default, configurable from 5 minutes to 60 days under Wordfence's brute-force settings. Waiting is a legitimate option if you're not in a hurry.
What's the fastest way back in if I'm the site owner?
The lockout page's "unlock email" link — Wordfence emails the site's registered address an unlock link. No email? Rename the wordfence plugin folder over FTP/file manager to disable it, log in, rename it back.
I lost my 2FA device. Now what?
Use one of the recovery codes Wordfence showed when you enabled 2FA. Without codes, deactivate the plugin via FTP (rename the folder), log in with your password, then re-enable 2FA with your new device — and save the new codes somewhere real this time.
WT

WP Tutoring Team

WordPress Instructors

We’ve been teaching WordPress to individuals and businesses since 2013 — through step-by-step tutorials, video courses, and 1-on-1 tutoring sessions.

Leave a comment

Comments are reviewed before they appear.

Get our free WordPress starter guide

Join thousands of site owners and get step-by-step WordPress tutorials in your inbox, plus printable cheat sheets.

Beginner-friendly, no jargon
Printable cheat sheets & checklists
Unsubscribe anytime

Request your session

We’ll reply quickly — usually the same business day.

By using this form you agree with the storage and handling of your data by this site.

Access our WordPress Training Academy videos

Step-by-step video courses covering the block editor, themes, plugins, and everything you need to build a site you’re proud of. Free lessons included — browse the full library before you sign up for anything.

Explore the Academy