By Hridoy Ahmed | Last updated: November 2026 | 9 min read
Short answer: A brute force attack is an automated attempt to guess your WordPress login by trying many passwords. You stop it with layers, not one trick: strong unique passwords with two-factor authentication on your accounts, login limits inside WordPress, and rate limits at your firewall or CDN. Disable XML-RPC if you do not use it. Hiding the login URL reduces noise but does not replace these steps.
In this guide
- How to tell you are being attacked
- Read your log in five minutes
- Defend in three layers
- What helps a lot and what helps a little
- XML-RPC
- A 10-step setup in priority order
- What if an attack worked?
- FAQ
How to tell you are being attacked
Almost every public WordPress site gets probed by bots. The question is whether the volume hurts you or whether a guess succeeds. Watch for these signs:
- Your security plugin reports many failed logins, or you get lockout emails.
- The login page loads slowly, or the whole site slows down while the traffic is high.
- Your hosting panel shows CPU spikes or resource warnings with no matching visitor increase.
- Your access log shows repeated requests to
/wp-login.phpor/xmlrpc.php. - Someone requests
/?author=1and similar URLs, which can reveal usernames.
Read your log in five minutes
Your host usually offers raw access logs, and many security plugins keep a login log. Look at three things:
- Requests per IP. Count POST requests to the login URL for each IP address in an hour. One IP with hundreds of attempts is simple to block.
- Usernames tried. One IP trying many usernames points to guessing. Many different IPs each trying a few times points to a distributed attack that single-IP blocks will not stop.
- Success after failure. A successful login right after many failures from the same address is the one you must investigate.
If you use a CDN or proxy, make sure your server logs show the visitor’s real IP, not the proxy’s. Otherwise you may block the wrong address.
Defend in three layers
| Layer | What it does | Examples |
|---|---|---|
| Edge (before WordPress) | Stops bad traffic before it reaches your server | Rate limit on the login URL, bot challenge, firewall rules |
| Application (inside WordPress) | Limits what a visitor can try | Login attempt limits, two-factor authentication, fewer exposed usernames |
| Account | Makes a guess useless | Long unique passwords, no “admin” username, least-privilege roles |
If one layer fails, the next one still protects you. That is why a single plugin is never enough. Read more about firewalls in my guide to the WordPress firewall and about Cloudflare for WordPress.
What helps a lot and what helps a little
| Measure | Value | Note |
|---|---|---|
| Long, unique passwords from a password manager | Very high | Makes guessing impractical |
| Two-factor authentication | Very high | A correct password alone no longer works. See WordPress 2FA |
| Rate limiting at the firewall or CDN | High | Also protects your server resources |
| Allowing only known IP addresses to reach the login | High | Works well when your IP does not change |
| Extra password on the login URL (server-level) | High | Adds a second barrier before WordPress |
| Login attempt limits in a plugin | Medium | Helps, but bots can spread attempts over many IPs |
| CAPTCHA on the login form | Medium | Cuts bot traffic, adds friction for people |
| Changing the login URL | Low | Reduces noise. A determined attacker can still find it |
| Country blocking | Low to medium | Can block real users and does not stop attacks from allowed countries |
XML-RPC
XML-RPC is an old WordPress interface that lets apps talk to your site. Some apps and plugins still use it. It can also let an attacker pack many password attempts into a single request, which makes simple login limits less effective. If you do not use the mobile app, Jetpack features or another tool that needs it, disable XML-RPC. If you do need it, rate limit it and protect it with your firewall.
A 10-step setup in priority order
- Change weak passwords. Give every admin a long, unique password. Use a password manager.
- Turn on two-factor authentication for every administrator and editor.
- Remove the “admin” username. Create a new administrator with a different name, log in with it and delete the old account. Reassign the content to the new account.
- Give people the lowest role they need. Most users do not need Administrator.
- Limit login attempts. Use a trusted plugin or your host’s tool to lock a user or IP out after a small number of failures.
- Rate limit at the edge. Add a rule at your firewall or CDN for the login URL and XML-RPC.
- Disable XML-RPC if you do not use it.
- Reduce username exposure. Check whether author archives and public user lists show login names. Test your site before and after, since some themes and plugins use them.
- Keep everything updated and remove unused plugins and themes.
- Set alerts and keep backups. Get an email for new admin users and login spikes. See my WordPress security checklist.
Setting this up takes time, and mistakes can lock you out. My WordPress security service includes hardening and firewall setup.
What if an attack worked?
Signs of a successful login you did not make include an unknown administrator, changed passwords, new plugins you did not install and redirects or spam content.
- Change all passwords and security keys. Log everyone out.
- Check your users. Read unknown admin users: what to do right away.
- Scan for backdoors. See WordPress backdoors.
- Follow the steps in how to fix a hacked WordPress site.
FAQ
Is my site targeted if I see failed logins?
Probably not personally. Automated bots scan all sites. Strong protection matters more than who sent the attempts.
Does changing the login URL stop brute force attacks?
It reduces automated noise, but it does not stop a targeted attack. Use it as an extra, not as your main protection.
Can brute force attacks slow my site?
Yes. Many login requests use server resources even when they fail. Rate limiting helps.
Should I block countries?
Only if you are sure that no real user needs access from them. It is a weak defense on its own.
Do I need a security plugin?
A plugin can add login limits and alerts, but it works best together with strong passwords, 2FA and a firewall. See my comparison of Wordfence and Sucuri.
Want the login hardened without the guesswork? I set up layered protection and check it. See my WordPress security and malware removal service.
About the author: Hridoy Ahmed is an SEO specialist and WordPress security expert based in Dhaka, Bangladesh. He has 8+ years of experience and works with clients worldwide.
