SiteFort documentation

Two-Factor Authentication (2FA)

Set up WordPress two-factor authentication with SiteFort. Choose verification methods, require 2FA for selected roles, and manage enrollment and account recovery.

Two-Factor Authentication Overview

Two-factor authentication (2FA) adds a verification step after the WordPress password. If someone obtains a user's password, they still need the second factor to complete a normal login.

Open SiteFort → Two-Factor (2FA). The page has three tabs:

  • 2FA Policy: Choose verification methods, require 2FA for selected roles, and configure enrollment and trusted devices.
  • Users: Review who has enabled 2FA and which accounts still need to complete setup.
  • My 2FA: Manage your own verification method, recovery codes, and browser trust.

SiteFort also adds 2FA settings to WordPress user profiles and integrates with WooCommerce customer accounts. Users can manage their own 2FA without changing the site's security policy.

Configure the 2FA Policy

Open the 2FA Policy tab and turn on Enable two-factor authentication.

SiteFort 2FA Policy showing allowed verification methods, required user roles, setup grace period, trusted devices, and account page integration.
SiteFort 2FA Policy settings.

Choose Verification Methods

Under Allowed verification methods, choose the methods users can set up:

  • Authenticator app: Generates sign-in codes in an authenticator app. Codes work offline, making this a good choice for administrators and staff.
  • Email code: Sends verification codes to the user's registered email address. This requires reliable email delivery from your website.

You can allow both methods and let users choose. At least one method must remain selected.

If you're using Email Code, test email delivery before requiring 2FA. Users need to receive their codes to complete sign-in.

Require 2FA for Selected Roles

Under Require 2FA for these roles, choose which WordPress roles must use two-factor authentication.

Start with Administrator. You can also include Editors, Shop Managers, and other roles with access to important site settings or customer information.

For WooCommerce stores or membership sites, customer 2FA can remain optional unless your security policy requires it.

Enabling 2FA doesn't require every user to enroll. Only the selected roles must complete setup. Other users can enable 2FA voluntarily while the feature is active.

Setup Grace Period

The Setup grace period gives users in required roles time to configure 2FA after their next sign-in or visit to a protected page.

For example, setting 7 days gives existing staff a week to complete setup. Once the deadline passes, they must finish enrollment before continuing.

Set the grace period to 0 to require immediate setup.

Trusted Devices

Trusted devices let a previously verified browser skip additional 2FA challenges for a set period.

Use Trust period to choose how long a browser remains trusted. For example, 30 days can reduce repeated verification for staff using their own devices.

Select Revoke all trusted devices to require verification again on previously trusted browsers. This is useful after a security incident or a change to your authentication policy.

Review User Enrollment

Open the Users tab to see which WordPress accounts have completed 2FA setup.

The summary at the top shows:

  • 2FA enabled: Users who have completed setup.
  • Setup required: Users who still need to enroll.
  • Setup overdue: Users whose required setup deadline has passed.

Switch between By user and By role to review enrollment. You can also search by name, username, or email address and filter by role.

The user list shows each account's role, 2FA status, verification method, and setup or last verification information. Use Manage to open the available controls for an account.

After requiring 2FA for a role, check this tab to identify users who haven't completed setup before their grace period expires.

Manage Your Own 2FA

Open SiteFort → Two-Factor (2FA) → My 2FA to manage two-factor authentication for your own account.

SiteFort My 2FA screen showing enabled status, email verification method, recovery codes, and browser trust.
Manage your verification method and recovery options in My 2FA.

If 2FA is enabled, SiteFort shows the current method, setup date, and last verification details.

Verification Method

The Verification method section shows whether you're using an authenticator app or email code.

Available setup and management options depend on the methods allowed by your site's 2FA policy.

Recovery Codes

Recovery codes let you sign in if you can't access your usual verification method, such as when you lose your phone.

Each code works only once. Save them somewhere secure and separate from your WordPress password.

The Account recovery section shows how many unused codes remain. Select Replace recovery codes to generate a new set. The previous codes will no longer work.

Browser Trust

The Browser trust section shows when the current browser's trusted status expires.

Select Remove trust if you want this browser to require 2FA verification again.

Users can turn off their own 2FA when the site's enforcement policy allows it. Accounts in roles that require 2FA must continue to meet that policy.

2FA in WordPress User Profiles

SiteFort adds two-factor authentication settings to the standard WordPress user profile, so users don't need to open the SiteFort settings page to manage their own account security.

Open Users → Profile, or the profile page available to your account, and find the Two-Factor Authentication section.

SiteFort two-factor authentication settings in a WordPress user profile showing verification method, recovery codes, and trusted browser controls.
SiteFort 2FA settings in the WordPress user profile.

Users can set up 2FA, view their current verification method, replace recovery codes, and remove browser trust from their profile. They can also turn off 2FA when the site policy permits it.

Administrators decide which roles must use 2FA. Users in other roles can still choose to protect their accounts voluntarily.

2FA for WooCommerce and Custom Account Pages

Customers and members often sign in through frontend account pages rather than the WordPress dashboard. SiteFort supports these users without requiring access to the administration area.

WooCommerce Customers

When SiteFort 2FA and WooCommerce are active, SiteFort automatically adds Account security to the WooCommerce My Account menu.

Customers can open My Account → Account security to set up and manage two-factor authentication.

WooCommerce My Account Account security page showing SiteFort two-factor authentication setup, authenticator app and email code options, and setup deadline.
WooCommerce customers can set up 2FA from My Account → Account security.

Customers can choose from the verification methods allowed by the site's 2FA policy:

  • Authenticator app: Set up an authenticator app to generate sign-in codes.
  • Email code: Receive verification codes at their registered email address.

If 2FA is required for the Customer role, the page displays Setup required and the deadline for completing enrollment. After the deadline, customers must finish setup before continuing to protected account features.

Once enrolled, customers can manage their verification method, recovery codes, and browser trust from the same page, subject to the site's policy.

No additional integration is needed. SiteFort adds the Account security page automatically. You don't need to add a shortcode or modify WooCommerce templates.

Membership and Custom Account Pages

For membership websites, LMS platforms, or custom account dashboards, SiteFort provides a shortcode for displaying the signed-in user's 2FA settings.

Add this shortcode to the account page:

[sitefort_2fa]

The shortcode displays SiteFort's 2FA management interface for the logged-in user.

Keep personalized account pages out of full-page caching for signed-in users. Custom login systems must also use a compatible WordPress authentication flow for SiteFort's 2FA challenge to run.

Importing 2FA from Wordfence

If eligible Wordfence 2FA data is available, SiteFort provides an import tool under SiteFort → Tools.

The tool can transfer supported authenticator setups and unused recovery codes. Test SiteFort verification before disabling Wordfence 2FA.

See the Tools documentation for the import process.

Check Your 2FA Setup

Before requiring 2FA for other users, test it with an administrator account.

  • Sign in using the selected verification method.
  • Save recovery codes and test one.
  • Confirm the account status appears correctly under Users.
  • Check the grace period for roles required to use 2FA.
  • Verify that 2FA settings appear in the WordPress user profile.
  • Test browser trust and the Remove trust action.
  • Check WooCommerce My Account → Account security if your site uses WooCommerce.
  • Test custom account pages if you're using the SiteFort shortcode.
  • Verify email delivery if Email Code is enabled.

Keep a working recovery method available when enforcing 2FA for staff or customers.

For login attempt limits, CAPTCHA, custom login URLs, and account lockouts, see Login Security. If users cannot complete 2FA setup or verification, see Troubleshooting.