Skip to content

Protect / Two-Factor Authentication

WordPress two-factor authentication that people actually use

A stolen or reused password should not be enough to get into your site. Stack Guard adds WordPress two-factor authentication with authenticator apps, email codes and backup codes, and encrypts the secrets on your own server.

Free, more on Pro
wp-admin / Stack Guard / Access
User security console with each user's role, two-factor status and dormant administrator flags

Why it matters

Why two-factor authentication matters

Authenticator apps, email codes and backup codes, with secrets encrypted on your own server. Require it for the people who could do the most damage.

01

Stops stolen passwords cold

Leaked passwords from other sites are the most common way into WordPress. With two-factor on, the password alone gets nobody in.

02

Methods people can live with

Authenticator apps like Google Authenticator or 1Password, emailed codes for people without a phone app, and backup codes for the day a phone is lost.

03

Require it where it matters

Make two-factor mandatory for administrators on every plan, or by role and for named users on Pro.

By plan

What each plan includes for two-factor authentication

Free

$0
  • Authenticator app (TOTP) and email code methods
  • Backup codes and admin reset
  • Require two-factor for administrators
  • Secrets encrypted with AES-256-GCM

Pro adds

From $95/yr
  • Email magic link sign-in method
  • Require two-factor by role or for named users

Why WordPress two-factor authentication matters

Passwords leak. People reuse them, and when another site is breached, those passwords end up in lists that attackers try against WordPress sites. An administrator account can change everything on your site, so one reused password can be enough.

Two-factor authentication adds a second proof that only the real person has. After the password, the user enters a code from their phone or email. A stolen password alone no longer opens the door.

It matters most for administrators, but it is worth asking for from anyone who can publish, manage a shop or change settings.

How WordPress two-factor authentication works in Stack Guard

When a user who has two-factor set up signs in, Stack Guard accepts the password and then sends the browser to a second step on your sign-in address. The sign-in session is only created once the second step passes.

  • Authenticator app: Google Authenticator, Microsoft Authenticator, 1Password and similar apps show a 6-digit code that changes every 30 seconds. This is the strongest method and works on Free.
  • Email code: a code is emailed each time the person signs in. Free.
  • Email magic link: a one-click sign-in link instead of a code. Pro.
  • Backup codes: every user gets 8, and each works once, for the day a phone is lost. Free.
  • Secrets are encrypted with AES-256-GCM before they are stored, using a key derived from your site's own AUTH_KEY. Nothing is sent to an outside service.

Set up two-factor for your whole team

On the Login tab, open Sign-in security and switch on Two-Factor Authentication. Tick the methods people may choose and set how many minutes an emailed code or link stays valid (10 is a good start). Then choose who must use it under Require 2FA.

Administrators is the sensible first step and is available on every plan. Pro lets you require it for all users, chosen roles or named users, which is how you cover editors and shop managers.

Each person then opens their WordPress profile, clicks Set Up Two-Factor Authentication, scans the QR code or types the emailed code, confirms with their password and saves their backup codes in a password manager. Anyone who must use two-factor and has not set it up is taken to their profile until they do.

Who needs it, and what to plan for

Any site with more than one person signing in, a shop, a membership area or a client site is a good fit. Agencies can require it on every client site as a baseline.

Plan for lost phones. A backup code gets the person in, an administrator can reset their two-factor, and if you are the only administrator and locked out, the SMG_DISABLE_2FA switch in wp-config.php turns the step off until you remove the line.

One gap to close: apps that sign in with an application password skip the second step. If nothing needs them, switch application passwords off on the Hardening tab (Pro). XML-RPC sign-in is refused for users who have two-factor on.

Questions

WordPress two-factor authentication: questions

How do I add two-factor authentication to WordPress?

Install Stack Guard, open the Login tab, switch on Two-Factor Authentication and choose the methods to allow. Each user then sets it up from their profile with an authenticator app or email codes.

Is WordPress two-factor authentication free in Stack Guard?

Yes. Authenticator app and email code methods, backup codes, admin reset and requiring 2FA for administrators are all in Free. The email magic link method and requiring 2FA by role are Pro.

What if someone loses their phone?

They can sign in with a backup code, or an administrator can reset their two-factor. If you are the only admin and locked out, the SMG_DISABLE_2FA switch in wp-config.php turns the step off until you remove it.

Where are two-factor secrets stored?

On your own site, in your WordPress database, encrypted with AES-256-GCM using a key derived from your site's AUTH_KEY. Nothing is sent to an outside service.

Can I use two-factor without a phone app?

Yes. Email codes work for anyone who can receive email, and Pro adds an email magic link. An authenticator app is the strongest method, so keep it available for the people who can use it.

Can I require two-factor for editors and shop managers?

Yes, on Pro. Require it for all users, chosen roles or named users. On Free you can require it for administrators.

Put Stack Guard's two-factor authentication to work today.

Install Stack Guard Free in a minute, or go straight to Pro.