Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

Säkerhetstips för WordPress: Add to Google Authenticator 2-stegs autentisering

Redaktionell anmärkning: Vi tjänar en provision från partnerlänkar på WPBeginner. Provisionen påverkar inte våra redaktörers åsikter eller utvärderingar. Läs mer om Redaktionell process.

Vill du add to Google Authenticator 2-stegs autentisering till din WordPress site?

Enbart password är inte tillräckligt för att skydda mot hackare och obehöriga användare. Lyckligtvis kan du använda Google Authenticator 2-stegsverifiering för att add to ett extra lager av säkerhet på din website.

I den här artikeln kommer vi att visa you hur du lägger till 2-stegs autentisering på din WordPress site med hjälp av Google Autentisera app.

wordpress-security-tip_-add-google-authenticator-2-step-verification-in-post

Vad är appen Google Authenticator och varför behöver du den för din site i WordPress?

Appen Google Authenticator är en mobilapplikation som addar ett andra lager av autentisering varje gång du loggar in på en app eller website från tredje part, som WordPress.

Tyvärr kan lösenord ibland knäckas. Om du använder samma password på flera olika websites kan en säkerhetsläcka på en av dem innebära att dina andra accounts är i fara. Ofta är människor lata och ändrar inte sina password även efter att de fått ett email om en säkerhetsläcka på en stor site.

2-stegsverifieringen är lösningen för just detta. Även om hackern känner till ditt användarnamn och password för WordPress, kommer de inte att kunna komma åt din WordPress website om de inte har en tidsbegränsad slumpmässig säkerhetskod (tillhandahålls av Google Authenticator).

Eftersom din blogg är direkt ansluten till din mobila device är du den enda som har tillgång till att hämta den unika koden för varje login. Koden löper ut efter en kort tid av säkerhetsskäl.

Appen Google Authenticator är bara ett exempel på en mobilapplikation som tillhandahåller tvåfaktors-autentisering (2FA) för olika onlinekonton och tjänster.

Det genererar tidsbaserade engångslösenord (TOTP) som fungerar som den andra faktorn för autentisering vid logging in på ett account.

Om du fortfarande inte är övertygad om vikten av WordPress säkerhet, bör du förmodligen se hur en av Wired.com-författarnas digitala liv förstördes.

Efter att ha läst den där storyn hoppade vi på 2-stegs autentisering för våra Google accounts och de flesta andra tjänster som erbjuder den här funktionen. Om du är lika säkerhetsmedveten som vi är och du värdesätter din blogg, bör du följa detta tips för att förbättra din WordPress säkerhet.

Note : Google Autentisering fungerar endast på iOS-, Android-, Windows Phone-, webOS-, PalmOS- och BlackBerry-enheter. Med andra ord behöver du din smartphone för att logga in på din website.

För att ytterligare förbättra din säkerhet rekommenderar vi att du också tittar på andra metoder. Till exempel kan programvara som 1Password hjälpa dig att hantera dina lösenord på ett ställe och se till att de är tillräckligt starka för att motstå potentiella hackare.

Med det sagt, låt oss hoppa in i tutorialen om hur man addar Google Authenticator 2-stegs autentisering till din WordPress site.

Så här addar du till Google Autentisering i WordPress

Det första du behöver göra är att installera Google Authenticator app på din telefon. Vi kommer att använda iOS-terminologin för den här tutorialen, men processen är liknande för andra enheter också.

Step 1: Installera Google Authenticator App på din Mobile Device

Besök App Store, search efter ”Google Authenticator” och klicka sedan på ”Install” för applikationen.

google authenticator app

Låt oss nu gå tillbaka till din WordPress dashboard.

Step 2: Installera MiniOranges tillägg Google Authenticator

Installera och aktivera MiniOranges plugin Google Authenticator. För mer detaljer kan du se vår Step-by-Step guide om hur du installerar ett plugin för WordPress.

MiniOranges Google Authenticator plugin

Detta är ett gratis plugin för WordPress som hjälper till att skydda din site från obehörig åtkomst. Varje gång du loggar in på WordPress kommer du att bli ombedd att enter engångskoden från Google Authenticator app för att kontrollera din identitet.

När du aktiverar pluginet kommer du att tas till en Setup Wizard. Följ bara processen för att konfigurera din Google Authenticator tvåfaktors-autentisering i WordPress.

Step 3: Completera Setup Wizard

Börja med att klicka på knappen ”Låt oss komma igång!”.

Getting starting with two factor authentication

Därefter kommer du att bli tillfrågad om du vill ställa in 2FA efter din första login eller i plugin-instrumentpanelen. Båda metoderna är bra.

Click ”Continue Setup”.

continue setup 2FA

Nästa steg är att välja vem du gillar att 2FA ska tillämpas på. Du kan antingen välja all användare för maximal säkerhet, eller så kan du bara låta det gälla vissa användarroller.

Tryck sedan på ”Fortsätt installation”.

2FA user roles

Slutligen kommer du att bli tillfrågad om du gillar att direkt tillämpa 2FA omedelbart eller ge användarna en frist.

Om du väljer att ge användarna en respittid kan du selecta hur lång den ska vara i timmar och dagar. När detta är klart klickar du på ”All Done”.

2FA grace period

Nu när du är klar med installationsprocessen kan du bestämma om du vill ställa in 2FA för dig själv nu eller senare.

Gå vidare och tryck på knappen ”Konfigurera 2FA för dig själv”.

configure 2FA yourself

Härifrån kommer du att bli ombedd att enter den metod för 2-faktor autentisering som du gillar att add to your WordPress site.

För denna tutorial väljer vi ”Google/Microsoft/Authy Authenticator. Sedan trycker du bara på knappen ”Save & Continue”.

select authentication method

Därefter kommer du att bli ombedd att skanna streckkoden på vyn. Det betyder att du måste ta fram appen Google Autentisering på din telefon och skanna streckkoden som visas.

I din Google Authenticator app på din mobila enhet, tryck på ”+” icon längst ner och välj sedan ”Skanna en QR-kod”. Rikta sedan din mobilkamera mot din dators vy för att skanna streckkoden.

scan qr code for google authenticator

Därefter kommer en engångskod (OTP) att visas på din mobila device.

Skriv in det i steg 2 på din dator. Därifrån kan du clicka på ”Save & Continue”.

configure google authenticator

Nu bör du få ett message som säger att du utan problem har konfigurerat tvåfaktors-autentisering.

Välj helt enkelt ”Advance Settings”.

advance settings

Step 4: Lägg till säkerhetsfrågor

Förutom att lägga till Google Authenticator 2-faktor autentisering, vill du förmodligen också lägga till säkerhetsfrågor också.

Om du inte kan komma åt din app Google Autentisering kan du fortfarande logga in på din website WordPress om du svarar på de säkerhetsfrågor som du har ställt till dig själv.

Du måste heada över till Mini Orange 2-Factor ” Two Factor page i din WordPress adminpanel. Sedan, på tabben Setup 2FA For Me, hittar du metoden Säkerhetsfrågor och klickar på ”Reconfigure”.

Tänk på att du också kan ställa in andra typer av metoder för tvåfaktors-autentisering, till exempel e-postverifiering, OTP över SMS, OTP över e-post, OTP över Telegram och till och med Duo Authenticator.

reconfigure security questions

Därefter får du möjlighet att selecta upp till tre säkerhetsfrågor. Du kan välja två av dem från en dropdown-meny, och den tredje kommer att vara en anpassad fråga som du kan komma på på egen hand.

Skriv sedan in svaret för var och en av dem och tryck på knappen ”Save”.

set security questions

Step-by-Step 5: Testa det själv

När allt är klart kan du testa det själv.

Logga helt enkelt ut från din WordPress dashboard och försök logga in igen.

WordPress login page

Du kommer nu till en page där du antingen kan svara på säkerhetsfrågor eller använda Google Autentisering för att enter ditt engångslösenord.

Gå vidare och välj alternativet ”Google Authenticator”.

2 factor authentication method

På den här vyn kommer du att bli ombedd att enter din OTP från din Google Autentisering app.

Skriv in koden och klicka sedan på ”bekräfta”.

validate otp

Nu kommer du tillbaka till din WordPress dashboard, som vanligt.

Slutligen rekommenderar vi att alla slår på 2-stegsverifiering på sina Google accounts. Du kan också konfigurera det med Google Authenticator, som visas i denna tutorial.

Vi hoppas att den här artikeln har hjälpt dig att add to Google Authenticator 2-stegs autentisering till din WordPress website. Du kanske också vill kontrollera vår artikel om de vanligaste WordPress error och hur man fixar dem eller vår ultimata guide för att öka WordPress hastighet och prestanda.

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.

Avslöjande: Vårt innehåll stöds av våra läsare. Det innebär att om du klickar på några av våra länkar, kan vi tjäna en provision. Se hur WPBeginner finansieras, varför det är viktigt, och hur du kan stödja oss. Här är vår editoriala process.

Avatar

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

Den ultimata WordPress-verktygslådan

Få GRATIS tillgång till vår verktygslåda - en samling WordPress-relaterade produkter och resurser som varje professionell användare bör ha!

Reader Interactions

59 kommentarerLämna ett svar

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Jiří Vaněk says

    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.

  3. Hajjalah says

    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.

  4. David says

    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

  5. yasir khan saqlaini says

    i am using this feature but i want to know how will i get google authenticator code while login wp dashbord.

  6. Danny D says

    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.

  7. rohit says

    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.

  8. Kavitha Krishnan says

    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.

  9. Lorena Dennison says

    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?

  10. Kamran Abdul Aziz says

    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?

  11. Brenda says

    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 says

      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.

      Administratör

  12. Zulfa Permata Suri says

    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

  13. Cara Isaacs says

    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!

  14. Everett Patterson says

    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.

  15. Everett Patterson says

    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 says

      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).

  16. Maria Muir says

    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?

  17. Chris Burbridge says

    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 says

      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.

      Administratör

  18. Michael says

    This works great with Limit Login Attempts plug in. Great security feature if your blog does not have SSL capabilities.

  19. yatin says

    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 ?

  20. Umer Rock says

    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 says

      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.

      Administratör

  21. Hadley says

    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?

  22. Ahmad Awais says

    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 says

      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.

      Administratör

  23. Dilawer Pirzada says

    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!

  24. Santel Phin says

    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 says

      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.

      Administratör

  25. Geoffrey Gordon says

    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.

Lämna ett svar

Tack för att du väljer att lämna en kommentar. Tänk på att alla kommentarer modereras enligt våra policy för kommentarer, och din e-postadress kommer INTE att publiceras. Vänligen använd INTE nyckelord i namnfältet. Låt oss ha en personlig och meningsfull konversation.