When we have 2 factor authentication enabled with Google Authenticator plugin in our WordPress site, we might face an awkward situation where WordPress login page keeps saying “ERROR: The Google Authenticator code is incorrect or has expired.“.

I know you might get confused with this error message and sometimes you may feel you lost all your most valuable contents on the site (actually, I felt like this), but that’s not the truth is.

The actual problem is with your web hosting. Yes, you heard it correct. The reason for this issue is the date and time of your hosting server is not matching the global UTC time. If you are having access to your web server you may check this by yourself. Please login to your server via terminal and type the below command to check the date and time.

date

Please check with your hosting provider and ask them to sync. the correct time on your server. Once they fixed it, now you can able to login to your awesome WordPress site without any issues.

Is it taking more time to get response from your hosting provider? No worries, in the meantime you can disable the Google Authenticator plugin and continue your work.

Bypassing the Google Authenticator Code

Some people say, find Google authenticator plugin and remove it from your server. But don’t do that, because it will cause some fatal errors.

The easiest and safest way is here. Thanks to GeekandBlogger team for their easy steps.

  1. Login to your web hosting cPanel
  2. Navigate to wp-content folder
  3. Create a folder ‘disabled’ or something else which will not conflict with WordPress
  4. Navigate to wp-content/plugin directory
  5. Find the Google Authenticator plugin and move it to ‘disabled’ folder.
  6. Open the wp-admin page. Now it won’t prompts for Google Authenticator Code
  7. Log in to your WordPress dashboard

Tada… Issue is solved. Now you can continue your work, once you got the confirmation from your when hosting provider you can enable the plugin again.

Once you have enabled the plugin again, please regenerate the authenticator code again and sync it with your mobile app.