Home/Blog/How to Stop Brute Force Attacks on WordPress (2026)

How to Stop Brute Force Attacks on WordPress (2026)

Laptop showing a WordPress login protected by a glowing shield and padlock

What Is a Brute Force Attack?

A brute force attack is one of the simplest โ€” and most common โ€” ways hackers try to break into a WordPress site. Automated bots hammer your login page with thousands of username and password combinations until one works. WordPress does not limit login attempts by default, which is exactly why bots love it. If your password is weak or your username is still “admin”, a brute force attack can succeed in minutes.

The good news is that you can stop brute force attacks on WordPress with a few practical layers of protection. You do not need to be a security expert, and most of the fixes below take only a few minutes each.

Why WordPress Sites Are Targeted

WordPress powers more than 40% of all websites, so attackers can reuse the same automated tools against millions of sites. Every WordPress login page lives at the same default address, /wp-login.php, and every site has the same default username pattern. Bots scan the internet around the clock looking for sites with weak credentials, and they never get tired. Even a small personal blog can face hundreds of login attempts a day.

7 Ways to Stop Brute Force Attacks on WordPress

1. Use a Strong Username and Password

Start with the basics. Delete the default “admin” username if it still exists, and create a new administrator account with a unique name. Use a password of at least 16 characters with a mix of letters, numbers and symbols โ€” a password manager makes this easy. Never reuse a password from another account.

2. Enable Two-Factor Authentication (2FA)

Two-factor authentication is the single most effective defence against brute force attacks. Even if a bot guesses your password, it still cannot log in without the one-time code from your authenticator app. Install a free plugin such as WP 2FA or Wordfence Login Security, and require 2FA for every administrator and editor account.

3. Limit Login Attempts

Limiting failed logins removes the whole point of a brute force attack. Install Limit Login Attempts Reloaded or a similar plugin and set it to allow 3 to 5 failed attempts, followed by a 30-minute lockout. Repeat offenders can be blocked for 24 hours. This one setting alone stops most automated attacks cold.

4. Change Your Login URL

Most bots only attack the default /wp-login.php address. Moving your login page to a custom address such as /secure-gateway/ with the free WPS Hide Login plugin hides it from the majority of automated scanners. This is friction rather than real protection, so use it together with the steps above โ€” never instead of them.

5. Add CAPTCHA to the Login Form

A CAPTCHA challenge on the login form filters out automated bots before they can even submit a password guess. Google reCAPTCHA or Cloudflare Turnstile both work well, and most security plugins include CAPTCHA as a built-in option. Combined with login limits, it makes brute forcing impractical.

6. Disable or Restrict XML-RPC

XML-RPC is a lesser-known back door for brute force attacks. Its system.multicall method lets an attacker test hundreds of passwords in a single request, bypassing login-page defences entirely. If you do not use the WordPress mobile app or remote publishing, disable XML-RPC completely with a plugin such as Disable XML-RPC. If you do need it, restrict it at the server or firewall level.

7. Put a Firewall in Front of Your Site

A web application firewall (WAF) blocks malicious traffic before it reaches your server. Cloudflare’s free plan can rate-limit requests to /wp-login.php and challenge suspicious visitors automatically, while a plugin firewall such as Wordfence adds a second layer inside WordPress. A firewall also protects your server from being overloaded during a high-volume attack.

Two-factor authentication protecting a WordPress login screen from brute force attacks

What to Do If You Are Already Under Attack

If your logs show a flood of failed logins, stay calm and work through this checklist. First, block the attacking IP addresses from your security plugin or hosting control panel. Second, force a password reset for every administrator account. Third, check your users list for any accounts you do not recognise and delete them. Finally, scan your site for malware with Wordfence or Sucuri, because a successful login is often followed by a backdoor being planted. A clean off-site backup is your safety net if anything looks wrong โ€” restore from it rather than trying to clean a deeply compromised site by hand.

Keep Everything Updated

Security layers only help if the software behind them is current. Enable automatic updates for WordPress core, and update plugins and themes promptly โ€” outdated plugins are the number one way attackers get in. Run PHP 8.1 or newer, since older versions have known unpatched vulnerabilities. A site that is patched, backed up and monitored recovers from almost anything.

Conclusion

Brute force attacks succeed because most WordPress sites leave the front door wide open: unlimited login attempts, weak passwords and the default login address. Close those gaps and the bots move on to easier targets. Start with strong credentials and two-factor authentication, add login limits and a firewall, and keep a tested backup ready. Your site will be dramatically harder to break into โ€” and you will sleep better for it. For more hardening steps, read our WordPress security hardening guide, and explore the free tools on KamiWeb to keep your site fast and healthy.

Frequently Asked Questions

What is a brute force attack on WordPress?

A brute force attack is an automated attempt to guess your WordPress username and password by trying thousands of combinations against the login page until one works.

Can a brute force attack hack any WordPress site?

Any site with a weak password can be hacked this way, but strong passwords, two-factor authentication and login limits make a brute force attack practically impossible to succeed.

How do I know if my WordPress site is under a brute force attack?

Look for a sudden spike in failed login attempts in your security plugin logs, or repeated login notifications from unknown IP addresses. Most security plugins show this clearly on their dashboard.

Is changing the WordPress login URL enough to stop brute force attacks?

No. Changing the login URL only hides it from basic bots. Always combine it with strong passwords, two-factor authentication and login attempt limits for real protection.