Locked Out of WordPress by Google Authenticator? How to Get Back In

I recently locked myself out of my WordPress site while experimenting with the Google Authenticator two-factor plugin. The fix is to disable the plugin over FTP, log in, and then turn it back on.

Steps to Disable the Plugin and Log In

  1. Connect to your site with an FTP or SFTP client and open /wp-content/plugins/google-authenticator.
  2. Rename the folder from google-authenticator to _google-authenticator. WordPress can no longer find it, so the plugin is disabled.
  3. Log in to WordPress as normal and open the Plugins page.
  4. Back in FTP, rename _google-authenticator back to google-authenticator.
  5. Refresh the Plugins page. The plugin now shows as deactivated. Reactivate it and reconfigure it in your user profile.

Avoid Locking Yourself Out Next Time

Before you enable two-factor authentication, create a second admin account without it. Test everything with your main account, and once it all works, delete the backup admin account. There’s a helpful video walkthrough of this approach here (video 3 on the page): Installation Essentials for WordPress.