This guide is for small business owners, bloggers and agency staff who log in to WordPress with nothing more than a username and password. You will see why a password alone is a weak lock, which second-step methods exist, how to set up the free Two-Factor plugin, and what to do if someone gets locked out. The plugin details below come from its WordPress.org page as it read when this article was written, so check the page for changes before you start.
Why a password alone is not enough
The WordPress documentation on two-step authentication calls passwords the weakest part of most online logins, because they can be guessed and may leak in server breaches. The same page describes true two-step authentication as using two of three factor types: something you know (a password), something you have (a phone or hardware key) and something you are (a biometric). In practice, most systems today combine a password with a device you hold.
WordPress’s guidance on brute force attacks describes them as automated, often botnet-driven attempts to guess username and password combinations, and notes that even failed attempts can overload a site. It recommends long, unique passwords stored in a password manager, and it recommends enabling 2FA for all administrators and other privileged users. It also states that WordPress core does not include 2FA (as of 2025), so it has to come from a plugin or an identity provider.
2FA does not replace the other basics. Keep core, themes and plugins updated, limit the number of administrator accounts and keep tested backups. Our guide to automatic off-site WordPress backups covers that last point.
The main 2FA methods compared
The Two-Factor plugin page lists the methods it supports and how it labels them. The table summarises them, plus passkeys, which the WordPress security documentation also recommends.
| Method | What it is | What the sources say |
|---|---|---|
| Authenticator app (TOTP) | A time-based code from an app on your phone, set up by scanning a QR code | Marked “Recommended” in the plugin; works with apps such as Google Authenticator, Authy and 1Password |
| Backup codes | Ten one-time codes for emergencies | Marked “Recommended” in the plugin |
| Email codes | A one-time code sent to the email address on the WordPress account | Listed as an available method, without the “Recommended” label |
| Security keys and passkeys | Hardware keys or WebAuthn passkeys | FIDO U2F support was removed from the plugin; the plugin FAQ points to a separate “Two-Factor Provider: WebAuthn” plugin |
The WordPress documentation also mentions SMS codes and says SMS is not a secure channel, with smartphone apps and plugins presented as more secure alternatives. For most small sites, an authenticator app plus a stored set of backup codes is a sensible starting point. Email codes are easier but depend on the security of the mailbox, so protect that mailbox with its own 2FA.
For passkeys, the brute force page describes them as phishing-resistant, passwordless login and advises enrolling at least two authenticators per admin. Because the Two-Factor plugin does not include passkey support itself, check the WebAuthn add-on’s own page and reviews before relying on it.
Before you start
- Check requirements. The plugin page lists WordPress 7.0 or higher and PHP 7.4 or higher.
- Take a backup. A fresh backup means you can roll back if anything goes wrong.
- Use an authenticator app on a phone you control. Install it first so you are ready to scan a QR code.
- Keep a second admin session open while testing, in case of a setup mistake.
If your site is busy or customised, trying the plugin first on a copy is wise. See how to use a WordPress staging site before you update.
Step-by-step: set up the Two-Factor plugin
- In your dashboard, go to Plugins, then Add New Plugin, and search for “Two-Factor”. Choose the plugin published on WordPress.org (the page lists its author as WordPress.org with community contributors), then click Install Now and Activate.
- Go to Users, then Your Profile, and scroll to the Two-Factor Options section.
- Enable the authenticator app (TOTP) method. Scan the QR code with your app, then enter the code it shows to confirm. The exact on-screen wording may differ by plugin version.
- Enable backup codes and generate your set. The plugin page says it generates 10 one-time codes. Store them before you leave the page (see the next section).
- Choose your primary method, then click Update Profile.
- Open a private browser window, log in with your password and confirm that the second-step prompt appears and accepts your app code.
Administrators can also open Settings, then Two-Factor, to disable specific providers site-wide. For example, you might switch off methods you do not want staff to use. The plugin page says a “Dummy Method” exists for testing only and is available only when WP_DEBUG is enabled, so it should never appear on a live site.
Requiring 2FA for admins and editors
This is the point most guides skip. According to the plugin page, Two-Factor has no built-in way to require 2FA for all users or for specific roles, and native enforcement is a tracked feature request on GitHub. The page also says that on multisite the settings are per user, so a super admin cannot enforce 2FA from Network Admin.
In practice, that means enforcement is a process you run yourself:
- Make 2FA setup part of onboarding for every administrator, editor or anyone with a privileged role, matching the WordPress recommendation to protect all privileged users.
- Review each user’s profile periodically to see who has actually enabled a method. As an admin you can edit another user’s Two-Factor settings from that user’s profile.
- Reduce the number of privileged accounts. The security guidance recommends least-privilege roles and limiting administrators.
- If you have a developer, the plugin FAQ says the
two_factor_providers_for_userfilter, combined with custom logic, can limit providers per user or role and redirect users who have not set up 2FA. Ask them to test this on your version before depending on it.
Because each user manages their own Two-Factor settings, a user can also switch their methods off again. That is one more reason to review profiles regularly and limit who holds privileged roles.
Storing backup codes safely
Backup codes are your insurance if your phone is lost, broken or replaced. A few habits help:
- Save them in a password manager, in a secure note separate from your login password entry if possible.
- Or print them and keep the paper somewhere locked and private.
- Do not store them in the same unprotected email account used for the site, and do not leave them in a shared document.
- Remember that each code works once. When you are running low, generate a new set and replace the stored copy.
What to do if you are locked out
- Use a backup code. If you saved your codes, enter one at the second-step prompt.
- Ask another administrator. The plugin page says that if all methods are lost, a site administrator must reset the account. The FAQ’s route is Users, then All Users, edit the user, untick the enabled methods and click Update User.
- Use WP-CLI, if you have server access. The FAQ describes
wp two-factor disable --yes, which performs a full reset. Ask your host or developer if you are not comfortable on the command line. - Set it up again. Once back in, re-enroll your authenticator and generate fresh backup codes.
The WordPress documentation also notes that people who leave their phone behind may be locked out, which is the main drawback of the approach. Having a second administrator is the simplest safeguard.
Common mistakes
- Turning on 2FA without saving backup codes.
- Relying on email codes while the email account has no 2FA of its own.
- Assuming the plugin forces everyone to enrol, when the plugin page says it does not.
- Skipping other protections such as rate-limiting logins and using HTTPS.
Key takeaways
- WordPress core does not include 2FA, so add it with a plugin such as Two-Factor.
- An authenticator app plus backup codes is the combination the plugin marks as recommended.
- Two-Factor does not enforce 2FA by role, so you must make enrolment a rule for admins and editors.
- Store backup codes outside the site, and keep a second administrator for recovery.
- 2FA works best alongside strong unique passwords, updates, least-privilege roles and backups.
FAQ
Does WordPress have built-in two-factor authentication?
No. The WordPress brute force guidance states that core does not include 2FA as of 2025, so you add it through a plugin or an identity provider.
Is the Two-Factor plugin free?
It is listed in the WordPress.org plugin directory and is developed and supported by a community, with code hosted on GitHub. The page shows no paid tier.
Can I use a security key or passkey?
Not through the plugin itself. FIDO U2F support was removed, and the FAQ points to a separate “Two-Factor Provider: WebAuthn” plugin. WordPress’s guidance recommends passkeys and enrolling at least two authenticators per admin.
Which 2FA method should a small site choose?
The plugin marks authenticator app codes and backup codes as recommended; email codes are available but do not carry that label. Most small sites do well with an app and a stored set of backup codes.
