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.