Two Factor (2FA) Authentication via Email


A simple, lightweight, yet effective plugin to enable two factor (2FA) authentication via email. You can enable this on an individual user basis, for all administrators, editors, or all accounts with one line of code in your wp-config.php file.

WordPress is the world’s most popular content management system (CMS), with over 40% of all websites running on it. As such, it has become a prime target for hackers looking to exploit vulnerabilities to gain unauthorized access to websites. One of the best ways to enhance the security of a WordPress site is to enable two-factor authentication (2FA) for administrators.

  • Simply enable the plugin then edit a user account to enable 2FA for that individual user.
  • Please make sure your WordPress website sends and receives emails correctly. The best way is to use a SMTP plugin.


  • Under each user account settings, you can click the toggle to turn 2FA on/off.
  • When 2FA is enabled, the user will see this screen after a log-in.
  • An example of an error screen.
  • An email sent to the site admin when the 2FA plugin is disabled.


Use the automatic installer via WordPress or download the plugin and:

  1. Upload the plugin files to the /wp-content/plugins/two-factor-2fa-via-email directory.
  2. Activate the plugin through the ‘Plugins’ screen in WordPress.
  3. Navigate to your profile or any other users and enable to toggle 2FA to enable per account.


Help! I’m locked out!

If you are not receiving the email to login then in order to regain access to your account, you’ll have to disable the plugin. The only way to do this is by renaming the plugin folder from two-factor-2fa-via-email to two-factor-2fa-via-email.backup or equivalent.

15 minutes is too long/short for me. Can this be changed?

Yes! As of version 1.5.2 you can now add a defined constant to your wp-config.php file;


Where the number 10 is, change this to whatever value (in minutes) you prefer.

Can I enable this for every Administrator?

Yes! As of version 1.6 you can now add a defined constant to your wp-config.php file;

define('SS88_2FAVE_ENABLE_ADMINS', true);

Can I enable this for every Editor?

Yes! As of version 1.6 you can now add a defined constant to your wp-config.php file;

define('SS88_2FAVE_ENABLE_EDITORS', true);

Can I enable this for every account?

Yes! As of version 1.6 you can now add a defined constant to your wp-config.php file;

define('SS88_2FAVE_ENABLE_ALL', true);

Can I change who receives the plugin deactivated email?

Yes! As of version 1.6 you can now add a defined constant to your wp-config.php file;


Change to your preferred email.


এপ্রিল 29, 2024 1 reply
A lightweight, task-specific two-step login plugin that supports localization. It is very convenient for personal use or for protecting client websites. The developer responds quickly to reasonable requests.
এপ্রিল 1, 2023 1 reply
After trying out some of the other plugins from this developer, I saw there was this 2FA plugin. The sheer amount of spam I get really has raised concerns about security and I’m so glad I found this. Install – click the toggle for 2FA on the user account – done. Easiest way to boost security going, no crazy configuration needs, took literally seconds to do. Seems to work perfectly and I feel a lot better about the integrity of my accounts.
Read all 3 reviews

Contributors & Developers

“Two Factor (2FA) Authentication via Email” is open source software. The following people have contributed to this plugin.


“Two Factor (2FA) Authentication via Email” has been translated into 1 locale. Thank you to the translators for their contributions.

Translate “Two Factor (2FA) Authentication via Email” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.



  • Localization integration


  • Integration with the default Remember Me checkbox from WordPress


  • Integration with Ultimate Member


  • Removed accidental code forcing everyone who logged in to receive a 2FA screen


  • Deactivation fatal error fix


  • New Features:
  • Wording changed when SMTP is not enabled.
  • The plugin now sends an email to the site admin if the plugin is deactivated. The email can be overridden by defining the constant SS88_2FAVE_NOTIFICATION_EMAIL in wp-config.php i.e. define('SS88_2FAVE_NOTIFICATION_EMAIL', '');
  • Three new constants added which can be added in wp-config.php to override individual user settings to force 2FA to be enabled. They are: SS88_2FAVE_ENABLE_ALL (to enable for every single account), SS88_2FAVE_ENABLE_ADMINS (to enable only for Administrators), and SS88_2FAVE_ENABLE_EDITORS (to enable for Editors) i.e. define('SS88_2FAVE_ENABLE_ALL', true);.


  • Replaced sanitize_url in favor of esc_url
  • Added a new constant SS88_2FAVE_LINK_EXPIRES_MINUTES so that users can define their own link expiry time in minutes
  • Added a JavaScript countdown timer to the login page


  • Email content fix


  • ‘Fancy’ emails
  • Moving files into appropriate folders
  • Re-order of security features when logging in


  • Added PHP_INT_MAX to wp_login hook
  • Added support for advanced developers to use a custom 2FA template. You can now override the 2FA page by copying assets/2fa-page.php to your theme’s directory. Upload this file to wp-content/themes/xxx/ss88-2fa-page.php to customize it!


  • Fixed ‘dismiss’ link on notification
  • Added support for SMTP Mailer check


  • Added support link to plugin page


  • Fix openssl key
  • Fix echo’ing


  • Initial release.