Password-only WordPress administrators are the most reliable foothold attackers find. Credentials leak from unrelated services, brute-force runs against xmlrpc.php and wp-login.php are constant, and a single reused password is usually the difference between an inconvenience and an incident. Two-factor authentication on every admin account stops most of the credential-stuffing risk in one move.
What’s happening
Most WordPress sites have at least one administrator that predates the security policy currently in force. New roles get 2FA enforced; the original founder account, the agency handoff account, or the “wp-admin” user from a 2019 migration usually does not. Attackers don’t care which account they get — they enumerate every user via /wp-json/wp/v2/users and the author archive, then target the weakest.
How to verify
List every user with administrator capability and check which ones have a 2FA secret on file. With WP-CLI:
wp user list --role=administrator --fields=ID,user_login,user_email,user_registered
Then, depending on the plugin you use, query its meta table. For the WP 2FA / Two-Factor plugin family:
wp db query "SELECT u.user_login FROM wp_users u \
LEFT JOIN wp_usermeta m ON u.ID = m.user_id AND m.meta_key = '_two_factor_enabled_providers' \
WHERE m.meta_value IS NULL OR m.meta_value = '';"
Any row returned is an administrator with no second factor.
The fix
- Pick one TOTP plugin and standardise on it across all environments. We use the Two-Factor plugin maintained by core contributors for self-hosted installs.
- Enforce 2FA for the
administrator,editor, and any custom high-privilege role via the plugin’s role policy. Do not leave it user-optional. - Generate one-time recovery codes for each admin and store them in your password manager, not in email.
- For automation users (CI deploy keys, headless integrations), use application passwords scoped to the minimum required capability — never share a 2FA-protected human account with a script.
- Add a documented bypass procedure: under what conditions an on-call engineer can disable 2FA on a locked-out account, who approves it, and how the audit trail looks.
If you’d rather not be the one wiring the bypass procedure or paging through plugin defaults, this is the kind of work covered by our Monitoring & Support engagement.