WordPress two-factor authentication

A WordPress 2FA Plugin Built on Authenticator App Codes

WP SecureGate adds two-factor authentication to WordPress using time-based codes from an authenticator app. After the password, the user types the 6-digit code their app shows, and that code changes every 30 seconds. It is TOTP only: there are no email codes and no passkeys, so the second factor always lives on a device the user holds.

See plans & pricingAll features
  • ✓ TOTP codes, 6 digits
  • ✓ Required by role
  • ✓ 10 backup codes per user

WordPress TOTP, and nothing else

TOTP is the standard behind authenticator apps. When a user sets it up, they scan a QR code into their app once. From then on the app produces a new 6-digit code every 30 seconds without needing a network connection, and WordPress checks it after the password.

The plugin keeps to one method on purpose. There is no option to send codes by email and no passkey support, so if you need either of those, this plugin won't provide it.

Available as soon as the plugin is active. No role is required to use it until you choose.

Require 2FA for WordPress admins, by role

You pick which roles must use two-factor: administrators only, or editors, shop managers and others too. A user in a required role who hasn't set it up yet does so during sign-in, after the password and before any session exists. There is no grace period and no "remind me later", so a stolen password alone never opens a required account, not even once.

Editors, authors and other users who can't open the security console set up their codes on a plain page under Users, so they never need access to the plugin's screens.

No roles are required by default.

10 backup codes for each user

During set-up each user gets 10 one-time backup codes. Each one replaces an authenticator code once. They are meant to be printed or stored in a password manager, away from the phone they back up.

Guessing the code is slow

A six-digit code could in theory be guessed, so wrong answers are rationed. After 10 wrong codes the second step pauses for 15 minutes. Each further pause doubles, up to a full day. Combined with the password lockout described on the WordPress brute force protection page, guessing either factor becomes very slow.

On whenever 2FA is in use.

A WordPress 2FA plugin for multisite networks

Two-factor works across a WordPress multisite network, so one set of codes covers a user on every site they can sign in to.

When a phone is lost

A lost or wiped phone shouldn't cost anyone their account. In order of convenience:

  • use one of the 10 backup codes;
  • use one of the site's 8 recovery codes, generated in advance;
  • request the single-use emergency link, emailed only to administrator addresses;
  • with server access, run wp securegate recover over WP-CLI, or add WPSG_SAFE_MODE to wp-config.php, which lifts 2FA along with the other login locks.

Always available. Recovery codes work only after they have been generated.

An alert when an admin signs in from somewhere new

Two-factor stops a stolen password. It helps to know when someone tries one, too. When an administrator signs in from a network their account has never used before, WP SecureGate records it, and emails you once if you have switched email alerts on. The email shows the IP, location, network, device and browser, so you can tell at a glance whether it was you.

The rest of the sign-in protection, from lockouts to the ownership lock, is on the WordPress login security plugin page.

Detection is on by default. Email alerts are off until you switch them on.

Part of WP SecureGate: Login security →

Related protection

Login securityLockouts, a custom login URL, password checks and 2FA, with a way back in if you ever lock yourself out.Brute-force protectionLogin lockouts per address and per account, instant locks on fake admin usernames, and XML-RPC off by default.Form CAPTCHATurnstile, hCaptcha, reCAPTCHA or a math challenge on login, comment and form-builder forms, plus a hidden honeypot.

Questions about two-factor login

No. Two-factor is TOTP only, using codes from an authenticator app. There are no email codes and no passkeys.

Yes. Choose the roles that must use it, such as administrators. Users in those roles set up their authenticator app during their next sign-in, before they get a session, and there is no grace period to skip it.

They sign in with one of their 10 backup codes and set up the app again. If those are gone too, an administrator can use a site recovery code, the emergency link emailed to admin addresses, or WP-CLI to get back in.

Yes. Two-factor works across a multisite network, so users don't need separate codes for each site.

Every feature, in every plan

One licence covers the firewall, malware scanner, login protection, WooCommerce checkout protection and everything else. Plans differ only in the number of sites, and every charge has a 7-day refund.

Choose a planAsk a question