If you add two-factor authentication (2FA) to your WordPress site, you turn a single password into a two-step barrier that stops most credential-theft attacks. Below you’ll find the basics of how it works, a realistic setup example, and step-by-step instructions to enable it safely.
What is two-factor authentication and how does it protect WordPress?
2FA requires two independent pieces of evidence before granting access: something the user knows (the password) and something the user has (a one-time code). When a login attempt supplies only the correct password, the second factor is still missing, so the request is rejected. This defeats automated password-spraying and credential-stuffing attacks that rely on stolen passwords.
Which 2FA methods are practical for WordPress?
- Authenticator app - Generates a time-based code (TOTP) that changes every 30 seconds. It is free, works offline, and the code never travels over email or the phone network, so it can't be intercepted there (it can still be phished, see the limits below).
- Email code - Sends a short numeric code to the user’s registered email address. Security depends on the email account’s own protection.
- SMS code - Delivers a code via text message. Convenient but can be intercepted through SIM-swap attacks; use only when an authenticator app is not possible.
How to enable 2FA on a typical WordPress installation
WordPress core has no two-factor feature, so it comes from a plugin. Menu names differ between plugins, but the steps are the same.
- Install the plugin - From the admin dashboard, go to Plugins → Add New, search for “two-factor authentication”, and install the plugin that supports TOTP, email, and backup codes.
- Activate the plugin - Click Activate and open its settings page.
- Configure global policy - Set the policy to Require 2FA for Administrators and Editors (these roles have the highest privileges).
- Choose the primary method - Select Authenticator app as the default. The plugin will display a QR code.
- Enroll each user - In each high-privilege user’s profile, click Enable 2FA, scan the QR code with any authenticator app, and enter the code it shows to confirm.
- Generate backup codes - Let the plugin create a set of single-use backup codes. Store them in a password manager or another secure location.
- Test the flow - Log out and attempt a login with an administrator account. After entering the password, you should be prompted for the TOTP code. Confirm it works before rolling out to all users.
- Secure the login page itself - Follow the guidance in secure the login page itself to limit login attempts and hide the default
wp-login.phpURL.
Common mistakes when implementing 2FA
- Enabling it only for the site owner - Attackers target any account with publishing rights. Apply the requirement to all high-privilege roles.
- Skipping backup codes - Losing a phone without a recovery option locks users out. Always generate and store backup codes safely.
- Relying on email or SMS only - These methods inherit the security of the email account or carrier; they are weaker than TOTP.
- Leaving default settings - Some plugins default to optional 2FA for administrators. Change the setting to required.
Limitations of 2FA in WordPress security
- Does not protect against phishing - If a user enters both password and TOTP on a fake login page, the attacker obtains both factors.
- Cannot stop brute-force attempts on the login form - 2FA blocks the final step, but attackers can still flood the form. Combine 2FA with rate-limiting and IP blocking as described in WordPress brute force protection.
- Does not secure non-login entry points - XML-RPC, REST API, or application passwords can bypass the login screen; they need separate hardening.
- Backup codes are a single point of failure - If they are stored insecurely, they become a shortcut for attackers.
What about application passwords and other logins?
Two-factor authentication protects the login form. WordPress also has application passwords (Users › Profile), which let apps and scripts use the REST API without the login form, and so without the second factor. Only create them when something needs them, give each one a clear name, and revoke any you don't recognise. If you don't use XML-RPC, block it, because it is another way to check a password without the login form.
How to maintain 2FA over time
- Review user roles quarterly - Ensure only necessary users have high-privilege roles and therefore 2FA requirement.
- Re-enrol after a lost device or a suspected compromise - Reset that user's two-factor setup so the old secret no longer works, and issue new backup codes.
- Audit login logs - Look for repeated failed 2FA attempts, which may indicate a targeted attack.
- Update the plugin - Keep the 2FA plugin up-to-date to receive security patches and compatibility fixes.
- Educate users - Provide brief guidance on recognizing phishing attempts and keeping their authenticator app secure.
How Silent Threads helps
Silent Threads includes two-factor authentication on the free plan, so every site can protect its admin accounts at no cost.
The short version
Enable a TOTP-based 2FA plugin, require it for Administrators and Editors, generate backup codes, and combine it with login-page hardening and brute-force protection. This simple addition turns stolen passwords into almost useless data and dramatically lowers the risk of account takeover.




