Beginner's Guide for WordPress - Start your WordPress Blog in minutes.
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
WordPress Plugins
View all Guides

How to Reset a WordPress Password from phpMyAdmin

Last updated on by
Special WordPress Hosting offer for WPBeginner Readers
How to Reset a WordPress Password from phpMyAdmin

Knowing how to reset your WordPress password from phpMyAdmin is one of the essential things you should know about because for some reason if your site is hacked, or something else, you are no longer able to login to your admin panel using the login information, and you are not able to reset the password via email, this method can be very useful. We have helped three users with the same issue therefore we have decided to do this writeup.

Every WordPress blog uses a MySQL Database which can be accessed through your phpMyAdmin even if you are not using cPanel hosting. Follow the following steps to reset your WordPress password:

Video Tutorial

If you don’t like the video or need more instructions, then continue reading.

Step 1 – Identify the Name of your Database

It is always good to know the name of your WordPress Database. Sometimes you might be running multiple installations within the same database, then you will need to know exactly where to look for to reset the password. The best place to look is your wp-config.php file which is located in your root WordPress Directory. In there you will find the name of your database.

Step 2 – Locating Database and Editing the Fields

In your cPanel or other admin panel, you will need to access your MySQL database and then browse it via phpMyAdmin.

phpMyAdmin in cPanel

Once you are in phpMyAdmin, you will need to select the correct database on the left hand side. Look for the name that you found in your wp-config.php and click on that. You will see a list of tables with a prefix wp_ for the most part.

If you changed your prefix during installation, then you would be looking for that specific prefix “for ex: wp673_”.

You will look for the table wp_users, click on it and then click on the Browse Tab.

phpMyAdmin Browse

Click on the Pencil (Edit) Icon to reset your Password.

phpMyAdmin Edit

Now you will see a field that looks like this:

phpMyAdmin Edit field

Edit the user_pass field value. You will notice that there are a lot of random characters in the password field. Due to security reasons, WordPress stores the passwords as MD5 Hash rather than Plain text.

This means that you will not be able to enter plain text as the password. You would need to use one of the MD5 generators online to generate your password.

Recommended Tool: JavaScript MD5

Simply type your password in that tool and generate MD5 results. Copy and paste the code you get from the converter into your phpMyAdmin field and click Go to save changes.

You have now successfully changed your WordPress Password from phpMyAdmin.

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi. Page maintained by Syed Balkhi.

WPBeginner's Video Icon
Our HD-Quality tutorial videos for WordPress Beginners will teach you how to use WordPress to create and manage your own website in about an hour. Get started now »


  1. Graham says:

    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.
    So, thank you a lot.

  2. Karen Seet says:

    How do I find my “hosting provider” so I can get to phpmyadmin? I am new to this.

  3. Muhammad Talha says:

    Thanks a lot!

  4. Edwin Calimlim says:

    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.

  5. atif shahab says:

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

  6. Niculina says:

    Thanks!! it worked! :):)

  7. Joel says:

    Lifesaver, thank you!

  8. alan says:

    What a fantastic email, new to C-panel but this tutorial was so clear I did it first time.

    Great job.



  9. Trevor says:

    Thank you !!!

  10. Pedro says:

    Did this now Jetpack gives me this error :

    Jetpack could not contact 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?

  11. Margie says:

    Thank you so much. The instructions were easy enough for even me to follow ;-)

  12. Carina says:

    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. …..:(

  13. Thom Burlington says:

    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: : username ; password

    for the password do I now use “abc” ?

    • Thom Burlington says:

      Yes the password is “abc” – very nice – between your post and the video you are very clear, thank you.

  14. Neal Kelshaw says:

    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.

  15. tobi says:

    awesome post thanks a lot

  16. Jon O says:

    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!

  17. Tanya says:

    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!

  18. Creina says:

    Thank you. For anyone that finds the video confusing just follow the written instructions.

  19. ashish says:

    thank you so much for this tutorial…

  20. Dairick says:

    Thank you for this turorial

  21. Parbat Devkota says:

    thank you work charm.

  22. Alexandra Jones says:

    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 says:

      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.

  23. Zania says:

    Thank You! Thank You! Easy and worked like a charm!

  24. chrismj06 says:

    You have saved my life. Bless u!

  25. Jill says:

    Thanks, you’re a lifesaver and this was easy to follow!

  26. Kristen says:

    You saved the day! Thank you!

  27. AMIT KUMAR says:

    Thank you ! I was simply trying to enter password. I never knew about the MD5 concept. Thanks again for a great tutorial.

  28. Silviu says:

    Thank you ;)

  29. Dubb says:

    Awesome…you have saved the day once again my friend

  30. Nigel says:

    Awesome, thanks.

  31. Skye says:

    THANK YOU!!!!! Great article!

  32. Kumar says:

    Work like charm!!

  33. hendriyana says:

    Thanx !!! awesome.. helped for my problem….

  34. Jaykesh says:

    Amazing, thanks for quick help.

  35. luis says:

    Thanks a lot, I went into php admin and copy pasted the md5 password and i am in…..good job!

  36. Muniyappa says:

    Thank you very much..

  37. Tony Garcia says:

    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!!!

  38. Carol Long says:

    Thank you! Life saver!

  39. Lori says:

    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!

  40. christian gibson says:

    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……?

  41. Samson says:

    Thank you very much. saved me valuable time

  42. Rod Salm says:

    As always, straight forward, very helpful tutorials. Right to the point and bang on accurate. Like this phpadmin tip for passwords.

    Thank you!

  43. Ben Glancy says:

    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.

  44. Diana says:

    Soooo helpful! Thank you!!!!

  45. raaga says:

    Thanks man. Very useful article.

  46. Matthew Harris says:

    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.

  47. Kevin B. says:

    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,


  48. alex says:


  49. Gustavo says:

    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.

  50. Chris says:

    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!

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.