A stolen password is all it takes to lose a WordPress site: passwords leak in breaches, get reused across sites, and fall to automated guessing attacks. That is why learning how to add two-factor authentication to WordPress is the highest-value security job on most sites: ten minutes, $0, and a correct password alone stops being enough.
The catch is that WordPress still ships no built-in two-factor authentication, so the method you choose matters. This guide to how to add two-factor authentication to WordPress compares the three free routes that work in 2026 — Wordfence, WP 2FA by Melapress, and miniOrange — and walks through the setup of the best one for most sites. Every fact was checked against the official plugin pages on 23 November 2026, including one change that breaks most older tutorials: the standalone Wordfence Login Security plugin closed permanently in August 2026.
In this guide
- The short answer: WordPress has no built-in 2FA
- What 2FA protects — and the doors it does not cover
- The 3 free methods compared at a glance
- Method 1: Wordfence — free 2FA inside the security plugin
- Method 2: WP 2FA by Melapress — the enforcement pick
- Method 3: miniOrange — Google Authenticator and passkeys
- How to add two-factor authentication to WordPress step by step
- Enforcing 2FA for every user on your site
- Locked out? Backup codes and recovery when you lose your phone
- Mistakes that lock you out or leave you exposed
- Frequently asked questions
- Our verdict
The short answer: WordPress has no built-in 2FA
The first thing to understand about how to add two-factor authentication to WordPress is what does not exist. As of WordPress 7.1.4 in November 2026, core ships no native two-factor authentication and no passkey support. A default install authenticates on a username and password alone, with no dashboard setting for a second step. WordPress’s own brute-force guidance says the same: core does not include 2FA, so it has to come from a plugin or an identity provider.
WordPress’s documentation calls passwords the weakest part of most online logins, because they can be guessed and may leak in breaches. Brute-force attacks are automated and often botnet-driven. The official guidance recommends 2FA for all administrators and privileged users — then leaves the job to plugins, which is why this guide to how to add two-factor authentication to WordPress starts with the plugin choice.
So the honest answer to how to add two-factor authentication to WordPress is a plugin, full stop. All three methods in this guide are free, work with any authenticator app you already have, and take about ten minutes to set up. Pick one plugin, follow the steps below, and save your backup codes before you log out.
What 2FA protects — and the doors it does not cover
Two-factor authentication adds a second proof after the password. After your password, you enter a six-digit code from an authenticator app, or approve a passkey with your fingerprint. The code changes every 30 seconds, so a leaked password alone fails at the second step.
That stops credential stuffing, phishing, and automated password guessing — but the limits matter as much as the protection when you plan how to add two-factor authentication to WordPress properly.
A 2FA plugin protects the login form at wp-login.php — and, on most plugins, nothing else. It does not cover XML-RPC, which accepts a username and password inside every request. It does not cover application passwords, the per-application credentials WordPress has included since version 5.6 for REST API access: they authenticate over a header and skip your second factor by design. And it does not cover your hosting account, FTP, or database access.
Close those side doors too: disable XML-RPC if nothing uses it, and audit application passwords under Users → Profile. Then your 2FA claim covers every door — a point this guide on how to add two-factor authentication to WordPress returns to below.
The 3 free methods compared at a glance
All three plugins below give you real two-factor authentication for $0, and all three work with Google Authenticator, Authy, 1Password, or any TOTP-compatible app. They differ in what else they do, how they enforce 2FA across a team, and where the free version ends — the comparison that decides which to install for how to add two-factor authentication to WordPress.
| Method | Free 2FA methods | Enforce by role | Backup codes | Passkeys | Best for |
|---|---|---|---|---|---|
| Wordfence | TOTP app codes, recovery codes | Yes, per role | Yes | Yes, free | Sites that want 2FA plus a firewall |
| WP 2FA by Melapress | TOTP app codes, email codes | Yes, with grace period | Yes, 16-digit | Listed in free version | Teams that must force 2FA on staff |
| miniOrange 2FA | TOTP app codes, email OTP, security questions | Yes, in free version | Yes | Yes, free | Google Authenticator fans, WooCommerce |

Method 1: Wordfence — free 2FA inside the security plugin
Wordfence is the best-known name in WordPress security, with more than five million active installs, and its two-factor authentication is free inside the main Wordfence Security plugin. It supports any TOTP-based authenticator app, offers passkeys, and lets you require 2FA per user role. It also works on the WooCommerce customer account page, so store customers are covered without a second plugin.
One change breaks most older tutorials on how to add two-factor authentication to WordPress with Wordfence: the standalone Wordfence Login Security plugin was closed permanently on 17 August 2026 and is no longer available for download. Its features now ship inside the main Wordfence plugin, so install Wordfence Security, not the old standalone listing.
Wordfence is also the only option here that covers XML-RPC: block its logins outright, or accept the TOTP code appended to the password. It adds login-page CAPTCHA and blocks logins using compromised passwords; passkeys arrived in version 9.0.0 (August 2026) for free and premium installs alike.
The trade-off is weight: a full suite with a firewall, a malware scanner, and live traffic logging is a lot to accept for a second login factor. Paid tiers buy real-time firewall rules and faster support; login security itself is not behind the paywall. If Wordfence is already installed, use its login security module — the simplest answer to how to add two-factor authentication to WordPress when Wordfence is already installed. Our WordPress security checklist covers the rest of the hardening.
Method 2: WP 2FA by Melapress — the enforcement pick
WP 2FA by Melapress is a dedicated two-factor plugin, and it is the one to choose for how to add two-factor authentication to WordPress when other people log in to your site. Its free version includes authenticator-app (TOTP) codes, codes over email, 16-digit backup codes, and passkeys listed on its WordPress.org page, and it works with Google Authenticator, Authy, and any TOTP-compatible app. It has more than 100,000 active installs, a 4.7 out of 5 rating, and version 4.3.0 was released on 4 November 2026.
What sets WP 2FA apart is enforcement. Where other plugins let users opt in, this one is built around policies: pick the roles that must use 2FA, set a grace period, and the setup wizard nags everyone into compliance without them needing dashboard access. It also offers frontend setup pages, multisite policies, and a REST API for custom login flows.
The free version covers the important work for most sites learning how to add two-factor authentication to WordPress for a team. Premium starts at $79 a year for one site and adds trusted devices, YubiKey support, SMS codes, Authy push notifications, one-click email login links, white labelling, and WooCommerce integration. Premium support is one-to-one email; free support runs through the WordPress.org forums only.
Method 3: miniOrange — Google Authenticator and passkeys
The miniOrange plugin — listed as “miniOrange 2FA” and long known as the Google Authenticator plugin for WordPress — has the widest method menu of the three. Its free plan supports unlimited users with Google Authenticator (TOTP), passkeys, email OTP, and security questions, plus backup codes and WooCommerce 2FA, and its WordPress.org listing states that passkey and TOTP verification happen entirely on your own site.
Two cautions belong in any honest account of how to add two-factor authentication to WordPress with miniOrange. First, the free user limit has changed between versions: older releases capped free setups at three or five users, while the current 6.6.0 listing states unlimited users — check the version you actually install rather than trusting an old review. Second, it requires a miniOrange account even for free TOTP setup.
Premium adds push notifications, SMS, WhatsApp and Telegram OTP, hardware tokens, trusted devices, branding, and multisite support; prices are not published on the listing, so confirm before paying. For a solo admin who wants Google Authenticator with the most method choices and no per-user charge, miniOrange is a strong free pick for how to add two-factor authentication to WordPress; for a team that needs enforcement without an external account, WP 2FA is the cleaner fit. If you customise the login page itself, our guide to creating a custom login page in WordPress pairs with any of the three methods here.
How to add two-factor authentication to WordPress step by step
The steps below use WP 2FA by Melapress, with the clearest setup wizard of the three. The same shape applies to the other two plugins: install, scan a QR code, confirm with a code, save backup codes, test a logout and login. This is the core of how to add two-factor authentication to WordPress.
Step 1: Install WP 2FA and open the wizard
In your dashboard, go to Plugins → Add New and install WP 2FA by Melapress. Activate it, and the setup wizard opens. If it does not open, find it under Users → Your Profile.
Step 2: Scan the QR code with your authenticator app
Choose the authenticator-app method, then open Google Authenticator, Authy, 1Password, or any TOTP app on your phone and scan the QR code on screen. The app adds a WordPress entry showing a new six-digit code every 30 seconds. Do not close the setup screen until the next step confirms the code works.
Step 3: Confirm with a code and save your backup codes
Enter the current six-digit code to confirm, then generate your 16-digit backup codes and store them offline — printed on paper, or in a password manager. These single-use codes are your way back in if your phone is lost, stolen, or reset.
Step 4: Test a full logout and login
Log out, then log back in and enter the code from your app. If the login succeeds, 2FA is live on your account. If the code is rejected, check your phone’s clock is set automatically — TOTP codes depend on accurate time. Then confirm your backup codes are stored where you can reach them without the phone — the step most people skip when learning how to add two-factor authentication to WordPress.
That is the whole flow for how to add two-factor authentication to WordPress on a single account — next, extend it to everyone else who logs in.
Enforcing 2FA for every user on your site
Setting up 2FA for yourself is the easy part of how to add two-factor authentication to WordPress. The hard part is the other accounts: editors, shop managers, contributors, and anyone else with a login. WordPress’s own guidance recommends 2FA for all administrators and privileged users — one unprotected admin undoes your own setup entirely.
WP 2FA handles this with policies: choose which roles must use 2FA and set a grace period, a number of days in which users can log in normally while the wizard reminds them to set it up. When the grace period ends, anyone in a required role who has not configured a method cannot log in until they do. Wordfence offers required 2FA per role too, and miniOrange includes role-based enforcement in its free version.
Start with administrators and publishers, then extend the policy. WooCommerce stores should consider the customer role as well: Wordfence covers the customer account page, WP 2FA’s premium tier adds WooCommerce integration, and miniOrange includes WooCommerce 2FA free. Customers reuse passwords more than staff do, so a store that protects only its staff protects only half its accounts — which is why any plan for how to add two-factor authentication to WordPress on a store should cover customers too.
Locked out? Backup codes and recovery when you lose your phone
Losing your phone is the scenario everyone imagines when they hesitate over how to add two-factor authentication to WordPress — and it is the scenario backup codes exist for. Every method here generates single-use backup codes during setup. At the login prompt, enter one unused backup code; each works once, so generate a fresh set after using one.
If you have no backup code either, recovery depends on the site having another administrator: a second admin can disable 2FA for the locked-out account from the dashboard, which is the best reason to keep at least two admin accounts with 2FA enabled. A solo admin without backup codes needs direct site access to disable the plugin — which is why this guide to how to add two-factor authentication to WordPress insists on saving the codes before you log out.

Three habits prevent the lockout entirely. First, save backup codes in two places, one of them offline. Second, set up the same TOTP secret in a second app or a password manager with TOTP support. Third, test recovery once: log in with a backup code on purpose, then generate a fresh set. A recovery path you have never tested is a hope, not a plan — the most practical lesson in how to add two-factor authentication to WordPress safely.
Email-code methods also depend on your site actually sending mail — check our guide to WordPress not sending emails before choosing email codes as your only method.
Mistakes that lock you out or leave you exposed
Most failures in how to add two-factor authentication to WordPress happen before a single login is protected:
- Installing two 2FA plugins at once. Both interrupt the same login screen, and the conflict can lock you out. Pick one method from the comparison above — the first rule of how to add two-factor authentication to WordPress safely.
- Following an old Wordfence tutorial. The standalone Wordfence Login Security plugin closed permanently on 17 August 2026 — install the main Wordfence Security plugin instead.
- Skipping the backup codes. The setup screen shows them once for a reason: no saved codes and a lost phone means recovery through another admin or direct site access.
- Enforcing 2FA before testing it. Test your own login and a backup-code login first, then enforce.
- Believing 2FA covers every door. A login-form second factor does not protect XML-RPC or application passwords. Disable XML-RPC if nothing uses it, audit application passwords, and protect your hosting account with 2FA too. Our WordPress backup guide is the other half of this habit: even perfect login security is no substitute for a restorable backup.
- Forgetting the password after adding 2FA. Two factors means two things to lose. Keep the password in a password manager, and if it is ever forgotten, use the reset flow in our guide to resetting your WordPress password.
Frequently asked questions
Does WordPress have built-in two-factor authentication?
No. As of WordPress 7.1.4 in November 2026, core ships no native two-factor authentication or passkey support. A default install authenticates on a username and password alone. You add 2FA with a plugin such as WP 2FA, Wordfence, or miniOrange — or through an identity provider or your host’s login layer.
How do I add two-factor authentication to WordPress for free?
Install a free 2FA plugin from the WordPress plugin directory, open your user profile, enable the authenticator-app method, scan the QR code with Google Authenticator or any TOTP app, enter the six-digit code to confirm, and save your backup codes offline. WP 2FA by Melapress, Wordfence Security, and miniOrange 2FA all offer this flow for $0.
What is the best free 2FA plugin for WordPress?
It depends on the site. Wordfence is best if you want 2FA plus a firewall and malware scanner in one free plugin. WP 2FA by Melapress is best for teams, because role policies with grace periods are free. miniOrange is best for the widest choice of free methods, including passkeys and security questions. Do not install more than one at a time.
What happens if I lose my phone with Google Authenticator?
Use one of your single-use backup codes at the login prompt — WP 2FA generates 16-digit backup codes, and Wordfence and miniOrange generate recovery codes the same way. If you have no backup code, another administrator can disable 2FA for your account from the dashboard. A solo admin without backup codes needs direct site access to disable the plugin.
Does 2FA protect XML-RPC and the REST API?
Not by itself. 2FA plugins protect the wp-login.php form; XML-RPC accepts credentials without a form to interrupt, and application passwords authenticate the REST API on a separate path that bypasses the login prompt by design. Wordfence can block XML-RPC logins or require a TOTP code appended to the password. If nothing uses XML-RPC, disable it, and audit application passwords regularly.
Can I require 2FA for WooCommerce customers?
Yes. Wordfence covers the WooCommerce customer account page, WP 2FA offers WooCommerce integration in its premium tier, and miniOrange includes WooCommerce 2FA in its free version. Role-based enforcement in any of the three lets you require 2FA for the customer role, which matters because customers reuse passwords more than staff do.
Our verdict
The honest answer to how to add two-factor authentication to WordPress in 2026 is a free plugin, because core still ships no built-in 2FA as of WordPress 7.1.4. For most sites, install WP 2FA by Melapress: authenticator-app and email codes, 16-digit backup codes, and role policies with a grace period are all free, with Premium from $79 a year only if you need trusted devices or SMS.
If Wordfence is already installed, use its login security module instead, and if you want the widest free method menu, miniOrange adds passkeys and security questions for $0. Whichever you pick, save backup codes offline, test a full logout and login, close the XML-RPC and application-password side doors, then enforce 2FA on every role.