# Two-Factor Authentication for WordPress

> Require a code from an authenticator app or email after the password, with backup codes and trusted devices. Lost your device? Use a backup code, or add…

TW-SEC-17 Security


Require a code from an authenticator app or email after the password, with backup codes and trusted devices. Lost your device? Use a backup code, or add TOGGLEWORKS\_SAFE\_MODE to wp-config.php.

[Get it from $26 a year](https://togglework.app/pricing/#plans) [Try it in the demo](https://togglework.app/demo/)

Two-Factor Authentication

**Part number**
: TW-SEC-17
**Section**
: [Security](https://togglework.app/features/security/)
**Settings**
: 4
**Starts**
: Switched off
**In plans**
: Every plan

## Why it matters

Passwords leak: reused on a site that was breached, typed into a phishing page, saved on a laptop that was stolen. Two-factor authentication means a password alone is no longer enough to log in, which shuts out the most common way admin accounts are taken over.

The hard part is getting people to use it. This part is built around that: a grace period, an email fallback, backup codes and trusted devices.

### What it does

- Codes from an authenticator app (TOTP) or by email after the password.
- Required for the roles you choose; everyone else can turn it on from their profile.
- A grace period (default 7 days) before it is enforced for required roles.
- Backup codes, and “trust this device” for a number of days (default 30).
- A [passkey](https://togglework.app/features/security/passkeys/) sign-in counts as two-factor, so passkey users aren’t asked twice.

![Two-Factor Authentication settings screen in the Toggleworks WordPress plugin, showing Require two-factor for these roles, Allowed methods, Trust a device for (days), Grace period for required roles (days)](https://togglework.app/wp-content/themes/toggleworks-site/assets/img/parts/security-two-factor.webp?v=1795524241)

The Two-Factor Authentication screen in wp-admin, where you switch it on and change its settings.

## Set it up

1. Switch Two-Factor on and choose the roles that must use it: at least Administrator, and Shop Manager on stores.
2. Set up your own account first from your profile, and save the backup codes somewhere safe.
3. Tell your team. They have the grace period to set it up before it is enforced.

## What you can set

Switch Two-Factor Authentication on in Toggleworks → Security, then adjust any of these. Each one starts with a default, so you can switch the part on first and fine-tune later.

- Require two-factor for these roles
- Allowed methods Authenticator app (TOTP) · Code by email (also used as a fallback)
- Trust a device for (days)
- Grace period for required roles (days)

## Good to know

- Email codes are only as safe as the mailbox. Encourage an authenticator app for admin accounts.
- Make sure WordPress email actually arrives before relying on email codes; see [SMTP](https://togglework.app/features/email/smtp/).
- Lost device and no backup codes? `TOGGLEWORKS_SAFE_MODE` in wp-config.php pauses the requirement.

[Guide: The WordPress security checklist, in the order that matters](https://togglework.app/guides/wordpress-security-checklist/)

## One less plugin to install

Two-Factor Authentication does a job people often install a separate plugin for:

- Two-factor loginOften done with Wordfence
- Two-factor and passwordless loginOften done with Solid Security

## Comes with 187 more parts

Two-Factor Authentication is one part of Toggleworks, a single plugin for security, speed, SEO, backups, email and store tools. Switch on what your site needs; the rest stays off and loads nothing.

[All 18 Security parts](https://togglework.app/features/security/)

### People also look for it as

- 2fa
- mfa
- totp
- authenticator
- google authenticator
- otp
- backup codes
- two step

## Often switched on with it

- [Email & SMS Login Codes](https://togglework.app/features/security/login-codes/) — TW-SEC-08 · Let people log in with a one-time code sent to their email (or phone by SMS) instead of a password, and sign up by confirming… · 7 settings
- [Activity Log](https://togglework.app/features/security/activity-log/) — TW-SEC-01 · Keep a record of logins, user and role changes, plugin and theme changes, core updates, content changes and key settings. · 2 settings
- [CAPTCHA](https://togglework.app/features/security/captcha/) — TW-SEC-02 · Stop bots on the login, registration, lost password and comment forms with a simple math question or Cloudflare Turnstile. · 4 settings
- [Content Protection](https://togglework.app/features/security/content-protection/) — TW-SEC-03 · Make casual copying harder: block right click, text selection, copy and paste, image dragging, printing and the view-source /… · 5 settings
- [Custom Login URL](https://togglework.app/features/security/login-url/) — TW-SEC-11 · Move the login page to a secret address and hide wp-login.php and /wp-admin from visitors who are not logged in. Forgot the… · 3 settings
- [Editor Restrictions](https://togglework.app/features/security/editor-restrictions/) — TW-SEC-04 · Let a client, freelancer or team member edit only the pages and posts you pick. Set it on each user’s profile; everything else is… · Own screen in wp-admin

## Questions

**Which authenticator apps work?**

Any app that supports standard TOTP codes: Google Authenticator, Microsoft Authenticator, 1Password, Bitwarden, Authy and others.

**What happens to users who don’t set it up in time?**

After the grace period, they must enter a code sent by email at login, and can only reach their profile until they finish setting it up.

**Is Two-Factor Authentication included in every Toggleworks plan?**

Yes. Every plan includes all 188 parts, Two-Factor Authentication among them. Plans differ only in how many sites you can use them on, and staging or local copies of a site don’t count.

**Does Two-Factor Authentication slow my site down when it’s switched off?**

No. Every part starts switched off, and a part that is off loads none of its code. Switch on Two-Factor Authentication only if your site needs it.

## Switch off the plugin pile.

All 188 parts, one license, updates and support. 14-day refund.

[Choose a plan](https://togglework.app/pricing/#plans) [Try the live demo](https://togglework.app/demo/)

---

Source: https://togglework.app/features/security/two-factor/
