Security · Guide
How to Stop Brute Force Login Attacks on WordPress
Short answer
To stop brute force attacks on WordPress, limit login attempts with a plugin such as Jetpack or Limit Login Attempts, add two-factor authentication for every admin, and use a strong, unique password. Remove the admin username, block repeated failures by IP address, and protect wp-login.php and xmlrpc.php with a firewall so bots never reach the login form.
Key takeaways
- WordPress allows unlimited login attempts by default, which invites brute force attacks.
- Jetpack blocks brute force attacks for free and checks logins against a blacklist of bad IPs.
- Limit Login Attempts has more than 1 million active installs, according to WordPress.org.
- Two-factor authentication makes a stolen password useless on its own.
- Attackers also target xmlrpc.php, so protect it or turn it off when unused.
What is a brute force attack on WordPress?
A brute force attack guesses usernames and passwords over and over until one combination works.
Bots run the guessing, not people. They try common passwords, leaked passwords, and whole word lists, often thousands of times an hour. Jetpack notes that brute force attacks pummel the login page with constant attempts at cracking the password (How to Make Your WordPress Login Secure).
Credential stuffing is a close cousin. Instead of guessing fresh passwords, it replays username and password pairs leaked from other sites.
A unique WordPress password stops it, because the leaked pair does not match your site.
Most attacks fail, but they still cost you. Jetpack notes that brute force attacks can slow a site down considerably, or stop it responding altogether, even before a password is guessed.
Why is the WordPress login page an easy target?
The WordPress login page is easy to find, and by default it never says no.
Every WordPress site uses the same login address, wp-login.php, so a bot needs no research to find it. WordPress allows unlimited login attempts by default, which lets a bot keep guessing without pause (How to Limit Login Attempts in WordPress).
The admin username makes it worse. Many sites still use admin as the username, which hands the attacker half the answer. Jetpack recommends removing the admin username as the first step (How to Prevent Brute Force Attacks on WordPress).
Weak passwords are the other half of the problem. Jetpack advises using a strong password and changing it every four months for maximum protection.
A password manager makes that practical, because you never have to remember the password itself.
Brute force attacks rose sharply in late 2021, with Jetpack reporting a 160 percent increase toward the end of that year. The volume has stayed high since, because bots are cheap to run.
For wider attack data, see WordPress security statistics.
How do you limit login attempts with Jetpack?
Jetpack blocks brute force attacks for free, with no settings to configure.
- Go to \“Plugins → Add New\”, search for Jetpack, then install and activate it.
- Connect the site to a WordPress.com account when the setup wizard asks.
- Brute force protection starts automatically in the background.
- Open \“Jetpack → Settings → Security\” to check the toggle and add your own IP addresses to the always-allowed list.
Jetpack checks login attempts against a blacklist of malicious IP addresses, and locks out any IP address that makes too many failed attempts (How to Make Your WordPress Login Secure). It blocks malicious traffic before it reaches your site.
| Setting | Suggested value | What it does |
|---|---|---|
| Allowed login attempts | 3 to 5 | Stops a bot after a few failures |
| Lockout time | 20 minutes | Blocks the IP long enough to break the attack |
| Always-allowed IPs | Your own IP only | Keeps admins from locking themselves out |
Jetpack also counts the attacks it blocks, so you can see the scale of the problem. Only add IP addresses you control to the always-allowed list, and only for administrator accounts.
How do you limit login attempts with Limit Login Attempts?
Limit Login Attempts Security caps failed logins and locks out repeat offenders, with more than 1 million active installs.
- Install Limit Login Attempts Security from \“Plugins → Add New\”.
- Open \“Settings → Limit Login Attempts\” in the dashboard.
- Set the allowed retries, such as 4, and the lockout time, such as 20 minutes.
- Add your own IP address to the allowlist so you never lock yourself out.
DreamHost describes it as one of the most widely used WordPress login security plugins, with more than a million active installs as of August 2026 (Limit Login Attempts Reloaded: Setup Guide). It also adds two-factor authentication, IP and country blocking, and a firewall.
Do not install two login-limit plugins at once. They can lock each other out or double-count failures, and one clear limit is easier to manage than two.
If you already run Wordfence, check its login security first. Our guide to set up the Wordfence firewall explains the login tools it includes.
How do you add two-factor authentication?
Two-factor authentication asks for a code from your phone as well as your password.
- Pick a 2FA option: Jetpack has a built-in toggle, and Limit Login Attempts Security includes it too.
- In Jetpack, open the two-factor settings and turn the feature on.
- Scan the code with an authenticator app and save the backup codes.
- Test a login with the code before you log out.
Jetpack has a built-in two-factor authentication option that you can toggle on in just a few seconds (How to Make Your WordPress Login Secure). Turn it on for every administrator and editor, not just your own account.
Save backup codes when you turn 2FA on. Jetpack and most authenticator setups show one-time backup codes during setup, and those codes are the only way back in if you lose your phone.
A stolen password alone is then useless, because the attacker still needs the code. Keep backup codes somewhere safe, or a lost phone can lock you out of your own site.
How do you protect wp-login.php and xmlrpc.php?
Protect wp-login.php and xmlrpc.php, because bots target both files directly.
- Limit login attempts so a bot stops after a few failures.
- Block xmlrpc.php at the firewall if you do not use Jetpack or remote publishing.
- Hide the login page behind a firewall rule that challenges unknown visitors.
- Force strong passwords for every user who can publish.
Jetpack Security includes a web application firewall that stops bots before they reach wp-login.php and xmlrpc.php (How to Prevent Brute Force Attacks on WordPress). A firewall rule is the only fix that also protects the server, because it drops the flood before WordPress sees it.
A cloud firewall adds the same protection from outside WordPress. Sucuri WAF blocks malicious traffic before it reaches the server, so login floods never touch wp-login.php (Web Application Firewall).
Wordfence 9.1.0, released on 10 November 2026, added Live Traffic logging for application password and REST API login failures (Wordfence). That log shows login abuse that never touches the normal login form.
How do you check whether an attack is happening?
Check for an attack in your security plugin log, your host traffic stats, and the login page itself.
Look for these signs:
- Many failed logins from one IP address in a short time.
- Failed logins for usernames that do not exist, especially admin.
- Slow admin pages during a flood of login requests.
- Lockout emails from your security plugin.
Jetpack reports blocking thousands of brute force attempts over a typical site lifetime (How to Prevent Brute Force Attacks on WordPress). If your plugin shows a sudden rise, tighten the lockout time and check that two-factor authentication is on for every admin.
Check the log weekly, not daily. A small site may see a handful of failed logins a day, which is normal background noise.
A sudden jump to hundreds per hour means a bot found the site and started a campaign.
If the login page keeps refreshing or redirecting, the problem may be a setting rather than an attack. Our guide to fix a login page that refreshes and redirects covers the common causes.
What mistakes should you avoid?
The biggest mistake is adding login limits and then forgetting the allowlist for your own IP.
Avoid these errors:
- Using the admin username with a weak password.
- Letting every user skip two-factor authentication.
- Installing two login-limit plugins that fight each other.
- Blocking xmlrpc.php while Jetpack still needs it.
- Ignoring lockout emails until the site is already slow.
Review your user list every few months. Delete accounts nobody uses, and lower the role of anyone who no longer needs to publish.
Fewer accounts mean fewer targets, and an old editor account with a weak password is a common way in.
After a lockout, check the cause before you raise the limit. Raising the limit to stop your own lockouts also helps the bots, so allowlist your IP instead.
If password reset emails never arrive, the lockout may not be the problem. Our guide to fix a missing password reset email explains the mail settings to check.
Frequently asked questions
How many login attempts should I allow?
Allow 3 to 5 failed attempts, then lock the IP out for about 20 minutes. Jetpack shows this pattern in its own code example, with 3 attempts and a 20-minute lockout. Longer lockouts frustrate real users who mistype, while shorter ones barely slow a bot.
Will limiting logins lock out real users?
Only after repeated failures, and only for the IP address that failed. Real users can still log in from another network, and you can allowlist your own IP address. If a user is locked out, they can wait for the lockout to expire or reset their password.
Should I change the login URL?
Changing the login URL helps against bots that only try wp-login.php, because they cannot find the form. It is not a substitute for login limits and two-factor authentication, since a determined attacker can still find the new address. Use it as an extra layer, not the only one.
Does two-factor authentication stop brute force attacks?
It stops the attacker from using a guessed password, because they still need the code from your phone. It does not stop bots from hammering the login page, so combine it with login limits and a firewall. Together, the three layers cover guessing, use, and floods.
What if I lock myself out?
Wait for the lockout to expire, then log in from an allowlisted IP address. If you cannot get in at all, disable the plugin through your host file manager or FTP by renaming its folder, then log in and fix the settings. Re-enable the plugin once your IP is allowlisted.
Sources
Is your product missing, or something out of date?
Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.
Thanks — we review requests within 3 business days.
