Where creative ideas grow  ·  Building and maintaining websites since 2018, from Rajshahi, Bangladesh

WordPress security 6 min read

WordPress Brute Force Attacks: How to Stop Them

Automated scripts guess WordPress passwords all day, every day. Here are 7 layers that stop wordpress brute force attacks before they get in.

Illustrated guide: WordPress Brute Force Attacks: How to Stop Them

A WordPress brute force attack is a script trying thousands of username and password combinations against your login page until one works. Most sites are hit by these automated attempts every single day without the owner noticing, so the goal is not to make an attack impossible, only slow and expensive enough that the script gives up.

These attacks target two doors: wp-login.php, the normal login form, and xmlrpc.php, an older API that lets a script test many password combinations in a single request. Both are worth locking down, because they are the most common way an otherwise well-maintained WordPress site gets hacked.

Check for existing damage first

If your site is already behaving strangely, run through our WordPress site hacked checklist before locking the login down, so you know whether an attacker already got in.

Signs your site is under a brute force attack

  • Your hosting panel or firewall log shows hundreds or thousands of login attempts from a small number of IP addresses.
  • The server slows down or hits resource limits with no unusual traffic on the public pages.
  • Security plugin alerts naming repeated failed logins for “admin” or a guessed username.
  • A spike in requests to xmlrpc.php in your access logs, often the clearest sign since normal visitors rarely touch that file directly.

Why WordPress brute force attacks still work

Attacks succeed for one of three reasons: a weak or reused password, a predictable username like “admin,” or no limit on how many times someone can guess in a row. WordPress does not lock an account out after repeated failures by default, so without added protection a script can try forever at whatever speed your server allows.

1. Fix the credentials first

This is the highest-value fix and costs nothing. Use a long, random password for every admin account, generated by a password manager rather than typed from memory. If any account is still named “admin,” create a new administrator account with a different username and delete the old one, since “admin” is the first guess every attack script makes.

Never reuse a password from another site. Credential-stuffing attacks try passwords leaked from unrelated data breaches, and a password reused anywhere is effectively already public.

2. Limit login attempts

A login-limiting plugin locks out an IP address after a set number of failed attempts, usually for a growing period of time. This alone stops the vast majority of automated brute force attacks, since most scripts move on rather than wait out a lockout. Popular options include Limit Login Attempts Reloaded and the login protection built into most all-in-one security plugins such as Wordfence or Sucuri.

3. Add two-factor authentication

Two-factor authentication (2FA) means a stolen or guessed password alone is not enough to log in; the attacker would also need a one-time code from your phone. This is the single strongest defence against brute force and credential-stuffing attacks. Our WordPress two-factor authentication setup guide walks through adding it in a few minutes.

4. Rename or restrict the login page

Most brute force scripts hit the default /wp-login.php and /wp-admin/ paths automatically, without checking whether the site even uses them. A plugin such as WPS Hide Login lets you rename the login URL to something only you know, which removes the site from a huge share of blind, automated attempts without changing WordPress itself.

Restricting wp-admin access to specific IP addresses at the server or firewall level, if your IP is stable, is an even stronger version of the same idea.

5. Disable or restrict XML-RPC

Unless you specifically use the WordPress mobile app, Jetpack, or another tool that depends on XML-RPC, you can disable it entirely. If you do need it, restrict the system.multicall method, which is what lets an attacker test hundreds of password guesses in a single XML-RPC request instead of one at a time. Security plugins typically offer this as a toggle, and the WordPress handbook covers how XML-RPC works if you want to check what depends on it first.

6. Block attacks before they reach WordPress

Stopping a WordPress brute force attack before it reaches PHP is the most efficient layer of all. A web application firewall stops malicious requests before they ever load WordPress’s PHP code, which is both safer and lighter on server resources than handling every attempt inside WordPress itself. Cloudflare’s free and paid plans include rate limiting rules that can block or challenge repeated login attempts, and OWASP’s guidance on blocking brute force attacks covers the general approach any firewall should follow.

LayerWhat it stops
Strong, unique credentialsGuessable passwords and default usernames
Login attempt limitingRepeated automated guessing against one account
Two-factor authenticationA correctly guessed or stolen password on its own
Firewall / rate limitingHigh-volume automated traffic before it reaches WordPress

7. Add a CAPTCHA or human check to the login form

A CAPTCHA on the login form adds friction that most automated scripts cannot pass, even if they know a valid username and password. It is a smaller layer than the ones above, but it is easy to add and stops the crudest, high-volume scripts outright.

Blocking brute force attempts at the server level

If you manage your own server rather than shared hosting, a tool such as Fail2ban reads your web server’s access logs and automatically bans an IP address after a set number of failed login attempts, at the firewall level rather than inside WordPress. This stops the traffic before PHP even runs, which is lighter on resources than a plugin-based limit during a large attack.

Many managed WordPress hosts already run something equivalent in front of every site on their platform, so ask your host what protection is already active before adding a second, overlapping layer.

Monitoring after you lock things down

A WordPress brute force attack rarely stops just because you added one layer of protection, so check your security plugin’s login log occasionally rather than only reacting to alerts. A sudden change in the pattern of attempts, such as a new IP range or a spike in volume, is often the first sign of a targeted attempt rather than the usual background noise every public site receives.

Want your login locked down properly?

We set up two-factor authentication, login limiting and a firewall on your WordPress site, and clean up any existing hack, from $120, with an emergency lane on WhatsApp for active attacks. Contact us or see our ongoing maintenance plan for continuous monitoring.

WordPress brute force: quick answers

How common are WordPress brute force attacks?

Very common. Automated scripts scan the web constantly for WordPress sites and test logins against them regardless of the site’s size or traffic, so even a brand-new, low-traffic site will see attempts within days of going live.

Does changing the login URL actually stop brute force attacks?

It stops the large share of scripts that only try the default /wp-login.php path without checking further, but a targeted attacker who finds the new URL is not affected. Combine it with login limiting and 2FA rather than relying on it alone.

Is XML-RPC always a security risk?

Not always; many sites need it for the WordPress app or Jetpack. The risk is specifically the system.multicall method letting an attacker try many passwords in one request, which can be restricted without disabling XML-RPC entirely.

Will a WordPress brute force attack slow down my site even if it fails?

Yes. Even unsuccessful login attempts consume server resources, and a high-volume attack can measurably slow a site or push it over a hosting plan’s resource limits, which is why blocking the traffic at the firewall level helps performance as well as security.

Sukumar Mahato

Sukumar Mahato

Founder · Full-stack developer

Founded Mahatosoft in 2018. Has shipped and rescued more than 420 projects across React, Node.js and WordPress — and still takes the emergency calls himself.

Discussion

Join the conversation

No comments yet. Share a question or what worked for you.

Leave a comment

Your email stays private. Required fields are marked *.

Free 15-minute consultation

Let’s scope your project properly.

Tell us what you need built or fixed. You get an approach, a timeline and a fixed price — usually within a few hours.