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.
From your MainWP Dashboard, navigate to the WP Admin > Plugins > Add New
Search for the WP 2FA plugin and install it
After activating the plugin, a setup wizard will start
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.
Choose for which users you wish to enforce 2FA
Optionally, exclude certain users or user roles from two-factor authentication
Give users a grace period before the 2FA requirement is enforced and finish the setup
Configure 2FA for the currently logged-in user
Scan the QR code or enter the code manually in the app of your choice. For this help document, we will be using Authy.
Give the account a name and icon and save. Your code is now being generated in the 2FA app
Click the I’M READY button, enter the code from the app, and click Validate and Save.
The setup is now complete. If you wish, you can now generate backup 2FA codes in case you lose access to the 2FA app
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.