Security

Two-factor login (2FA) in WordPress, step by step

Two-factor login (2FA) in WordPress, step by step

In short: two-factor login (2FA) adds a one-time code from a phone app to your password. As a result, even a leaked password is not enough for someone to get into your panel. In WordPress you turn it on with a plugin in minutes, remembering to save the backup codes.

A password, even a strong one, can leak during a breach of a completely different service. So a password alone is no longer enough, and the simplest way to raise the bar is two-factor login. Below we show how to turn it on and how not to lock yourself out while doing it.

It is part of broader WordPress hardening. Why it is worth it we also explain in strong passwords and 2FA.

How the second factor works

After you enter your password, WordPress asks for a one-time code generated by the app on your phone, which changes every 30 seconds. Even if someone learns the password, they cannot get in without the phone. That is why 2FA stops most automated account takeover attempts, including attacks that replay stolen passwords.

Step 1: choose an app

Install Google Authenticator, Microsoft Authenticator or Authy on your phone. They all work the same way, and Authy additionally backs up the codes, so you do not lose them when you change phones.

Step 2: turn on a 2FA plugin

In WordPress install a two-factor login plugin, for example WP 2FA or a module built into a security suite. During setup the plugin shows a QR code. Scan it with the app, type the first code to confirm, and you are done.

Step 3: save the backup codes

This is the most important step, and the one many people forget. The plugin generates backup codes that let you log in without the phone. Save them somewhere safe, ideally in a password manager. Without them, a lost phone means trouble getting in.

Turn it on for every account

2FA on the administrator account is the basics, but it is worth requiring it from all users with panel access, especially editors and agencies. One poorly protected account is enough to bypass the rest of your defences.

We can set it up

If you do not want to risk locking yourself out, we will configure 2FA and harden login safely, with a backup before the change. See also what ongoing care covers.

Related articles

Frequently asked questions

What is two-factor login?

It is an extra step at login alongside the password. After entering your password you also provide a one-time code from an app on your phone. Even if someone learns your password, they cannot get in without that code. It is one of the most effective and cheapest ways to protect an account.

Which app should I use for the codes?

The most popular are Google Authenticator, Microsoft Authenticator and Authy. They all work similarly: you scan a QR code during setup, and then the app shows a new code every 30 seconds. Authy has the advantage of backing up the codes, so you do not lose them when you change phones.

What if I lose the phone with the app?

That is why during setup you save backup codes and keep them somewhere safe, for example in a password manager. They let you log in without the phone. If you do not have them, access can be recovered through the database or server, but that is a job for someone technical.

Does 2FA slow down login?

It adds one code to type, so a few seconds. Many plugins let you remember a trusted device for a while, so you do not enter a code every time. In return you get protection that stops most account takeover attempts.

Related services

Free security audit

Do not wait for the site to go down

Send us your website address through the form. We will check it for threats and performance, and you get concrete recommendations plus a free security quote.

Request a free audit →

No obligation · Contact via the form · Reply within 1 business day

Looking for a fresh start? We will build your site from scratch, fast and secure. See the MP WebSolutions offer.