Secure WordPress login with this two factor authentication (TFA / 2FA) plugin. Users for whom it is enabled will require a one-time code in order to log in. From the authors of UpdraftPlus – WP’s #1 backup/restore plugin , with over two million active installs. Are you completely new to TFA? If so,
PricingFree downloadThe WordPress.org download is free. Pro versions, add-ons or external services may cost extra.
CompatibilityRequires WordPress 5.3 and PHP 5.6.
SourceWordPress plugins · Nov 3, 2026
01 / Source details
Aboutthistool.
Secure WordPress login with this two factor authentication (TFA / 2FA) plugin. Users for whom it is enabled will require a one-time code in order to log in. From the authors of UpdraftPlus – WP’s #1 backup/restore plugin , with over two million active installs.
Are you completely new to TFA? If so, please see our FAQ .
Features (please see the “Screenshots” for more information):
Supports standard TOTP + HOTP protocols (and so supports Google Authenticator, Authy, and many others).
Displays graphical QR codes for easy scanning into apps on your phone/tablet
TFA can be made available on a per-role basis (e.g. available for admins, but not for subscribers)
TFA can be turned on or off by each user
TFA can be required for specified user levels, after a defined time period (e.g. require all admins to have TFA, once their accounts are a week old) ( Premium version ), including forcing them to immediately set up (by redirecting them to the page to do so)
Supports front-end editing of settings, via [twofactor_user_settings] shortcode (i.e. users don’t need access to the WP dashboard). (The Premium version allows custom designing of any layout you wish).
Site owners can allow “trusted devices” on which TFA codes are only asked for a chosen number of days (instead of every login); e.g. 30 days ( Premium version )
Encrypt the TFA-generating secret keys using an on-disk encryption key, so that an attacker would need to break into both your WordPress database and your files in order to break TFA codes (as well as breaking a user’s password in order to use them)
Works together with “Theme My Login” (both forms and widgets)
Includes support for the WooCommerce and Affiliates-WP login forms
Includes support for Ultimate Member login forms (Premium version)
Includes support for Elementor Pro login forms (Premium version)
Includes support for bbPress login forms (Premium version)
Includes support for Easy Digital Downloads login forms (Premium version)
Includes support for RegistrationMagic login forms (Premium version)
Includes support for login forms from the Gravity Forms User Registration add-on (Premium version)
Includes support for login forms (shortcode forms only) from Paid Memberships Pro (Premium version)
Includes support for any and every third-party login form (Premium version) without any further coding needed via appending your TFA code to the end of your password
Does not mention or request second factor until the user has been identified as one with TFA enabled (i.e. nothing is shown to users who do not have it enabled)
WP Multisite compatible (plugin should be network activated)
Simplified user interface and code base for ease of use and performance
Added a number of extra security checks to the original forked code
Alert users if someone appears to have found out their password, as indicated by successfully entering a password but repeatedly entering an incorrect TFA code.
Emergency codes for when you lose your phone/tablet ( Premium version )
When using the front-end shortcode ( Premium version ), require the user to enter the current TFA code correctly to be able to activate TFA
Works together with “WP Members” (shortcode form)
Administrators can access other users’ codes, and turn them on/off when needed ( Premium version )
This plugin uses the industry standard TFA / 2FA algorithm TOTP or HOTP for creating One Time Passwords. These are used by Google Authenticator, Authy, and many other OTP applications that you can deploy on your phone etc.
A TOTP code is valid for a certain time. Whatever program you use (i.e. Google Authenticator, etc.) will show a different code every so often.
Plugin Notes
This plugin began life in early 2015 as a friendly fork and enhancement of Oscar Hane’s “two factor auth” plugin .
See it in action
Screenshots & previews.
Site-wide settingsUser settings (dashboard)User settings (front-end, via shortcode)Regular WP login form requesting OTP code (after successful username/password entry)WooCommerce login form requesting OTP code (after successful username/password entry)What the user sees if opening a wrong OTP code on the regular WP login formWhat the user sees if opening a wrong OTP code on the WooCommerce login formWhere to find the site-wide settings in the dashboard menuWhere to find the user's personal settings in the dashboard menuEmergency codes (Premium version)Adjusting other users' settings as an admin (Premium version)Building your own design for the page with custom short-codes (Premium version)
02 / Source details
Gettingstarted.
This plugin requires PHP version 5.3 or higher and support for either php-openssl or PHP mcrypt . The vast majority of PHP setups will have one of these. If not, ask your hosting company.
01Search for ‘Two Factor Authentication’ in the ‘Plugins’ menu in WordPress.
02Click the ‘Install’ button. (Make sure you picks the right one)
03Activate the plugin through the ‘Plugins’ menu in WordPress
04Find site-wide settings in Settings -> Two Factor Authentication ; find your own user settings in the top-level menu entry “Two Factor Auth”.
If you want to add a section to the front-end of your site where users can configure their two-factor authentication settings, use this shortcode: [twofactor_user_settings] . (If you set the attribute show_algorithm_selector to “yes” then it will include an ‘advanced’ settings section allowing the HOTP algorithm to be chosen and not only the default TOTP algorithm, but few people will want this).
03 / Source details
Frequently asked questions.
What is two factor authentication (TFA / 2FA) ?
Basically, it’s to do with securing your logins, so that there’s more than one link in the chain needing to be broken before an unwanted intruder can get in your website.
By default, your WordPress accounts are protected by only one thing: your password. If that’s broken, then everything’s wide open.
“Two factor” means adding a second requirement. Usually, this is a code that comes to a device you own (e.g. phone, tablet) – so, someone can’t get into your website without getting hold of your device. You can get a longer answer from Wikipedia.
Sometimes it is also called multi-factor authentication instead of two-factor – because someone could secure their systems with as many factors as they like.
How does two factor authentication (TFA / 2FA) work?
Since “two factor authentication” just means “a second something is necessary to get in”, this answer depends upon the particular set-up. In the most common case, a numeric code is shown on your phone, tablet or other device. This code be sent via an SMS; this then depends on the mobile phone network working. This plugin does not uses that method. Instead, it uses a standard mathematical algorithm to generate codes that are only valid once each, or for only for 30 seconds (depending on which algorithm you choose). Your phone or tablet can know the code after it has been set up once (often, by just scanning a bar-code off the screen).
What do I need to set up on my phone/tablet (etc.) in order to generate the codes?
This depends on your particular make of phone, and your preferences. Google have produced a popular app called “Google Authenticator”, which is a preferred option for many people because it is easy to use and can be set up via just scanning a bar code off your screen – follow this link, and ignore the first paragraph that is talking about 2FA on your Google account (rather than being relevant to this plugin).
What if I do not have a phone or tablet?
Many and various devices and programs can generate the codes. One option is an add-on for your web browser; for example, here are some apps and add-ons for Google Chrome . Wikipedia lists various programs for different computers .
I lost my device that has pass-codes – or, they don’t work. What to do?
If your pass-code used to work, but no longer does, then check that the time on your device that generates them is accurate.
If you cannot get in and need to disable two-factor authentication, then add this to your wp-config.php file, using FTP or the file manager in your hosting control panel:
define('TWO_FACTOR_DISABLE', true);
Add it next to where any other line beginning with “define” is.
Alternatively, if you have FTP or cPanel access to your web hosting space, you can de-activate the plugin; see this article.
Why does the plugin not support sending the two-factor code by email?
If someone has access to your email account, then they can send a password-reset code there using the password-reset mechanisms built into WordPress. Therefore, if the two-factor code was also sent there, then ability to read your email allows the breaking of both factors, and hence is no longer truly two factor authentication.
Some users might have two factor authentication on their email account, but this is not knowable or controllable from inside WordPress, and so giving this option to users means that the administrator cannot see or enforce two-factor authentication. And even in this case, email is often sent between servers unencrypted, and so is susceptible to man-in-the-middle attacks beyond the control of WordPress.
What are HOTP and TOTP?
These are the names of the two mathematical algorithms that are used to create the special codes. These are industry-standard algorithms, devised by expert cryptographers. HOTP is less popular, but the device that generates the codes does not need to know the correct time (instead, the codes are generated in a precise sequence). TOTP is much more popular, and generates codes that are only valid for 30 seconds (and so your device needs to know the time). I’d recommend TOTP, as HOTP can be annoying if something causes the sequences to get out of sync.
What is the shortcode to use for front-end settings?
[twofactor_user_settings]
I deliberately entered a wrong password, and it let me login!
You have a password manager extension installed in your web browser, with the correct password entered in it. It has automatically replaced your wrong password with the right one from its saved store. This behaviour has been observed and confirmed by several users. You can verify it by using the web developer tools in your browser to look at the HTTP data sent to WordPress, and observe which password is actually in it. You can also open a fresh web browser with no such extension in it to re-test.
Note that the two factor authentication plugin has no mechanism to compare or approve passwords; this is done by WordPress core. If the wrong password is sent, then this is handled by WordPress, and the login will not proceed.
Website LLMs.txt and LLMs-Full.txt Generator is an LLMs.txt generator and llms-full.txt generator for WordPress. It helps site owners generate, manage, preview, validate, and serve AI discovery files from published public content. Use it to create structured /llms.txt and optional /llms-full.txt end
EngageDock AI is a customizable floating contact widget for WordPress websites that want more leads and faster visitor communication. It helps small businesses turn website traffic into calls, texts, emails, and callback requests from one clean contact panel. Key Features: Click-to-Call – One tap ca
Altify AI is an auto ALT text and AI ALT text plugin for WordPress images. It helps generate descriptive image ALT text for accessibility and image SEO. Use bulk image ALT text tools for your Media Library, generate featured image ALT text automatically, and scale WooCommerce image ALT updates with
The Accepted Payment Methods plugin is a straightforward, lightweight solution that enhances your website by displaying visually appealing icons of the payment methods you accept. This plugin is ideal for a variety of websites, including e-commerce platforms, service-oriented websites, and informati