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.
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 Autheticator 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.
- Login to your web hosting cPanel
- Navigate to wp-content folder
- Create a folder ‘disabled’ or something else which will not conflict with WordPress
- Navigate to wp-content/plugin directory
- Find the Google Authenticator plugin and move it to ‘disabled’ folder.
- Open the wp-admin page. Now it won’t prompts for Google Authenticator Code
- Log in to your WordPress dashboard
Tada… Issue is solved. Now you can continue your work, once you got the confirmation from your wen hosting provider you can enable the plugin again.