Do you want to add Google Authenticator 2-step verification to your WordPress site?
Passwords alone aren’t enough to ward off hackers and unauthorized users. Luckily, using Google Authenticator 2-step verification can add an extra layer of security to your website.
In this article, we will show you how to add 2-step verification on your WordPress site using the Google Authenticator app.
What Is the Google Authenticator App, and Why Do You Need It for Your WordPress Site?
The Google Authenticator app is a mobile application that adds a second layer of authentication every time you log in to a third-party app or website like WordPress.
Unfortunately, passwords can sometimes be cracked. If you are using the same password on numerous websites, then a security leak on one puts your other accounts in danger. Often, people are lazy, and they don’t change their passwords even after they get an email about a security compromise on a major site.
Well, the 2-step verification is the solution just for that. Even if the hacker knows your WordPress username and password, they will not be able to access your WordPress website unless they have a time-restrained random security code (provided by Google Authenticator).
Because your blog is directly connected to your mobile device, you will be the only person with access to retrieve the unique code for each login. The code expires in a short amount of time for security purposes.
The Google Authenticator app is just one example of a mobile application that provides two-factor authentication (2FA) for various online accounts and services.
It generates time-based one-time passwords (TOTPs) that serve as the second factor for authentication when logging into an account.
If you still aren’t convinced about the importance of WordPress security, then you should probably see how one of Wired.com author’s digital life was destroyed.
After reading that story, we jumped on board with the 2-step authentication for our Google accounts and most other services that offer this feature. If you are as security-conscious as we are and you value your blog, then you should follow this tip to improve your WordPress security.
Note: Google Authenticator only works on iOS, Android, Windows Phone, webOS, PalmOS, and BlackBerry devices. In other words, you will need your smartphone to log in to your website.
To further improve your security, we recommend looking at other methods as well. For example, software like 1Password can help you manage your passwords in one place and ensure they are strong enough to withstand potential hackers.
With that said, let’s jump into the tutorial on how to add Google Authenticator 2-step verification to your WordPress site.
How to Add Google Authenticator in WordPress
The first thing you need to do is install the Google Authenticator app on your phone. We are going to use the iOS terminology for the sake of this tutorial, but the process is similar for other devices as well.
Step 1: Install Google Authenticator App on Your Mobile Device
Visit the App Store, search for ‘Google Authenticator’, and then click on ‘Install’ for the application.
Now, let’s get back to your WordPress dashboard.
Step 2: Install MiniOrange’s Google Authenticator Plugin
Go ahead and install and activate the MiniOrange’s Google Authenticator plugin. For more details, you can see our step-by-step guide on how to install a WordPress plugin.
This is a free WordPress plugin that helps protect your site from unauthorized access. Every time you log in to WordPress, you’ll be asked to enter the one-time passcode from the Google Authenticator app to verify your identity.
Upon activating the plugin, you’ll be taken to a setup wizard. Just follow the process to set up your Google Authenticator two-factor authentication in WordPress.
Step 3: Complete the Setup Wizard
Start by clicking on the ‘Let’s get started!’ button.
Next, you will be asked whether you want to set up 2FA after your first login or within the plugin dashboard. Either method is fine.
Click ‘Continue Setup.’
The next step is to choose who you’d like the 2FA to apply to. You can either select all users for maximum security, or you can only have it apply to certain user roles.
Then hit ‘Continue Setup.’
Lastly, you’ll be asked whether or not you’d like to directly enforce 2FA immediately or give users a grace period.
If you choose to give users a grace period, then you can select how long that would be in hours and days. Once that is complete, click on ‘All Done.’
Now that you are done with the setup process, you can decide whether you want to set up 2FA for yourself now or later.
Go ahead and hit the ‘Configure 2FA for yourself’ button.
From here, you’ll be asked to enter the method of 2-factor authentication you’d like to add to your WordPress site.
For this tutorial, we will choose ‘Google/Microsoft/Authy Authenticator.’ Then, just hit the ‘Save & Continue’ button.
Next, you’ll be asked to scan the barcode on the screen. That means you’ll have to pull up the Google Authenticator app on your phone and scan the barcode displayed.
In your Google Authenticator app on your mobile device, hit the ‘+’ icon at the bottom and then select ‘Scan a QR code.’ Then, point your phone camera to your computer screen to scan the barcode.
From here, a one-time passcode (OTP) will appear on your mobile device.
Type that into step 2 on your computer. From there, you can click on ‘Save & Continue.’
Now, you should receive a message that says that you’ve successfully configured two-factor authentication.
Simply select ‘Advance Settings.’
Step 4: Add Security Questions
In addition to adding Google Authenticator 2-factor authentication, you probably want to also add security questions as well.
If you can’t access your Google Authenticator app, then you can still log in to your WordPress website if you answer the security questions that you’ve set up for yourself.
You’ll need to head over to the Mini Orange 2-Factor » Two Factor page in your WordPress admin dashboard. Then, in the Setup 2FA For Me tab, find the Security Questions method and click on ‘Reconfigure.’
Keep in mind that you can also set up other types of two-factor authentication methods, such as email verification, OTP over SMS, OTP over email, OTP over Telegram, and even Duo Authenticator.
Next, you’ll be able to select up to three security questions. You can select two of them from a dropdown menu, and the third will be a custom question that you can come up with on your own.
Then, type in the answer for each of them and hit the ‘Save’ button.
Step 5: Test It for Yourself
Once everything is set up, you can test it out yourself.
Simply log out of your WordPress dashboard and try to log back in.
You will now be taken to a page where you can either answer security questions or use the Google Authenticator to enter your one-time passcode.
Go ahead and select the ‘Google Authenticator’ option.
On this screen, you will be asked to enter your OTP from your Google Authenticator app.
Type in the code and then click ‘Validate.’
Now, you will land back into your WordPress admin dashboard, as usual.
Lastly, we recommend that everyone turn on 2-step verification on their Google accounts. You can also configure that with Google Authenticator, as shown in this tutorial.
We hope this article has helped you add Google Authenticator 2-Step verification to your WordPress website. You may also want to check out our article on the most common WordPress errors and how to fix them or our ultimate guide to boost WordPress speed and performance.
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.
Jiří Vaněk
In today’s world, two-factor authentication is essentially a necessity, given the abundance of attacks. Occasionally, I’ve noticed various attempts to crack passwords through brute force attacks. Some were intercepted by the provider, but some always managed to slip through. Since then, I’ve felt much more secure using two-factor authentication. It’s not foolproof, but as an additional layer of security, it’s a necessity today. The article is wonderfully detailed. I tried the plugin you recommended, and it works brilliantly.
Hajjalah
This worked like magic indeed. At first it seemed to be a complicated process but I successfully set the Google authenticator on my website with a lot of ease.
This has enabled to completely stop the constant threats from hackers who were always trying to illegally login to my WordPress admin dashboard. This is one of the best security features I have ever implemented. Thanks WPBeginner.
David
I just tried this and it locked me out of my website. The codes weren’t working. How can I remove this authenticator and get my site back. Pls help
WPBeginner Support
You can deactivate the plugin following our guide below:
https://www.wpbeginner.com/beginners-guide/how-to-easily-deactivate-wordpress-plugins/
Admin
ANOOP VAISH
what have to do if mobile lost please discribe
WPBeginner Support
Hi Anoop,
In that case you will have to deactivate WordPress plugins via FTP to login.
Admin
yasir khan saqlaini
i am using this feature but i want to know how will i get google authenticator code while login wp dashbord.
WPBeginner Support
Hello Yasir,
You will get Google Authenticator code inside the app you installed on your phone.
Admin
Danny D
I’m surprised that nobody has mentioned Clef. This is the best 2-factor authentication for WordPress (and a lot of other websites as well). No passwords involved after initial setup. They have iOS and Android apps as well as chrome extensions to help with the setup. Works like a charm for me.
Sacha
I agree – I absolutely love Clef. It makes things so easy and secure.
rohit
Message To Syed Balkhi,
Well Fake GURUs Try to hack my website 100 Times a day Finally I have started using Google Authenticator and I change my Password every 10 days. I appreciate Your skills Thanks a lot.
Akhil K A
Hi.
The plugin is compatible up to WP 3.8.8
Can I install on the latest version?
Thanks.
WPBeginner Support
Yes you can. Please see, Should you install plugins not tested with your WordPress version.
Admin
Erick Perez
you guys don’t use this on your own website, how come?
handi priyono
Hello dude,, thanks for help me by writting this useful post.
this post very help me to prevent hacker to login to my web. thanks !!
WPBeginner Staff
Please contact WordPress.com support.
WPBeginner Staff
You can deactivate the plugin using an FTP client. See our guide on how to disable all plugins using FTP without wp-admin access.
Kavitha Krishnan
I am using the WP.com hosting. So this option will not work for me.
Kavitha Krishnan
Hi, I have uninstalled the Google app by mistake now i am unable to login to WP. i requested the account recovery also nothing worked. Is there any solution for my issue.
Sriram
Hi,
What if I have a custom login page? How can I integrate this plugin in my custom login page?
Lorena Dennison
I have my wordpress blog set up to receive a SMS code to log in… well my cell phone is shut off and can’t get the SMS Code…. so how can I log in and take that SMS off my blog?
WPBeginner Support
You can’t unless you disable the plugin used to enable this two step authentication.
Admin
Kamran Abdul Aziz
Aha, Google Authenticator & Authy they always works for me,
However is there any option where we can force users to use 2 Step verification?
Am not allowing my users to access the Backend, Their profile & everything is limited to front end only.
I don’t want them to access their backend & Setup 2 step.
Any solutions?
Brenda
I installed the two-step google authenticator, both the app and the plugin. I updated the app and now all of the sudden I can’t generate a verification code, and therefore have not been able to login to my Wordpress. I have no idea what “login using FTP” or who my webmaster is. I signed up for a free worpress account because I wanted to start a little blog and now it appears to me I have to be a computer wizard to do something so basic, which is login!! Can you please help? And explain it to me like I’m a third grader. I don’t have the tech savviness you all do.
Thank you in advance
WPBeginner Support
You mentioned that you have a free WordPress account. Does your blog address has wordpress.com in it? If that’s the case, then this tutorial is not for you. You need to contact WordPress.com support for assistance.
Admin
Zulfa Permata Suri
I have set up two-step authentication for my wordpress blog. Suddenly I cant log-in it said the authentication code that i type is invalid and now I am locked out of my wordpress account.
Help me please, I want to use my wordpress but I cant log-in T.T
Editorial Staff
Login to WordPress using FTP and delete the plugin.
Admin
Alyson
Hi – I lost my phone with my google authenticator on it and now I can’t get into my site. I don’t know how to log in using ftp ..
HELP?
Thanks!
Editorial Staff
Contact your webhosting provider. They’re the only one who have your FTP access and can help delete the plugin.
Cara Isaacs
Hey,
I recently set up two-step authentication for my wordpress blog. Downloaded the google app and it all worked fine with log-in. Then changed the name of my blog and accidentally deleted the google authenticator app and now I am locked out of my wordpress account as it asks for the code yet I cannot generate a code because I can’t access my account to get the key.
I hope you can help.. PLEASE!
Editorial Staff
Use FTP to delete the plugin.
Admin
Cara
Thanks for your reply. I just downloaded the ftp software except it can’t seem to connect to the server. Looks like I will be starting a new blog…
Editorial Staff
Hey Cara. Starting a new blog is not a good solution. Please get in touch with your hosting provider or send us an email. We can help you restore this and get it sorted out.
Everett Patterson
Well I did some research and found that the hosting time may be different than the phone time and may cause issues with the codes.
I was able to log in to my Cpanel and delete the plugin. I still want to use it though so I added it back in and used the relaxed mode this time. Seems to be working now.
Thanks for this post, very helpful.
Everett Patterson
Uh Oh. I locked myself out of my site.
Here’s what I did:
Added the plugin to my blog
Activated it, but didn’t check the “Active” box
Added authenticator to my android
Scanned the QR code
Checked “Active” box
Signed out
My phone gives me a new code every minute, but none of them work. What now?
Austin
I did this too…. I logged into my host via FTP and deleted the Google Authenticator plugin.
Then I went through the process again and the plugin/app combo worked like a charm!
Hope you’re able to get back into your site (if you haven’t already).
Maria Muir
I installed the plugin, followed the simple steps and have now been locked out of my site. I also have the failed attempt log in plugin which has blocked me for 3 failed attempts so now have to wait. I did put in the correct details and authentication code, I tripled checked the installation and settings, all are correct. So why can’t I log back in?
Editorial Staff
Run this plugin in the relaxed mode.
Admin
Chris Burbridge
It does concern me that when you install the plugin, you have to activate it user by user. That doesn’t make sense to me. Wouldn’t an administrator want to have it work for all users, otherwise there are holes in the net?
I have been trying this one, which is really great — http://wordpress.org/extend/plugins/duo-wordpress/ — there’s a free option, and it works similarly. It is very slick, with a smart phone.
Editorial Staff
The reason why Google Authenticator requires each user to enable it themselves is because they have to connect their device with it. Google Authenticator is a great solution if you don’t like paying for a service. We are using it on our site. All we did was send an email to all users and ask them to turn it on.
Yes it requires a little bit of extra work, but it is surely worth it for a small company like ours. If you have hundreds of people in your team, then it would be worth to automate it with a service like the one you linked.
Admin
Michael
This works great with Limit Login Attempts plug in. Great security feature if your blog does not have SSL capabilities.
yatin
i love your site very helpful
what if Google authenticator app got uninstalled by mistake !!!!
after that how can i login in my wordpress site ?
Editorial Staff
Delete the plugin. Then re-do the process.
Admin
Gerard
Good article, good plugin and good subject
Love Authenticator app.
Kind regards,
Gerard.
Umer Rock
Buy Syed bro it is not linked to google account ? then why you used google athenticator word , i think it is kind of 2 step verification system only,
Editorial Staff
If you read the post carefully, you will see that the app this plugin uses is called Google Authenticator. Without using that application this would not work. If you actually follow the tutorial and download the application, then you will see that application is made by Google Inc.
Admin
Hadley
I was able to successfully set up the Google Authenticator app for myself as an admin on my site, but was not able to set it up successfully for an editor on the same site. On the other user’s profile settings under Google Authenticator, the only options are to hide the Authenticator settings or make the user active with Google Authenticator. There aren’t the same options to type in a site description or view a secret code. After installing the app successfully to the other user’s phone, she was not able to sign in to the site and I’m wondering if this is due to the profile settings. Any advice?
Editorial Staff
Interesting. It is probably best to contact the plugin author and see what the issue could be.
Admin
Ahmad Awais
Putting our login authentication in hands of a 3rd party plugin?
Not more than 5k Downloads! What about its authenticity? Are you using it yourself #justcurious.
I am happy with .htpaswrd file.
Should we trust this code?
Except this a nice plugin for sure.
Editorial Staff
The plugin has low downloads because not many people have jumped on board with this 2-step verification method. If you are happy with .htpaswd, then good for you. Yes, we are using it on our site along with all the other security measures.
Admin
Dilawer Pirzada
Buzz! After my great efforts on securing Wordpress blog from spammers and hackers, I myself today found a great plugin to stop hackers!
Thanks for the plugin!
Santel Phin
Hi,
I have completed the setup and it works great. But do I have possibility to choose how to the verification code.
I did the same setup for my Google account, but it send via SMS in stead. And I do prefer this mode as well if it is possible.
But I don’t see any setting to chose send via SMS. Hope you can give me an idea if it is possible or not.
Thanks
Editorial Staff
No the SMS option is not available. Mainly because for that you need a sending service which blogs are not equipped with. There is another plugin called “2-step verification” that has the option to email the code. But no SMS.
Admin
Navneet Singh
Plugin looking simple and POWERFUL.!!
Saad
This Will Be Useful For Stopping Brute Force
Geoffrey Gordon
Thanks Syed
WordPress security has always been a big issue in general, so the more educated people are regarding WordPress security the better. This is especially important as people see WordPress as a quick way to get a website up and running. Then one day without warning BANG their website is down by some hacker.
Busy checking out the Google authentication plugin for WordPress, looks good. I have ask though with all the security plugin’s installed on ones blog plus other plugins it tends to slow down the website. Sometimes its better to code what a plugin can do straight into your blog, rather than keep adding another plugin.
Editorial Staff
This plugin works in the backend, so it will not have an impact on your site’s load time on the front-end.
Admin
Landfoci
Good plugin. Thanks your share