Skip to main content
All CollectionsMiscellaneous
How to add Two-Factor Authentication (2FA) to MainWP
How to add Two-Factor Authentication (2FA) to MainWP
Updated over a month ago

Two-factor authentication adds an additional layer of security to your WordPress installation, thus making the inherently secure MainWP Dashboard even more secure. And best of all, enabling Two-factor authentication does not affect the MainWP functionality in any way.

In this example, we will use the WP 2FA plugin, but you can use whichever two-factor authentication plugin you choose.

  1. From your MainWP Dashboard, navigate to the WP Admin > Plugins > Add New

  2. Search for the WP 2FA plugin and install it

  3. After activating the plugin, a setup wizard will start

    1. Here you can choose which method of two-factor authentication you wish to use. One-time code via any TOTP 2FA app or a one-time code via email. For the purpose of this document, we will only use codes via the 2FA app.

      2FA Settings - method selection
    2. Choose for which users you wish to enforce 2FA

      2FA Settings - user selection
    3. Optionally, exclude certain users or user roles from two-factor authentication

      2FA Settings - role selection
    4. Give users a grace period before the 2FA requirement is enforced and finish the setup

      2FA Settings - grace period selection
  4. Configure 2FA for the currently logged-in user

    1. Scan the QR code or enter the code manually in the app of your choice. For this help document, we will be using Authy.

      Authy plugin installation
    2. Give the account a name and icon and save. Your code is now being generated in the 2FA app

      Authy plugin code scan
    3. Click the I’M READY button, enter the code from the app, and click Validate and Save.

      Authy plugin settings confirmation
    4. The setup is now complete. If you wish, you can now generate backup 2FA codes in case you lose access to the 2FA app

      Authy plugin backup codes

Next time you log in to WordPress after you enter the usual username and password, you will be prompted to enter the authentication code from your app.

2FA login code

Did this answer your question?