Skip to content
Web with Wordpress Logo
  • Home
  • Blogs
  • Pricing
  • About Us
  • Contact Us
Get a quote
Home / WordPress Security
WordPress Security

Two-Factor Authentication and Passkeys for WordPress: Choosing the Right Method

YuviNovember 14, 20267 min read
Two-Factor Authentication and Passkeys for WordPress: Choosing the Right Method

In almost every WordPress compromise I’ve investigated that started with a login, the attacker had a valid password. Sometimes it was guessed, more often it was reused from another site that had been breached, and occasionally it was captured by a phishing page or malware on someone’s laptop. In none of those cases did the site have a second factor protecting the account.

Two-factor authentication, usually shortened to 2FA, adds a second proof of identity after the password. Even if an attacker has the password, they can’t log in without the second factor. It’s the single most effective protection you can add to a WordPress login.

But not all second factors are equal. Some are much stronger than others, some are easier for non-technical users, and the newest option, passkeys, can replace passwords altogether. Here’s how they compare and how to choose.

What WordPress offers out of the box

WordPress core doesn’t include two-factor authentication. You add it with a plugin. Several reputable options exist, including the Two Factor plugin maintained by WordPress contributors, and 2FA features included in many security plugins.

When choosing a plugin, look for:

  • Support for authenticator apps and backup codes at minimum.
  • Support for security keys or passkeys, if you want the strongest protection.
  • The ability to enforce 2FA for specific roles.
  • Clear recovery options when someone loses their device.
  • Compatibility with WooCommerce and any custom login pages you use.
  • Active maintenance and a good security track record.

The main second factors compared

Authenticator apps (TOTP)

An authenticator app on your phone generates a six-digit code that changes every 30 seconds. You scan a QR code once to set it up, then enter the current code each time you log in. The standard behind this is called TOTP, time-based one-time passwords.

Strengths: free, widely supported, works offline, doesn’t depend on mobile networks. A big step up from passwords alone.

Weaknesses: codes can still be phished. A convincing fake login page can ask for both the password and the current code, then use them immediately. Users also need a plan for when they lose or replace their phone.

For most WordPress sites, authenticator apps are the sensible default.

Email codes

The site emails a code to the user after they enter their password.

Strengths: no app needed, easy for non-technical users.

Weaknesses: only as secure as the user’s email account. If an attacker has access to the inbox, which is common when passwords are reused, email codes add little. Delivery delays also frustrate users.

Email codes are better than nothing, and they’re a reasonable option for low-risk roles. For administrators, choose something stronger.

SMS codes

A code is sent by text message.

Strengths: familiar to most people.

Weaknesses: vulnerable to SIM swapping, where an attacker convinces a mobile carrier to move your number to their SIM card. Messages can also be delayed or not arrive when travelling. Many security professionals discourage SMS as a second factor for important accounts.

Security keys

A physical device, usually a small USB or NFC key, that you tap or plug in to confirm your login. These use the WebAuthn standard.

Strengths: highly resistant to phishing, because the key checks the website’s real domain before responding. A fake login page on a lookalike domain simply gets no response. Very fast to use once set up.

Weaknesses: costs money, and users need a backup key or another recovery method in case the key is lost.

For administrators of business-critical sites, security keys offer the strongest protection available.

Passkeys

Passkeys use the same WebAuthn technology as security keys, but the credential lives on your phone, computer or password manager, often synced across your devices. You confirm logins with your fingerprint, face or device PIN.

Passkeys can be used in two ways:

  • As a second factor, after a password.
  • As a replacement for passwords entirely, where the passkey itself proves both who you are and that you have your device.

Strengths: phishing resistant like security keys, but nothing extra to buy or carry. Very convenient once set up. When used without passwords, there’s no password to steal or reuse.

Weaknesses: support in WordPress depends on plugins, and the experience varies across devices and browsers. Users and administrators need to understand how recovery works when a device is lost.

Passkeys are the direction the industry is moving. For WordPress, they’re available through plugins and work well, but test carefully with the devices your team actually uses.

Which method should you choose?

A practical approach for most business sites:

  • Administrators: security keys or passkeys if your team is comfortable with them, otherwise authenticator apps, always with backup codes.
  • Editors and shop managers: authenticator apps or passkeys.
  • Authors and contributors: authenticator apps, or email codes on lower-risk sites.
  • Customers and subscribers: usually optional 2FA, offered but not forced. Forcing it on customers creates support load and checkout friction.

The best method is one people will actually use. A strong method that staff disable or work around protects nothing.

Enforcing 2FA

Making 2FA optional for administrators rarely works. Some people set it up immediately, others never do, and the unprotected accounts become the weak point.

Enforce it by role. Good 2FA plugins let you require it for administrators, editors and shop managers, with a grace period for setup. During the grace period, users see a prompt to configure 2FA when they log in. After it ends, they can’t access the dashboard until they do.

Before enforcing:

  1. Tell your team what’s coming and why.
  2. Share simple setup instructions, with screenshots for the authenticator app you recommend.
  3. Make sure everyone saves their backup codes somewhere safe, like a password manager.
  4. Pick a quiet week to switch enforcement on.

Plan for recovery

The most common 2FA problem isn’t attackers; it’s lost phones. Plan for it:

  • Backup codes: single-use codes generated during setup. Store them in a password manager, not in a text file on the desktop.
  • Multiple methods: register both an authenticator app and a security key or passkey where possible.
  • Administrator reset: another administrator can reset a user’s 2FA. Make sure you have at least two administrators, both using 2FA, so one can help the other.
  • Server-level recovery: if the only administrator is locked out, someone with server or database access can disable the plugin temporarily. Document how, and keep that access secure.

Never weaken recovery to the point where it becomes the easiest way in. If anyone can disable 2FA by sending a polite email, attackers will send a polite email.

Don’t forget other login paths

2FA on the main login form doesn’t protect every way into a WordPress site:

  • Application passwords are designed for API access and bypass 2FA. Only create them when needed, assign them to dedicated users with limited roles and revoke unused ones.
  • XML-RPC can accept username and password authentication. Block it if you don’t use it.
  • Custom login forms from membership, LMS or WooCommerce plugins may need explicit 2FA support. Test them.
  • Hosting, SFTP, database and DNS accounts are just as important. Protect them with 2FA too.

Common mistakes

  • Enabling 2FA only for yourself while other administrators stay unprotected.
  • Relying on email codes when the email account itself has a reused password.
  • Not saving backup codes, then needing database access to recover.
  • Forgetting that application passwords bypass 2FA.
  • Choosing a plugin that isn’t maintained, which can itself become a vulnerability.

A rollout plan that works

When I introduce 2FA on a client site, I enforce it for administrators first, then editors and shop managers a week later. Starting small catches any compatibility problems with custom login pages before they affect the whole team.

Frequently asked questions

Is two-factor authentication really necessary for a small site?

Yes. Attacks on WordPress logins are automated and target every site, regardless of size. 2FA stops attacks that rely on stolen or guessed passwords, which are the most common kind.

Are passkeys better than authenticator apps?

For security, yes, because passkeys resist phishing. For compatibility and simplicity across a mixed team, authenticator apps are still a solid choice. Many sites offer both.

What happens if I lose my phone?

Use your backup codes or another registered method to log in, then set up 2FA on your new device. If you have no backup method, another administrator or someone with server access can reset it.

Does 2FA slow down logging in?

Slightly, with codes. Passkeys and security keys are often faster than typing a password. Many plugins also let users trust a device for a period.

Final thoughts

A password alone isn’t enough to protect a WordPress admin account. Add a second factor, choose methods that match each role’s risk, enforce it for everyone with real power, plan recovery carefully and remember the login paths that bypass the main form. For the strongest protection, move administrators towards security keys or passkeys. The few seconds it adds to logging in are a small price for keeping attackers out.

login securitypasskeyssecurity keystotptwo-factor authentication

Post navigation

PreviousManaging Many Client WordPress Sites Efficiently
NextWhen a WordPress Plugin Changes Owners: Managing Supply Chain Risk

Keep reading

WordPress Security

Least Privilege for the WordPress Database User

November 15, 2026
WordPress Security

Stopping Fake User Registrations on WordPress and WooCommerce

November 15, 2026
WordPress Security

Where Attackers Hide Backdoors in WordPress and How to Find Them

November 15, 2026
Web with Wordpress Logo

We build, fix and grow WordPress websites, from first launch to ongoing care.

Quick links

  • Home
  • Blog
  • About Us
  • Contact Us

Topics

  • WordPress Development
  • SEO
  • WooCommerce
  • WordPress Security
  • Performance
  • Web Strategy

Contact

  • Haryana, India

© 2026 Web With WordPress. All rights reserved.

  • Privacy Policy