Skip to content

How to Set Up Two-Factor Authentication for Your WordPress Admin

Female red winged Starling, Cape Town ( 1050242) – How to Set Up Two-Factor Authentication for Your WordPress Admin
Photo: Matti Blume, CC BY-SA 4.0, via Wikimedia Commons

Here’s a scenario that plays out in Kenya more often than anyone admits. A small business owner uses the same password for her Gmail, her Facebook page and her WordPress admin. One of those gets leaked in a breach, someone tries the same combination on her website login, and within an hour her homepage is advertising betting sites.

Two-factor authentication, or 2FA, is the simplest way to stop that story. Even if someone has your password, they can’t log in without a second proof that only you hold.

What 2FA actually is

Normal login uses something you know: your password. 2FA adds something you have, usually your phone. After typing your password, WordPress asks for a six-digit code from an authenticator app that changes every 30 seconds. No code, no entry.

Advertisement

It sounds like extra work. In practice it adds about five seconds to each login, and it blocks the vast majority of automated attacks. Bots hammering your login page with stolen passwords hit a wall.

Why WordPress sites need it

WordPress powers a huge share of the web, which makes it the favourite target. Attackers run automated “brute force” scripts that try thousands of password guesses against /wp-admin every day. Strong passwords help. 2FA makes those attacks essentially pointless. If you’ve read our WordPress security basics, think of this as the single highest-return item on that list.

What you’ll need

  • Admin access to your WordPress dashboard
  • A smartphone
  • An authenticator app, such as Google Authenticator, Microsoft Authenticator or Authy (all free)

Step-by-step setup

  1. Back up first. Always take a backup before adding a plugin to a live site. If you don’t have a routine yet, our guide on backing up WordPress covers it.
  2. Install a 2FA plugin. In the dashboard go to Plugins > Add New and search for a well-reviewed 2FA plugin, for example “Two Factor”, “WP 2FA” or the 2FA module inside a security plugin you already use. Check the active installs, recent update date and reviews before installing.
  3. Activate it and open its settings, usually under Users > Your Profile or a new menu item.
  4. Choose the authenticator app method. It’s more secure than SMS codes, which can be intercepted through SIM swap fraud, a real risk in Kenya.
  5. Scan the QR code shown on screen using your authenticator app. A new entry appears with a six-digit code.
  6. Enter the code to confirm it works.
  7. Save your backup codes. The plugin will give you a set of one-time recovery codes. Store them somewhere safe and offline, such as a password manager or a printed sheet in a locked drawer. These are your lifeline if you lose your phone.
  8. Test it. Open a private browser window, log out and back in, and confirm the code prompt appears. Keep your original session open until you’ve verified this, just in case.

Who should be required to use it

Don’t stop at your own account. Anyone with Administrator or Editor access is a way in. In most 2FA plugins you can require it by role. We suggest making it mandatory for admins and editors, and optional for authors. If an agency or freelance developer manages your site, ask them to enable it on their accounts too. Their security is your security.

Mistakes to avoid

Losing your phone with no backup codes. This is the number one cause of lockouts. Save the codes the moment you see them. If you do get locked out, your host can usually help by temporarily disabling the plugin through cPanel’s File Manager or by renaming its folder.

Relying on SMS. It’s better than nothing, but an app-based code is safer.

Keeping a weak password because “I have 2FA now.” 2FA is a second lock, not a replacement for the first. Use a long, unique password and a password manager.

Sharing one admin login across the team. Give each person their own account. Shared logins can’t be protected properly, and you can’t tell who did what.

Extra layers worth adding

Once 2FA is on, consider limiting login attempts, hiding or changing the default login URL, and keeping WordPress, themes and plugins updated. Together these shrink your attack surface a lot. Also turn on 2FA for your hosting account and your domain registrar login, because those control your entire online presence. If someone takes over your domain, no WordPress setting can save you.

Questions about securing your hosting or domain account? You can see our options at buydomainkenya.co.ke or write to us on the contact page. Ten minutes today beats a weekend of cleanup later.

Leave a Reply

Your email address will not be published. Required fields are marked *

Chat now