2fishone March 24, 2026 2 replies
works well, but it is causing my website slower somehow,i suggest to go through website lighthouse speed check before activate it
Two Factor
The Two-Factor plugin adds an extra layer of security to your WordPress login by requiring users to provide a second form of authentication in addition to their password. This helps protect against unauthorized access even if passwords are compromised.
Important: Each user must individually configure their two-factor authentication settings.
For more information about two-factor authentication in WordPress, see the WordPress Advanced Administration Security Guide.
For more history, see this post.
Here is a list of action and filter hooks provided by the plugin:
two_factor_providers filter overrides the available two-factor providers such as email and time-based one-time passwords. Array values are PHP classnames of the two-factor providers.two_factor_providers_for_user filter overrides the available two-factor providers for a specific user. Array values are instances of provider classes and the user object WP_User is available as the second argument.two_factor_enabled_providers_for_user filter overrides the list of two-factor providers enabled for a user. First argument is an array of enabled provider classnames as values, the second argument is the user ID.two_factor_user_authenticated action which receives the logged in WP_User object as the first argument for determining the logged in user right after the authentication workflow.two_factor_user_api_login_enable filter restricts authentication for REST API and XML-RPC to application passwords only. Provides the user ID as the second argument.two_factor_email_token_ttl filter overrides the time interval in seconds that an email token is considered after generation. Accepts the time in seconds as the first argument and the ID of the WP_User object being authenticated.two_factor_email_token_length filter overrides the default 8 character count for email tokens.two_factor_backup_code_length filter overrides the default 8 character count for backup codes. Provides the WP_User of the associated user as the second argument.two_factor_rest_api_can_edit_user filter overrides whether a user’s Two-Factor settings can be edited via the REST API. First argument is the current $can_edit boolean, the second argument is the user ID.two_factor_before_authentication_prompt action which receives the provider object and fires prior to the prompt shown on the authentication input form.two_factor_after_authentication_prompt action which receives the provider object and fires after the prompt shown on the authentication input form.two_factor_after_authentication_input action which receives the provider object and fires after the input shown on the authentication input form (if form contains no input, action fires immediately after two_factor_after_authentication_prompt).two_factor_login_backup_links filters the backup links displayed on the two-factor login form.To redirect users to a specific URL after completing the two-factor challenge, use WordPress Core built-in login_redirect filter. The filter works the same way as in a standard WordPress login flow:
add_filter( 'login_redirect', function( $redirect_to, $requested_redirect_to, $user ) {
return home_url( '/dashboard/' );
}, 10, 3 );
This plugin supports the last two major versions of WordPress and the minimum PHP version supported by those WordPress versions.
The best place to report bugs, feature suggestions, or any other (non-security) feedback is at the Two Factor GitHub issues page. Before submitting a new issue, please search the existing issues to check if someone else has reported the same feedback.
The plugin contributors and WordPress community take security bugs seriously. We appreciate your efforts to responsibly disclose your findings, and will make every effort to acknowledge your contributions.
To report a security issue, please visit the WordPress HackerOne program.
If you have backup codes enabled, you can use one of those to regain access. If you don’t have backup codes or have used them all, you’ll need to contact your site administrator to reset your account. This is why it’s important to always enable backup codes and keep them in a secure location.
The plugin previously supported FIDO U2F, which was a predecessor to WebAuthn. There is an open issue to add WebAuthn support here: https://github.com/WordPress/two-factor/pull/427
Yes. For passkeys and hardware security keys, you can install the Two-Factor Provider: WebAuthn plugin: https://wordpress.org/plugins/two-factor-provider-webauthn/
. It integrates directly with Two-Factor and adds WebAuthn-based authentication as an additional two-factor option for users.
2fishone March 24, 2026 2 replies
works well, but it is causing my website slower somehow,i suggest to go through website lighthouse speed check before activate it
ssgads March 7, 2026 1 reply
This plugin Very user Friendly for developer mean time High Advanced Tech Program in Latest Trend. Perfect & time saver – Thank you very much.
It’s rare to see a plugin that’s so efficient, reliable, and without any complications. Simply brilliant!
Works perfect on 3 websites for more than 3 years
Install, activate. Go to your user profile and add your 2FA with your password manager/authentication app. Done. So easy and efficient. No bells and whistles, but if securing your admin account(s) is all that matters, it’s the best and easiest option. Thanks to the team for this!
Thank you for such helpful and useful plugin. It’s level-up my security to the next level.
“Two Factor” is open source software. The following people have contributed to this plugin.
Contributors
qs from 6.14.1 to 6.14.2 by #794.basic-ftp from 5.0.5 to 5.2.0 by #816.@since docs by @masteradhoc in #781master by @kasparsd in #738missing_direct_file_access_protection by @masteradhoc in #760mismatched_plugin_name by @masteradhoc in #754MissingTranslatorsComment & MissingSingularPlaceholder by @masteradhoc in #758phpcs:ignore for falsepositives by @masteradhoc in #777otpauth link in QR code URL by @sjinks in #784WordPress.Security.EscapeOutput.OutputNotEscaped errors by @masteradhoc in #776