Skip to content

Brute force protection for WordPress logins

A password attack arrives a few seconds apart, from rotating addresses, and the dashboard shows nothing. Protection is a budget: attempts, a ladder, and the answer.

Brute force protection WordPress login form with an attempt limit

Where the attempts arrive

Three doors, three different costs for the attacker.

The login form

wp-login.php takes POST requests, so a script can try passwords as fast as the server answers. The form is the door everyone watches.

XML-RPC

One XML-RPC call can carry hundreds of logins, which makes it the cheapest door in the building. Close it when the site does not need it.

Sessions

A cookie taken from a browser works after the login, and no attempt counter sees it. Sessions need their own rule.

Three ways a per-IP limit fails

An address limit is the base of every brute force protection setup, and on its own it is easy to walk around.

Addresses rotate. A botnet or a proxy pool gives the attacker a new address for every ten attempts, so a limit of five per hour never triggers. Count by subnet as well as by address.

Headers lie. A missing or forged X-Forwarded-For moves the counter wherever the attacker wants. Read the address the connection came from, and trust the header only when a proxy is configured.

The password is not always guessed. A stolen cookie works after the login. That case belongs to session rules, not to an attempt counter.

Второй фактор после пароля настраивается на странице про двухфакторную аутентификацию.

Failed login attempts counted per address and per subnet

The ladder that stops an attack

Four steps, counted per address and per subnet.

  1. Five failed logins in fifteen minutes

    The address goes on a slow path instead of a block list, so a person who forgot a password still gets in.

  2. The next attempt meets a CAPTCHA

    A script stops here, a human continues. Around 30 requests per minute trigger the same check.

  3. A script that keeps going is banned

    Around 50 requests per minute reach the ban. The ladder extends with each return visit and resets after a quiet period.

  4. Two-factor authentication closes the case

    A correct password buys nothing without a TOTP code, and ten backup codes per account cover a lost phone.

Four steps from attempt limit to two-factor authentication

What brute force protection does not fix

A leaked password

Used from a clean address and a clean browser, it looks like the owner logging in. No attempt counter separates that from a normal morning.

A stolen session

The second factor already passed. Shorter session lifetime and a review of active sessions do more than another ban.

Response time

A login page that answers in 200 ms for a wrong password and 900 for a right one tells the attacker which half is correct.

Questions we hear

What site owners ask before the first ban.

Does brute force protection work without a CDN?
Yes. The plugin sees the request before WordPress loads, so the check runs on the server that hosts the site. A CDN or host firewall is a separate layer and stays useful, but it is not a prerequisite.
Will a ban lock out my own team?
Only if the team shares one address and types wrong passwords. Set the first step by office rather than by person: the ban expires, and the ladder resets after a quiet period.
Does it protect XML-RPC and the REST API?
Yes. Both are covered by the same attempt counter and the same ban ladder, and both can be closed entirely when the site does not use them.
How many attempts before the first block?
Five failed logins in fifteen minutes is the default. The value stays a setting, because shared addresses and password managers change what normal looks like.
Where do I see what happened?
The event log keeps attempts, bans and the matched rule, with 55 event codes in 12 categories. Start with the bans, then read the addresses that came back.

Read the limit before you change it

Install BotBlocker, open the login settings, and turn on two-factor authentication for the administrator account. Keep the backup codes.

BotBlocker login protection across form, XML-RPC and sessions