WordPress Security ServicesMalware Removal
Hardening

WordPress Login Security: 8 Steps That Actually Stop Account Takeovers

Every WordPress login page gets attacked: bots try leaked passwords and common usernames all day long. Most of that traffic is harmless if your login is set up properly. Here are the eight steps that actually stop account takeovers, roughly in order of impact.

Sergey By Sergey, WordPress security specialist Updated 2 min read
In this guide
  1. 1. Turn on two-factor authentication
  2. 2. Use strong, unique passwords
  3. 3. Stop using “admin” as a username
  4. 4. Limit login attempts
  5. 5. Give people the lowest role they need
  6. 6. Manage application passwords
  7. 7. Protect XML-RPC
  8. 8. Log and watch logins
  9. What doesn’t help much

1. Turn on two-factor authentication

The single most effective step. With two-factor authentication (2FA), a stolen or guessed password isn’t enough to log in. Wordfence, Solid Security, AIOS and dedicated 2FA plugins all offer it for free. Make it mandatory for every administrator and editor.

2. Use strong, unique passwords

Every account with editing rights needs a long, unique password, ideally from a password manager. A password that’s been used on another site that was breached is the most common way in after vulnerable plugins.

3. Stop using “admin” as a username

It’s the first username every bot tries. Create a new administrator with a different username, log in as it, and delete the old account, reassigning its content.

4. Limit login attempts

Rate limiting blocks an IP address after a few failed attempts. Most security plugins include it. If your site is behind Cloudflare, a rate limiting rule can stop attempts before they reach your server.

5. Give people the lowest role they need

Authors don’t need to be administrators. Review Users regularly and remove accounts for people who’ve left.

6. Manage application passwords

WordPress application passwords let apps log in without your main password, and they keep working after a password change. Check Users → Profile → Application Passwords and revoke any you don’t use. If you don’t use them at all, many security plugins can disable them.

7. Protect XML-RPC

xmlrpc.php can be used to try many passwords in one request. If you don’t need it, block it. See should you disable XML-RPC?

8. Log and watch logins

An activity log shows who logged in, from where, and what they changed. Turn on alerts for administrator logins. After a hack, this is often the first thing that shows how the attacker got in.

What doesn’t help much

  • Hiding the login URL reduces log noise, but it’s not real protection.
  • Hiding usernames is a small extra, not a defense. See user enumeration.
  • CAPTCHAs alone stop simple bots but not someone with a valid password.

From my cleanup work: when a hack started at the login page rather than a plugin, the story is almost always the same: an administrator with a password used elsewhere, and no two-factor authentication. On Reddit this month, a site was reinfected by someone simply logging in with a password captured during an earlier infection. Two-factor authentication would have stopped it.

Sergey, WordPress Security Specialist
About the author
Sergey, WordPress Security Specialist

10 years in WordPress security and incident investigation, and more than 200 websites cleaned of malware. Top Rated on Upwork with a 100% Job Success score. More about me

Frequently Asked Questions

Should I hide or rename wp-login.php?

It reduces bot noise in your logs, which is nice, but it's not real security. Determined attackers find the new URL, and it can break some plugins. Two-factor authentication and rate limiting protect you far better.

Is a CAPTCHA on the login page worth it?

It helps against basic bots and can reduce load. But it adds friction, and it doesn't stop an attacker with a correct password. Use it on top of two-factor authentication, not instead of it.

My login page gets thousands of attempts a day. Am I under attack?

Every WordPress site sees this. It's automated background noise. With strong passwords, two-factor login and rate limiting, it's not a threat. If it slows the site down, block it earlier, with a firewall or Cloudflare.

Need a hand?

Let me clean your WordPress site for you

Send me your site URL and what you're seeing. I'll reply with what I think is going on and the next step.

$95 per infected site · 1-month guarantee · direct contact with the specialist

Get My Site Cleaned →