Att återställa ditt WordPress-lösenord är vanligtvis en okomplicerad process. Ibland fungerar dock inte standardmetoderna, vilket gör att du blir utelåst från din webbplats.
Några av våra läsare har stött på detta problem och bett oss om råd om hur de bäst kommer åt sina konton. Lyckligtvis kan du alltid använda phpMyAdmin-verktyget i ditt hostingkontos kontrollpanel för att direkt återställa ditt lösenord från WordPress-databasen.
I den här artikeln visar vi dig hur du enkelt återställer ett WordPress-lösenord från phpMyAdmin. Vi förklarar varje steg tydligt, så att även du som inte är bekant med databaser kan följa med på ett säkert sätt.
Varför återställa ett WordPress password från phpMyAdmin?
WordPress gör det superenkelt att återskapa ett förlorat password.
Du kan helt enkelt gå till vyn för login på din website i WordPress och klicka på länken ”Lost your password?”.
När du klickar på länken kommer du till sidan för återställning av password. När du har enter ditt användarnamn eller din email address kommer WordPress att skicka en länk för återställning av password till den associerade email addressen.
Men om du inte har tillgång till den email addressen, eller om din WordPress site Misslyckas med att skicka ett email, kommer du inte att kunna återställa ditt password.
I en sådan situation måste du återställa ditt WordPress password direkt i databasen. Det enklaste sättet att göra det är att använda phpMyAdmin.
Med det sagt, låt oss se hur du enkelt kan återställa ett WordPress password från phpMyAdmin.
Så här återställer du ett password för WordPress från phpMyAdmin
Om du inte vill titta på tutorialen på video, kan du fortsätta att läsa textversionen under.
Först måste du logga in på cPanel-instrumentpanelen på ditt WordPress webbhotell konto. Därefter måste du navigera till sektionen Databases där du kan klicka på phpMyAdmin-ikonen.
Detta startar phpMyAdmin-appen.
Här måste du välja din WordPress database från den vänstra rutan.
Du kommer nu att se listan över tabeller i din WordPress database.
You need to look for the wp_users
table in this list and click on the ’Browse’ link next to it.
Note: Tabellnamn i din WordPress-databas kan ha ett annat prefix än det vi visar i vår screenshot. Om du ändrar tabellprefix kan du förbättra säkerheten på din site i WordPress.
You will now see the rows in your WordPress users table. Gå vidare och klicka på knappen edit bredvid användarnamnet vars password du vill ändra.
PhpMyAdmin kommer att visa dig ett formulär med alla fält för information om användaren.
You will need to delete the value in the user_pass
field and replace it with your new password. Under function column väljer du MD5 i rullgardinsmenyn och klickar sedan på knappen Go längst ner i formuläret.
Your password kommer att krypteras med hjälp av MD5-hash och sedan lagras i databasen.
Vi gratulerar dig! Du har utan problem ändrat ditt WordPress password med hjälp av phpMyAdmin.
Några av er kanske undrar varför vi valde MD5-hash för att kryptera password. WordPress använde tidigare MD5-hash för att kryptera lösenord, men sedan WordPress 2.5 har det använts starkare krypteringstekniker.
WordPress känner dock fortfarande igen MD5 för att tillhandahålla bakåtkompatibilitet. Så snart du loggar in med en password string som är lagrad som en MD5-hash, kommer WordPress automatiskt att ändra den till att använda de nyare krypteringsalgoritmerna.
Expertguider om lösenord i WordPress
Nu när du vet hur du återställer ett WordPress-lösenord från phpMyAdmin kanske du vill läsa några andra artiklar relaterade till lösenord i WordPress.
- Så här ändrar du ditt password i WordPress (Beginner’s Guide)
- Så här återställer du password för alla användare i WordPress
- Så här customize du WordPress Reset Password Page
- Hur man tvingar användare att byta lösenord i WordPress – Löp ut lösenord
- Har du glömt ditt password? Så här återskapas ett bortglömt password i WordPress
- Så här tvingar du fram starka password för användare i WordPress
- Så här addar du till tvåfaktors-autentisering i WordPress (gratis metod)
- Hur man tillåter användare att dölja/visa password på WordPress login vy
- Hur man enkelt och säkert hanterar password (Beginner’s Guide)
Vi hoppas att denna tutorial hjälpte dig att lära dig hur du återställer ett WordPress password från phpMyAdmin. You may also want to see our ultimate step-by-step WordPress security guide to keep your WordPress site safe or our expert pick of must-have plugins.
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.
Graham
THANK YOU!!
I was caught up on the md5 encryption of the pw field. This really save my tail. I was using a member profile update which stripped all the email fields. This in turn also stripped mine and poof! Everyone’s password was deleted.
Seriously.
So, thank you a lot.
-Graham
Karen Seet
How do I find my ”hosting provider” so I can get to phpmyadmin? I am new to this.
Muhammad Talha
Thanks a lot!
Edwin Calimlim
Great post, i wasn’t able to access my WP site for months already but thanks to this post, it is really a big help for me. Thank you.
atif shahab
Thanks alot. I was worried and stuck as well as i was unable to acess my WordPress dashboard for 2 hours. your recipe worked quickly. Thanks once again
WPBeginner Support
Glad it helped you solve the issue
Administratör
Niculina
Thanks!! it worked! :):)
Joel
Lifesaver, thank you!
alan
What a fantastic email, new to C-panel but this tutorial was so clear I did it first time.
Great job.
Regards,
Alan
Trevor
Thank you !!!
Pedro
Did this now Jetpack gives me this error :
Jetpack could not contact WordPress.com: register_http_request_failed. This usually means something is incorrectly configured on your web host.
Operation timed out after 15000 milliseconds with 0 bytes received
Any tips on this?
Margie
Thank you so much. The instructions were easy enough for even me to follow
Carina
I wish it worked for me……I followed the directions [easy] but when I went to put in the MD5 hash numbers, they were exactly the same as what was already in the field value. This tells me that my problem is then not entering my user name and password that is the problem, but something completely different. …..:(
Thom Burlington
Thank you, but ..
while I can now reset the password with the MD5 code, derived from the new password I created, say, ”abc” , and I finish and go back to my wordpress adimin signin:
domain.org/wp-admin : username ; password
for the password do I now use ”abc” ?
Thom Burlington
Yes the password is ”abc” – very nice – between your post and the video you are very clear, thank you.
Neal Kelshaw
Not quite correct. If you choose MD5 as the function in the drop down menu, and then type the password in plain text it hashes the value to an MD5 value.
tobi
awesome post thanks a lot
Jon O
Just wanted to say a BIG thank you for this article! I was indeed hacked and had sought assistance from my hosting company and others.. but this article was the only straight forward approach that worked first time! Thanks so much!
WPBeginner Support
Glad you found it helpful.
Administratör
Tanya
I spent hours trying to find a website to explain why I was logged onto my WP then 5 minutes later I couldn’t log onto it again.
Thank you so much for the simple video. Problem solved in 5 minutes!
You rock!
WPBeginner Support
Glad you found it helpful.
Administratör
Creina
Thank you. For anyone that finds the video confusing just follow the written instructions.
ashish
thank you so much for this tutorial…
Dairick
Thank you for this turorial
Parbat Devkota
thank you work charm.
Alexandra Jones
I’m the dunce from Mars who can’t speak computer. I’ll start with this:
”The best place to look is your wp-config.php file which is located in your root WordPress Directory.”
OK–where is it and how do I get there? I can’t log into my site because it will not any accept any password resets. I tried Chris’s phone method and got in on my phone, but not on my laptop. and when I tried to post something on the phone, I got a message that I should install the latest Jetpack, but I had to log into WordPress again, and guess what–”Invalid username.”
Is any of you who found these instructions such a breeze willing to speak to me on the phone? I’m writing from my wit’s end. That’s where I am. I would so appreciate it! Cheers!
WPBeginner Support
wp-config.php file resides on your web server. You can login to your web hosting control panel, locate the file manager, and then locate wp-config.php file. Alternately, you can also edit it using an FTP client.
Administratör
Zania
Thank You! Thank You! Easy and worked like a charm!
chrismj06
You have saved my life. Bless u!
Jill
Thanks, you’re a lifesaver and this was easy to follow!
Kristen
You saved the day! Thank you!
AMIT KUMAR
Thank you ! I was simply trying to enter password. I never knew about the MD5 concept. Thanks again for a great tutorial.
Silviu
Thank you
Dubb
Awesome…you have saved the day once again my friend
Nigel
Awesome, thanks.
Skye
THANK YOU!!!!! Great article!
Kumar
Work like charm!!
hendriyana
Thanx !!! awesome.. helped for my problem….
Jaykesh
Amazing, thanks for quick help.
luis
Thanks a lot, I went into php admin and copy pasted the md5 password and i am in…..good job!
Muniyappa
Thank you very much..
Tony Garcia
A client’s developer passed away while on vacation of all things. You can only imagine what happened after that. Nobody knew anything of how their developer was doing things. Luckily I was able to locate where their databases were and got access to their PHPMyAdmin.
Voila!!! I have both of their lost sites back up and running with access to the back-ends because of this post.
Thank you!!!
Carol Long
Thank you! Life saver!
Lori
This saved me ENDLESS time. I’m not a tech novice but I am a novice at coding. These step by step instructions helped me regain access to my site! After losing access due to a ”auto correct” error. (long story)
Thank you again!
christian gibson
You say that Wordpress generates an MD5 encryption of your password? But I seem to remember seeing somewhere on Stackoverflow that this is no longer true. They said: ”The WordPress password hasher implements the Portable PHP password hashing framework, which is used in Content Management Systems like WordPress and Drupal”.
I know very little about encryption/decryption systems, but one thing does seem strange. In a Wordpress website database you can can see in the user table a field called ’user-pass’ with contents like ’$P$BlBAsz6jcvS3rLGDiE81PwtwbEazKg1’.
All the hash values in this table begin with $P$B….. so what on earth is the point of including these leading 4 characters if they are all the same……?
Samson
Thank you very much. saved me valuable time
Rod Salm
As always, straight forward, very helpful tutorials. Right to the point and bang on accurate. Like this phpadmin tip for passwords.
Thank you!
Ben Glancy
Or, if your admin account is the usual ID=1.
Open functions.php and put this code in
wp_set_password( ”mypassword”, 1 );
Reload the page.
Uncomment code. Done.
Diana
Soooo helpful! Thank you!!!!
raaga
Thanks man. Very useful article.
Matthew Harris
Thanks for the tip, I couldn’t quite remember. Here is a return tip for you:
You don’t need the external MD5 tool. Look on the screenshot there is a ”Function” column with drop down boxes. On the user_pass field just select MD5 in the function column and type your new password in normal plain text in the input box next to it. When you save it phpMyAdmin will automatically md5 hash it for you.
Amir
Great article. I found Matthew Harris’ tip simpler and tested it to work as well. Thanks!
Julian
Mr. Harris approach worked like a charm! Thank you.
Kevin B.
Very helpful. As a non-technical user, I felt powerless when an errant designer wouldn’t respond to my requests for passwords; this page with instructions filled the bill perfectly!
Many thanks,
KB
alex
Thanks!
Gustavo
Thanks for this great tip. I tried the ”easiest” way above but couldn´t retrieve the automatic email because of some misterious server glitch.
I don´t know beans of PhP, so this kind of article is very useful for us.
Chris
I found the easiest and fastest work around the ”Sorry, that key does not appear to be valid” issue to reset your Wordpress password using your cell phone.
1.) Just use your cell phone to access your password reset email that was sent to you.
2.) Click on the link in the email. The link will automatically open the site where you can input your new password.
3.) Follow the prompts to enter your new password.
4.) Save your new password
5.) You should now be able to access your WordPress website with your new password from any computer, business as usual.
I hope this helps everybody!