Short answer: Use a unique admin username, long unique passwords and two-factor authentication, limit failed login attempts, and remove unused accounts. Optional extras include a firewall rule or an extra password on the login page.
Why the login page is targeted
Bots try thousands of username and password combinations on wp-login.php every day. Weak or reused passwords are the most common way in. See brute-force attacks.
The essentials
- No "admin" username. Create a new administrator with a unique name and delete the old one.
- Long, unique passwords stored in a password manager.
- Two-factor authentication for every administrator. See 2FA.
- Limit login attempts with a security plugin.
- Remove old users and lower roles where possible. See WordPress user roles.
Optional extra layers
- An extra password on wp-login.php using cPanel's Directory Privacy or your security plugin.
- Blocking xmlrpc.php if you don't use it. See xmlrpc.php.
- A web application firewall. See what a WAF is.
Frequently asked questions
Should I change the login URL?
It reduces noise from bots but isn't real security on its own. Strong passwords and 2FA matter more.
What if I'm locked out?
Use your hosting control panel to reset the password in the database or disable the security plugin temporarily.



