Title: Birim Login Lock – Limit Login Attempts &amp; Two-Factor
Author: Melih Birim
Published: <strong>November 25, 2026</strong>
Last modified: November 25, 2026

---

Search plugins

![](https://ps.w.org/birim-login-lock/assets/banner-772x250.png?rev=3822708)

![](https://ps.w.org/birim-login-lock/assets/icon.svg?rev=3822708)

# Birim Login Lock – Limit Login Attempts & Two-Factor

 By [Melih Birim](https://profiles.wordpress.org/birimone/)

[Download](https://downloads.wordpress.org/plugin/birim-login-lock.1.0.1.zip)

 * [Details](https://wordpress.org/plugins/birim-login-lock/#description)
 * [Reviews](https://wordpress.org/plugins/birim-login-lock/#reviews)
 *  [Installation](https://wordpress.org/plugins/birim-login-lock/#installation)
 * [Development](https://wordpress.org/plugins/birim-login-lock/#developers)

 [Support](https://wordpress.org/support/plugin/birim-login-lock/)

## Description

Limit login attempts and add two-factor sign-in in one small plugin, with no cloud
service, no upsell notices and no emails unless you ask for them. A maintained replacement
for Limit Login Attempts, with one-click settings import.

Bots try thousands of passwords against `wp-login.php` and XML-RPC every day. Birim
Login Lock counts failed sign-ins and locks the address out before a password is
ever checked again.

#### Limit login attempts

 * **Every way in**: the login form, WooCommerce and other `wp_signon()` forms, 
   XML-RPC and application passwords.
 * **Lockouts that escalate**: 4 failures lock an address out for 20 minutes; the
   4th lockout in 24 hours lasts 24 hours. Same defaults as Limit Login Attempts,
   all adjustable.
 * **Checked before the password**: a locked-out address is refused without checking
   the password, even if it is right.
 * **One message for every wrong attempt**: the error never says whether the username
   or the password was wrong.
 * **Allowlist and blocklist** for IPs and ranges (CIDR, IPv4 and IPv6). Saving 
   never blocklists your own address.
 * **Blocked usernames**: anyone who tries `admin` (or any name you list) is locked
   out at once. Names of real accounts are refused.
 * **Password reset limit**: 3 requests per hour per address and per user, so nobody
   can flood your users’ inboxes.
 * **IPv6 done right**: addresses are counted per /64 network, so an attacker cannot
   rotate through addresses to reset the count.

#### The right visitor IP

Many login limiters see every visitor as one address behind Cloudflare or a host
proxy and lock everyone out, or trust an `X-Forwarded-For` header that anyone can
fake.

 * **Direct** (default): the connection’s own address.
 * **Cloudflare**: reads `CF-Connecting-IP`, but only on requests that really come
   from Cloudflare’s published ranges.
 * **Other proxy**: reads the header you name, but only on requests from the proxy
   addresses you list.
 * The Settings screen shows your IP as the plugin sees it and suggests a mode if
   your site looks like it is behind a proxy.

#### Free two-factor sign-in

 * **Authenticator app** (Google Authenticator, Microsoft Authenticator, 1Password,
   Bitwarden and any other TOTP app): scan a QR code or type the key.
 * **Codes by email**, for people without an app.
 * **10 recovery codes**, each usable once, shown once, with a download link.
 * **Require it for roles you choose**: users without a method set one up right 
   after their password. No account can skip it.
 * **For every user, free**: each person turns it on under Users > Profile. Administrators
   can reset it for someone who lost their phone.
 * XML-RPC cannot ask for a code, so account passwords of two-factor users are refused
   there (on by default). Application passwords keep working.

#### Protection for a username attacked from many IPs

When one username gets 20 failed sign-ins from 3 or more addresses in an hour, a
browser that has not signed in as that user before also needs a code from the user’s
email for the next hour. Browsers the user signed in from before are not affected.
The attack gets nothing, and the real user is never locked out.

#### Moving from Limit Login Attempts

Settings > Login Lock finds the settings of Limit Login Attempts (1.x and 2.x) and
Limit Login Attempts Reloaded. It shows exactly what will change (limits, lockout
times, allowlist, blocklist, blocked usernames, Cloudflare) and what is not imported,
and then offers to deactivate the old plugin, because two limiters count every failure
twice.

#### Screens

 * **Lockouts**: who is locked out now, with Unlock and Unlock and allowlist, plus
   the top IPs and usernames of the last 24 hours.
 * **Log**: every failed sign-in, lockout and password reset request, filterable
   by IP, username and result. Kept 30 days by default.
 * **Settings**: limits, visitor IP, lists, emails and two-factor rules.

#### Quiet by default

No emails unless you turn them on: an alert when an administrator’s username is 
attacked, and a weekly summary. No dashboard widget, no review requests, no “attack”
banners.

#### Lightweight

Two small tables, indexed queries, nothing growing in `wp_options`. No external 
requests, no tracking, no ads. Works on PHP 7.4 and up.

### Third-party code

QR codes are drawn in the browser by QR Code Generator for JavaScript 2.0.4 by Kazuhiko
Arase (MIT license), included unmodified as `assets/qrcode.js`. Source: https://
github.com/kazuhikoarase/qrcode-generator

## Screenshots

[⌊Lockouts: addresses locked out now, with Unlock and Unlock and allowlist, plus
the top IPs and usernames of the last 24 hours.⌉⌊Lockouts: addresses locked out 
now, with Unlock and Unlock and allowlist, plus the top IPs and usernames of the
last 24 hours.⌉[

Lockouts: addresses locked out now, with Unlock and Unlock and allowlist, plus the
top IPs and usernames of the last 24 hours.

[⌊Settings: limits, the visitor IP as the plugin sees it, Cloudflare and proxy modes.⌉⌊
Settings: limits, the visitor IP as the plugin sees it, Cloudflare and proxy modes
.⌉[

Settings: limits, the visitor IP as the plugin sees it, Cloudflare and proxy modes.

[⌊Import from Limit Login Attempts Reloaded: every change shown before it is applied.⌉⌊
Import from Limit Login Attempts Reloaded: every change shown before it is applied
.⌉[

Import from Limit Login Attempts Reloaded: every change shown before it is applied.

[⌊Two-factor sign-in on the profile screen: scan the QR code or type the key, or
use codes by email.⌉⌊Two-factor sign-in on the profile screen: scan the QR code 
or type the key, or use codes by email.⌉[

Two-factor sign-in on the profile screen: scan the QR code or type the key, or use
codes by email.

[⌊The second step at sign-in.⌉⌊The second step at sign-in.⌉[

The second step at sign-in.

## Installation

 1. Install from Plugins > Add New, or upload the `birim-login-lock` folder to `/wp-
    content/plugins/`.
 2. Activate the plugin. Protection starts with the default limits.
 3. Go to Settings > Login Lock. Check that “Your IP as this plugin sees it” is right;
    behind Cloudflare or a proxy, choose that mode.
 4. Optional: turn on two-factor sign-in under Users > Profile, or require it for roles
    under Settings > Login Lock.

## FAQ

### How do I limit login attempts in WordPress?

Install and activate Birim Login Lock. Failed sign-ins are counted at once: after
4, the address is locked out for 20 minutes. Change the numbers under Settings >
Login Lock.

### I locked myself out.

Add `define( 'BIRIM_LOGIN_LOCK_OFF', true );` to `wp-config.php`, sign in, unlock
your address on the Lockouts screen (or add it to the allowlist), then remove the
line. Renaming the plugin folder over FTP also works.

### Everyone gets locked out at once.

Your site is probably behind Cloudflare or a proxy, so every visitor arrives from
the same address. Go to Settings > Login Lock and choose Cloudflare or Other proxy.
The screen shows the addresses each request carries.

### I’m moving from Limit Login Attempts or Limit Login Attempts Reloaded.

Activate Birim Login Lock and open Settings > Login Lock. Review the import box 
and click Import settings, then deactivate the old plugin from the same screen. 
Usernames that skipped the limits and lockout emails are not imported; the box says
so.

### How do I add two-factor authentication to WordPress for free?

Go to Users > Profile, scan the QR code with an authenticator app, enter the code
it shows and click Update Profile. Save the recovery codes it shows. To require 
it for a role, tick that role under Settings > Login Lock.

### I lost my phone.

Sign in with one of your recovery codes, or with a code by email if you turned that
on. An administrator can also turn off two-factor for your account on your profile(
Users > Edit).

### Does two-factor work with XML-RPC, the mobile app or other tools?

Those cannot ask for a code. Create an application password under Users > Profile
and use it instead of your account password.

### The emailed code does not arrive.

Your site must be able to send email; many hosts need an SMTP plugin. If a username
is under attack from many IPs while email does not work, a browser that has not 
signed in as that user before waits for the protection to end (1 hour); browsers
used before are not affected.

### Will changing my security keys affect two-factor?

Authenticator secrets are encrypted with your site’s auth salt. If you change the
salts in `wp-config.php`, users need to set up their authenticator app again (recovery
codes and email codes keep working).

### Does it work on multisite?

Each site has its own settings, log and lockouts. Network-wide settings are not 
available yet.

### How do I report a security issue?

Please email security@birim.one instead of posting in the forum. See https://plugins.
birim.one/security/ for the full policy.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“Birim Login Lock – Limit Login Attempts & Two-Factor” is open source software. 
The following people have contributed to this plugin.

Contributors

 *   [ Melih Birim ](https://profiles.wordpress.org/birimone/)

[Translate “Birim Login Lock – Limit Login Attempts & Two-Factor” into your language.](https://translate.wordpress.org/projects/wp-plugins/birim-login-lock)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/birim-login-lock/),
check out the [SVN repository](https://plugins.svn.wordpress.org/birim-login-lock/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/birim-login-lock/)
by [RSS](https://plugins.trac.wordpress.org/log/birim-login-lock/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.0.1

 * The settings screen footer links to the other free Birim plugins (shown only 
   to users who can install plugins).

#### 1.0.0

 * First release.

## Meta

 *  Version **1.0.1**
 *  Last updated **1 hour ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 6.0 or higher **
 *  Tested up to **7.1.5**
 *  PHP version ** 7.4 or higher **
 * Tags
 * [2FA](https://wordpress.org/plugins/tags/2fa/)[Brute Force](https://wordpress.org/plugins/tags/brute-force/)
   [limit login attempts](https://wordpress.org/plugins/tags/limit-login-attempts/)
   [login security](https://wordpress.org/plugins/tags/login-security/)[two factor](https://wordpress.org/plugins/tags/two-factor/)
 *  [Advanced View](https://wordpress.org/plugins/birim-login-lock/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/birim-login-lock/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/birim-login-lock/reviews/)

## Contributors

 *   [ Melih Birim ](https://profiles.wordpress.org/birimone/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/birim-login-lock/)