Two-factor authentication (2FA) adds a second step to your WordPress login: after your password, you enter a code from an app on your phone or another method. Even if someone steals your password, they cannot log in without that second factor. WordPress does not include 2FA by default, but free plugins add it. This guide walks through setting it up with the free Two Factor plugin.
Passwords get reused, guessed and leaked. For a site you have spent months building, relying on a password alone is a risk.
2FA takes a few minutes to set up and adds a few seconds to each login.
Key takeaways
- 2FA asks for a second code after your password.
- WordPress does not include 2FA by default; a plugin adds it.
- The free Two Factor plugin supports authenticator apps, email codes and backup codes.
- Authenticator apps are generally more secure than email codes.
- Save your backup codes somewhere safe.
- Each user sets up their own 2FA in their profile.
How 2FA works
| Factor | Example |
|---|---|
| Something you know | Your password |
| Something you have | A code from an authenticator app on your phone |
Both are needed to log in. A stolen password alone is not enough.
The Two Factor plugin
Two Factor is a free plugin on WordPress.org, developed by community contributors. As of November 2026 its plugin page lists 100,000+ active installations. It supports:
- Authenticator app (TOTP): apps such as Google Authenticator, Authy or 1Password generate a new code every few seconds. The plugin page recommends this method.
- Email codes: a one-time code sent to your WordPress email address.
- Backup codes: one-time codes for emergencies, such as losing your phone.
Other security plugins also offer 2FA. If you already use one, check whether it includes 2FA before adding another plugin.
How to set it up
- Back up your site before installing a security plugin. See how to back up WordPress.
- Install Two Factor. Go to Plugins, then Add New, search for “Two Factor”, then install and activate it.
- Open your profile. Go to Users, then Profile.
- Find “Two-Factor Options”. Scroll down to this section.
- Enable an authenticator app. Scan the QR code with your app and enter the code it shows to confirm.
- Enable backup codes. Generate them and store them safely.
- Choose your primary method and click Update Profile.
- Test it. Log out and log in again to check the second step works.
Don’t lock yourself out
Keep your backup codes somewhere safe, away from your phone, such as a password manager. If you lose your phone and your codes, you may need your host’s help to regain access.
Other users
Each user sets up their own 2FA in their profile. Administrators can edit other users’ profiles, but it is best for each person to scan their own QR code on their own phone.
Start with administrator and editor accounts, because they can change the most.
2FA is one layer
2FA protects logins. It works best alongside other basics:
- Strong, unique passwords stored in a password manager.
- Updated WordPress, plugins and themes. See how to update WordPress safely.
- Regular backups.
- HTTPS on the whole site. See SSL and WordPress.
My WordPress security guide covers the rest.
Frequently asked questions
Does WordPress have built-in two-factor authentication?
Not by default. You add it with a plugin such as Two Factor.
Which 2FA method is best?
An authenticator app is generally more secure than email codes. The Two Factor plugin recommends it.
What if I lose my phone?
Use one of your backup codes to log in, then set up 2FA again on a new phone.
Is the Two Factor plugin free?
Yes. It is a free plugin on WordPress.org.
Does 2FA slow down my site?
No. It only adds a step when users log in.

Nayan Dhumal