Skip to content
Free website migration on every plan, done by our team.Learn more ›
WordPress

How to secure the WordPress login page

Protect wp-login.php with strong unique passwords, two-factor authentication, login limits, a non-obvious admin username and extra protection.

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

  1. No "admin" username. Create a new administrator with a unique name and delete the old one.
  2. Long, unique passwords stored in a password manager.
  3. Two-factor authentication for every administrator. See 2FA.
  4. Limit login attempts with a security plugin.
  5. 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.

Ready when you are

Host it where it performs

NVMe speed, offshore privacy and a written SLA — live in minutes on AuroxHost.