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

How to Reset a WordPress Password from phpMyAdmin

Resetting your WordPress password is usually a straightforward process. However, sometimes the standard methods don’t work, leaving you locked out of your website.

Some of our readers have encountered this issue and asked for our advice about the best way to access their accounts. Luckily, you can always use the phpMyAdmin tool in your hosting account’s control panel to directly reset your password from the WordPress database.

In this article, we will show you how to easily reset a WordPress password from phpMyAdmin. We’ll explain each step clearly, ensuring that even if you’re not familiar with databases, you can follow along safely.

How to Reset a WordPress Password from phpMyAdmin

Why Reset a WordPress Password From phpMyAdmin?

WordPress makes it super easy to recover a lost password.

You can simply go to the login screen of your WordPress website and click on the ‘Lost your password?’ link.

Click on 'Lost Your Password?'

When you click on the link you are taken to the password reset page. Once you enter your username or email address, WordPress will send a password reset link to the associated email address.

However, if you don’t have access to that email address, or your WordPress site fails to send an email, then you will not be able to reset your password.

In such a situation, you will need to reset your WordPress password directly in the database. The easiest way to do that is by using phpMyAdmin.

Having said that, let’s see how you can easily reset a WordPress password from phpMyAdmin.

How to Reset a WordPress Password From phpMyAdmin

Subscribe to WPBeginner

If you don’t want to watch the video tutorial, then you can continue reading the text version below.

First, you need to log in to the cPanel dashboard of your WordPress hosting account. Next, you need to navigate to the Databases section where you can click on the phpMyAdmin icon.

phpmyadmin panel in Bluehost

This will launch the phpMyAdmin app.

Here you need to select your WordPress database from the left pane.

Select Your WordPress Database

You will now see the list of tables in your WordPress database.

You need to look for the wp_users table in this list and click on the ‘Browse’ link next to it.

Click the wp_users Browse Link

Note: Table names in your WordPress database may have a different prefix than the one we are showing in our screenshot. Changing table prefixes can improve the security of your WordPress site.

You will now see the rows in your WordPress users table. Go ahead and click on the edit button next to the username whose password you wish to change.

Click the Edit Button Next to the Username

PhpMyAdmin will show you a form with all the user information fields.

You will need to delete the value in the user_pass field and replace it with your new password. Under the function column, select MD5 from the drop-down menu and then click on the Go button at the bottom of the form.

Select MD5 and Type Your New Password

Your password will be encrypted using the MD5 hash and then it will be stored in the database.

Congratulations! You have successfully changed your WordPress password using phpMyAdmin.

Some of you may be wondering why we selected the MD5 hash to encrypt the password. WordPress previously used MD5 hash to encrypt passwords, but since WordPress 2.5 it has been using stronger encryption technologies.

However, WordPress still recognizes MD5 to provide backward compatibility. As soon as you log in using a password string stored as an MD5 hash, WordPress will automatically change it to use the newer encryption algorithms.

Expert Guides on Passwords in WordPress

Now that you know how to reset a WordPress password from phpMyAdmin, you may wish to see some other articles related to passwords in WordPress.

We hope this tutorial helped you learn how to reset a WordPress password from 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.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

Editorial Staff

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.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

291 CommentsLeave a Reply

  1. Syed Balkhi

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

  3. Karen Seet

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

  4. Muhammad Talha

    Thanks a lot!

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

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

  7. Niculina

    Thanks!! it worked! :):)

  8. Joel

    Lifesaver, thank you!

  9. alan

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

    Great job.

    Regards,

    Alan

  10. Trevor

    Thank you !!!

  11. 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?

  12. Margie

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

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

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

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

  16. tobi

    awesome post thanks a lot

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

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

  19. Creina

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

  20. ashish

    thank you so much for this tutorial…

  21. Dairick

    Thank you for this turorial

  22. Parbat Devkota

    thank you work charm.

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

      Admin

  24. Zania

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

  25. chrismj06

    You have saved my life. Bless u!

  26. Jill

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

  27. Kristen

    You saved the day! Thank you!

  28. AMIT KUMAR

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

  29. Dubb

    Awesome…you have saved the day once again my friend

  30. Nigel

    Awesome, thanks.

  31. Skye

    THANK YOU!!!!! Great article!

  32. Kumar

    Work like charm!!

  33. hendriyana

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

  34. Jaykesh

    Amazing, thanks for quick help.

  35. luis

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

  36. Muniyappa

    Thank you very much..

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

  38. Carol Long

    Thank you! Life saver!

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

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

  41. Samson

    Thank you very much. saved me valuable time

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

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

  44. Diana

    Soooo helpful! Thank you!!!!

  45. raaga

    Thanks man. Very useful article.

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

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

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

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

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.