Site icon WPMarmite

How to enable two-factor authentication on your WordPress site

Activation de la double authentification sur WordPress.

A login + a password. Connecting to the WordPress administration interface is very simple, as long as you remember these two elements.

From the point of view of the malicious person or robot that wants to access your site, it’s just as simple.

If they find your login and password, they’ll become the captain of the ship, without your permission.

It will be fun for them, much less for you.

This is a disaster scenario and unfortunately, it doesn’t only happen to others. To protect yourself, it can be a good idea to activate two-factor authentication on WordPress.

If you’re not yet familiar with this protection method, or if you want to set it up, this article will explain everything to you.

After reading it, you’ll know why to use two-factor authentication, and how to enable it on your WordPress installation using two different methods (both using a plugin).

Your best WordPress projects need the best host!

WPMarmite recommends Bluehost: great performance, great support. All you need for a great start.

What is two-factor authentication?

How does two-factor authentication work?

Two-factor authentication is a method of securing a user account. On WordPress, it allows you to protect access to the administration interface (back office) by adding an additional layer of protection to password authentication.

Here’s how it works:

  1. First, you enter your username and password on the administration login page. This is what you normally do whenever you want to access your WordPress site.
  2. Next, you will have to identify yourself a second time to be able to access the admin, using a device or a service in your possession. This can be a smartphone, for example, on which you validate the connection attempt by entering a code.

That’s why we call it double authentication: to connect to WordPress, you have to identify yourself twice.

That’s right, twice.

The big plus of this method is that if someone hacks your password, it won’t be enough to access your account.
If the malicious person or bot doesn’t have anything else of yours to log in with (e.g. your mobile device), he or she won’t be able to log in.

Moreover, this is a service that you’ve probably already used in your daily life. Many famous sites use it, such as Google, Facebook, and PayPal.

This is also true for your bank. To validate a payment (especially for large amounts), you are often asked to validate it on your banking application, on which you must log in.

Several names are used to refer to two-factor authentication. We can also say two-factor identification, dual authentication, or even 2FA.

What are the options for the second form of authentication?

Before continuing, let’s have a quick look at the identification methods that might be offered to you during the second identification step.

This second factor can take several forms, such as:

Why should you enable two-factor authentication on WordPress?

While dual authentication adds an extra step to the login process, it still has one big advantage: it makes access to your admin interface much more secure.

By using this method:

Is the value of two-factor authentication clearer? Now let’s get down to business. Keep reading to find out how to set up dual authentication on WordPress in a few minutes.

How to enable dual authentication on WordPress

First of all, I recommend that you backup your site. In case of a problem, you’ll be able to turn around and restore it easily. To do this, you can activate the plugin UpdraftPlus, for example, or use the backup module of a maintenance tool like WP Umbrella (affiliate link) or ManageWP.

What options do you have?

The easiest and fastest way to enable two-factor authentication on WordPress is to use a plugin. There are two options for this.

First, you can choose a plugin dedicated to dual authentication on WordPress. The official WordPress directory has dozens of them.

Among the most popular (more than 5,000 active installations), you will find:

The other option is to take advantage of a double authentication feature offered by a general purpose security plugin such as SecuPress, iThemes Security, or Wordfence Security.

Let’s find out how to implement them in detail.

How to enable dual authentication on WordPress with the WP 2FA plugin

If you want to use a plugin dedicated to dual authentication on WordPress, the WP 2FA plugin is a reliable and effective option for several reasons:

Without transition, let’s learn how to set it up in a few quick steps.

Step 1: Install and activate the WP 2FA plugin

First, install and activate the plugin on your WordPress administration interface. To do this, go to the Plugins > Add New menu.

Step 2: Select an authentication method for your users

Once the plugin is activated, a configuration wizard will automatically launch on your screen. Click on the blue “Let’s get started” button to get going:

You will then be prompted to choose an authentication method for your users. You have two options for the second authentication factor:

If you want to offer these two options to your users, leave both boxes checked.

Otherwise, uncheck the box of your choice if you don’t want to offer one of the authentication methods. Click on “Continue Setup” to continue the configuration:

In the next step, you can also choose to send a one-time use backup code, in case the previous authentication method (by an app or by email) doesn’t work.

To choose this option, leave the “Backup codes” box checked, then click on “Continue Setup”:

Step 3: Define which user roles will use dual authentication on WordPress

In the third step, WP 2FA prompts you to choose who will use dual authentication on your WordPress site. There are three options:

Proceed to the next step by clicking on “Continue Setup”:

Step 4: Configure a grace period

If you choose to enforce two-factor authentication on all or some of your users, you can give them the option to configure two-factor authentication within a certain grace period.

WP 2FA allows you to either:

If you decide to set a configuration delay, you will have to choose what will happen if the user doesn’t take action during the delay:

Finish by clicking on “All done”:

Step 5: Choose the method of dual login on WordPress for your user account

The last step is to set up dual authentication for your user account. To do this, click on the “Configure 2FA Now” button:

A highlighted window will then open on your screen asking you to choose which authentication method you want to use:

Step 6: Generate an authentication code on a two-factor authentication app

To authenticate via an application, you need to choose one. WP 2FA is compatible with the following applications:

For the purpose of this test, I will rely on Google Authenticator, which is probably the most famous.

Download this application on your smartphone. Open it, then scan the QR code offered by the WP 2FA plugin on your administration interface. When it’s done, click on the “I’m ready” button.

Then enter the code generated by the Google Authenticator application, and remember to validate by clicking on the corresponding button (“Validate & Save”):

Step 7: Connect to WordPress

To verify that everything is working properly, log out of your WordPress administration interface.

On the admin login page, enter your username and password as usual. If all is well, you will then be asked to enter a one-time code generated by the application you will be using.

In the case of Google Authenticator, this is a 6-digit code that is regenerated every 30 seconds.

And that’s it, your site is now much more secure. Congratulations!

You can also customize the text of the email that will send you an authentication code (if you choose this method in the plugin settings), via the WP 2FA > Settings > Emails & Templates menu. Finally, it’s also possible to change the text that is displayed on the login page when you have to enter your authentication code.

Join the WPMarmite subscribers

Get the last WPMarmite posts (and also exclusive resources).

How to enable two-factor authentication with a general security plugin

If you’ve gone through the process of setting up two-factor authentication on WordPress yourself, you may have found the steps to be relatively simple.

On the other hand, you may have found it a bit time-consuming to implement. The WP 2FA plugin has multiple configuration options, which can make things drag a bit.

If you want to go a bit faster — though with fewer options in the settings — there is another way.

This is the use of a general purpose security plugin. Most of them offer an option to enable dual authentication on your WordPress site.

WPMarmite has dedicated detailed tutorials to three of the most famous security plugins, in which you will find out how to configure dual authentication. These are the following plugins:

If you choose to use a general purpose security plugin, don’t enable a dedicated two-factor authentication plugin like WP 2FA or one of its competitors at the same time. This would be counterproductive and you will expose yourself to incompatibility risks.

Conclusion

Dual authentication on WordPress is an effective way to strengthen the security of your site. For example, it allows you to better protect your site against brute force attacks.

Throughout these lines, you have discovered two main methods to activate it on your WordPress installation:

  1. With a dedicated plugin like WP 2FA.
  2. With a general purpose security plugin like Wordfence, iThemes Security, or SecuPress.

However, don’t rely on two-factor authentication alone to protect your site. Consider using strong passwords, for example, as well as an anti-spam plugin like Akismet.

Have you implemented dual sign-in on your site? If so, what feedback can you share with us? Give your opinion to WPMarmite readers by posting a comment.

Exit mobile version