WordPress security guide

How to Secure WordPress Login Without Locking Out Real Users

Protect WordPress accounts with 2FA, sensible login limits, stronger passwords, and bot protection without creating unnecessary friction for real users.

What Actually Protects WordPress Login

WordPress login security should make account takeover harder without turning normal login and recovery into a problem. Start with controls that protect the account itself. Hiding the login URL and reducing account discovery come later.

ThreatBest starting control
Stolen or reused password2FA and breached-password checks
Password guessingLogin rate limiting
Credential stuffing2FA, breached-password checks, and rate limits
Automated login botsRate limiting first, then CAPTCHA if needed
Account discoveryGeneric errors and enumeration controls
Generic traffic to wp-login.phpOptional custom login URL

WordPress recommends strong passwords, two-factor authentication, rate limiting, and bot controls as practical defenses against brute-force attacks. WordPress brute-force guidance.

Start with the account, not the URL. Require 2FA for privileged users and add sensible login limits before spending time hiding wp-login.php.

Require 2FA for Privileged Accounts

Two-factor authentication is one of the strongest protections you can add to an administrator account. If a password is stolen, reused, guessed, or captured through phishing, the attacker still needs the second factor before login completes.

At minimum, require 2FA for accounts that can install software, change site configuration, manage users, publish without review, or access customer and order data.

Account typeRecommendation
AdministratorRequire 2FA
Shop ManagerRequire 2FA
Editor or staff with significant accessUsually require
Author or ContributorDepends on publishing risk
Customer, Subscriber, or MemberOptional unless the account protects sensitive or valuable data

Prefer authenticator apps for privileged users

An authenticator app is a better default for administrators because the second factor is not delivered through the same email account that may also be used for password recovery.

Email codes can still be practical for customers or members where requiring an authenticator app would create unnecessary support friction.

Plan recovery before enforcement

Every administrator should generate recovery codes and store them somewhere separate from the WordPress account. Test one during rollout so the recovery process is understood before it is needed.

For an existing team, allow a short enrollment period rather than unexpectedly blocking everyone at the next login.

Using SiteFort: SiteFort supports Authenticator App and Email Code, role-based enforcement, an enrollment grace period, remembered devices, and single-use recovery codes. Allowed methods and enforced roles are configured separately.

Limit Repeated Login Attempts

Without throttling, automated systems can keep trying passwords as quickly as the server allows. Login limits slow password guessing and credential stuffing while leaving normal successful logins alone.

A reasonable starting point

ControlStarting point
Failed attempts per IPAbout 5 attempts within 15 minutes
Failed attempts per user5 to 10 attempts
Temporary lockoutAbout 30 minutes

These are starting values, not universal rules. Offices, schools, mobile carriers, VPNs, and corporate networks may place many legitimate users behind the same public IP.

Customer-facing sites also need more tolerance than a site with only a few administrators.

Avoid permanent bans after a small number of failed attempts. An attacker should not be able to lock out another person's account simply by repeatedly entering the wrong password.

Verify it

Use a test account, enter several incorrect passwords, and confirm that the temporary limit activates and that you understand how legitimate access is restored.

Block Weak and Compromised Passwords

A useful password policy should stop weak or known-compromised credentials without forcing users into unnecessary password changes.

  • Use long, unique passwords and encourage a password manager.
  • Reject passwords known to have appeared in breaches.
  • Prevent immediate reuse when a password is changed.
  • Require a new password when compromise is suspected.
  • Avoid routine 30-, 60-, or 90-day password expiration unless a policy or compliance requirement specifically calls for it.

Current NIST guidance advises against routine periodic password changes without evidence of compromise and recommends blocking commonly used or compromised passwords. NIST password guidance.

Using SiteFort: Login Security combines separate per-IP and per-user limits with breached-password detection, stronger password requirements, 2FA, CAPTCHA, and login-response controls. Use the Login Security docs for exact settings and thresholds.

Use CAPTCHA When Bots Are Still a Problem

CAPTCHA can reduce automated login and registration traffic, but it also adds friction for legitimate users. Treat it as an additional bot-control layer rather than the first login-security setting you enable.

Start with rate limits. Add CAPTCHA when automated attempts remain high, registration is being abused, or your login policy requires an interactive bot check.

Test the forms users actually use

  • WordPress login
  • password reset
  • public registration
  • WooCommerce My Account
  • membership or LMS login forms
  • custom frontend authentication forms

Do not stop at seeing a CAPTCHA widget on the page. Confirm that failed validation actually prevents the login or registration action.

Reduce Login Noise with a Custom Login URL

Changing the default WordPress login path can reduce automated requests aimed at wp-login.php. This is useful for cutting down generic bot traffic and making login activity easier to review, but it does not replace 2FA, strong passwords, or login rate limiting.

If you change the login URL:

  • record the new URL before enabling it
  • keep hosting, SFTP, SSH, or file-manager access available
  • return 403 or 404 from the old login path rather than redirecting bots to the replacement
  • test login, logout, and password reset afterward
  • test WooCommerce, membership, LMS, and other frontend login flows

Avoid obvious replacement paths such as /login, /admin, or /signin. Automated scanners commonly try those paths as well.

Using SiteFort: Custom Login URL lets you set private login and registration paths and choose how requests to the default WordPress login endpoint respond. See the Login Security docs for the exact options.

Reduce Account Discovery

After 2FA, login limits, and password protection are in place, these secondary controls can reduce account discovery and generic automated probing.

Use generic login errors

A login response does not need to confirm whether a particular username or email address exists. A generic message such as “The login details are incorrect” reveals less than separate responses for an unknown account and a wrong password.

OWASP recommends generic authentication responses where account enumeration is a concern. OWASP Authentication Cheat Sheet.

Review username exposure outside the login form

Author archives, REST user endpoints, sitemaps, themes, and plugins can expose usernames or public profile information separately from the login form. The WordPress hardening guide covers enumeration and information exposure in more detail.

Allowing login by email instead of username can be a reasonable account policy, but it should not be treated as a replacement for 2FA or throttling.

Customer and Member Logins

A site with three administrators can use stricter login policies than a WooCommerce store, LMS, or membership site serving thousands of accounts.

  • Require 2FA for administrators, shop managers, instructors, and other privileged roles first.
  • Keep public-user lockout limits moderate and review real lockout data before tightening them.
  • Use CAPTCHA on registration only when automated signups justify the extra friction.
  • Keep password reset and account recovery easy to find.
  • Test frontend login, registration, and account pages after authentication changes.
  • Avoid overlapping 2FA or CAPTCHA enforcement from multiple security plugins.

SiteFort on customer-facing sites

When SiteFort 2FA and WooCommerce are active, customers can manage 2FA from My Account → Account security. Membership, LMS, and custom account pages can also expose SiteFort's 2FA management controls.

Use the 2FA account-page integration docs for the exact setup, shortcode, caching, and compatibility requirements.

Before You Finish

Test the login and recovery paths your users actually depend on:

  • Trigger several failed logins and confirm the temporary limit works.
  • Enroll a test administrator in 2FA and complete a normal login.
  • Test one recovery code and confirm it cannot be reused.
  • Verify password-reset and email-code delivery.
  • Confirm CAPTCHA failure actually blocks the protected action.
  • Test the custom login URL, logout, and password reset if you changed the default path.
  • Test WooCommerce, membership, or LMS login and recovery if applicable.

The right login policy meaningfully slows attackers without turning ordinary account access into a support problem.

Need the exact SiteFort configuration? Use the Login Security documentation for settings and thresholds, and the 2FA integration documentation for WooCommerce, membership, and custom account pages.