New 24/7 monitoring and daily cloud backups now included in every Shield Pro plan.

2FA

How to enable WordPress two-factor authentication

Two-factor authentication stops most password-guessing attacks even when credentials leak. This tutorial sets up TOTP apps like Google Authenticator or Authy for WordPress admin accounts using trusted plugins.

Time: 15-30 minutes Level: Beginner

What this problem looks like

Passwords alone fail against credential stuffing and phishing. TOTP two-factor adds a six-digit code from an app on your phone. Enforce 2FA on every account that can install plugins or edit users.

Test on your own admin account before enforcing site-wide. One misconfigured enforcement can lock out every administrator at once.

Step 1: Install a 2FA plugin

From wp-admin go to Plugins → Add New. Search for Two Factor by the WordPress Contributors or WP 2FA by Melapress. Install only from wordpress.org or known vendors.

  1. Install and activate the plugin.
  2. Open its settings page under Settings or Users.
  3. Confirm compatibility with your login customisation plugins.

Step 2: Set up TOTP on your admin account

Go to your user profile. Scan the QR code with Google Authenticator, Authy, or 1Password. Enter the six-digit code to confirm enrollment.

Save backup codes offline before you enforce 2FA for other admins. Store them in a password manager, not in the WordPress database.

Step 3: Enforce 2FA for privileged roles

In plugin settings, require 2FA for Administrator and Editor roles. Give users a grace period to enroll before blocking login without a code.

Step 4: Test login on staging and production

Log out and log in with password plus TOTP code. Test from a private window. Confirm WooCommerce my-account login is unaffected if customers use a separate flow.

Step 5: Plan account recovery

Document who holds backup codes. If a phone is lost, use a backup code or SFTP to deactivate the 2FA plugin folder temporarily. Rotate salts after recovery if compromise is suspected.

When to stop DIY and hire help

Agencies managing many client sites benefit from enforced 2FA and login hardening without lockout risk. BugShield configures WordPress security policies at a fixed price.

FAQs

Does 2FA slow down editors?

Login takes a few extra seconds once per session. Remember device options reduce prompts on trusted computers.

Can I use SMS instead of an app?

TOTP apps are more secure than SMS. Avoid SMS 2FA unless no other option exists.

Will 2FA break REST API or webhooks?

Application passwords and API keys work separately from dashboard 2FA. Test integrations after enabling.

What if I am locked out?

Rename the 2FA plugin folder via FTP to disable it, or use hosting file access to remove enforcement options from the database.

Rather someone else fixed it?

Request a fix at a confirmed price. Named UK developer, secure Vault, direct chat.

Request a Fix