In this guide
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.