Two-Factor Authentication for WordPress: A Setup Guide

3 min read

Get this guide as a PDF FREE

Save it, print it or read it offline.

How to set up two-factor authentication on WordPress

This post may contain affiliate links. If you buy through them, I may earn a commission at no extra cost to you.

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

FactorExample
Something you knowYour password
Something you haveA 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

  1. Back up your site before installing a security plugin. See how to back up WordPress.
  2. Install Two Factor. Go to Plugins, then Add New, search for “Two Factor”, then install and activate it.
  3. Open your profile. Go to Users, then Profile.
  4. Find “Two-Factor Options”. Scroll down to this section.
  5. Enable an authenticator app. Scan the QR code with your app and enter the code it shows to confirm.
  6. Enable backup codes. Generate them and store them safely.
  7. Choose your primary method and click Update Profile.
  8. 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:

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.

Share

Written by Nayan Dhumal

I’m a blogger and graphic designer. I’ve been blogging for 3 years and I run several sites, including a free SEO tools website. I also sell printable digital products on Gumroad. Here I share what I actually learn while doing it: what ranks, what earns and what wastes your time.

Leave a Reply

Your email address will not be published. Required fields are marked *

Some links on this site are affiliate links. If you buy through them, I may earn a commission at no extra cost to you. I only recommend tools I’d use myself.