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

    This was very helpful, thank you

    • WPBeginner Support

      You’re welcome :)

      Admin

  3. Jiří Vaněk

    The method using PHPmyAdmin is great, and I use it when I have access to the database and don’t want to change the current user’s password. Personally, I have a slightly different approach: I first create a hash using an online tool and then change only the hash in the database to mine. The advantage is that after finishing the work, I can revert to the original hash, so I don’t have to change the current user’s password.

  4. Prescott Chartier

    I’ve tried this several times and each time it still says the password is incorrect, and yes I have the correct database.

    • WPBeginner Support

      The next thing to check would be that the MD5 action is properly going through in your database or if it gives you an error.

      Admin

    • Jiří Vaněk

      Alternatively, there are also online hash generation tools. You enter your password in them and they generate a hash for you. Then just try replacing the original hash with the generated one and use the new password to log in. It should work (I’ve tried it this way).

  5. Moinuddin Waheed

    Changing password by clicking lost or forget password and then getting an email is an easy step.
    Using phpmyadmin for changing password is a bit developer oriented.
    I have used while developing sites from local host by flywheel but I fear doing for the live server.
    Do we have the same encryption after changing password as it was before or it is simply the hard coded text that we typed in as password?

    • WPBeginner Support

      If you are using the phpMyAdmin method you would want to put in your password normally and in the function dropdown you would set it to MD5 to have the password be the text you placed in the field.

      Admin

  6. Laxman

    Thank You very much…

    • WPBeginner Support

      You’re welcome :)

      Admin

  7. Branson

    Hi,

    I have just tried to reset my password with the MD5 method you suggested, but it didn’t work. I tried like 5 times and every time I tried to login into my website it would say incorrect password. What’s wrong?

    Thanks in advance.

    • WPBeginner Support

      If you have more than one WordPress installation on your hosting provider, ensure you are editing the correct database and ensure you apply the changes in the database for the most common reasons.

      Admin

  8. Stem

    Hello,

    I tried to reset my password using this method, but it’s showing this error “Error: The username user is not registered on this site. If you are unsure of your username, try your email address instead.”

    • WPBeginner Support

      That would normally mean your username is not on the site, you would want to ensure are logging in with the correct username or email address. The steps in this article should not affect your username or email.

      Admin

  9. Brett

    MD5 pushed it through. Thank you!

    • WPBeginner Support

      You’re welcome! Glad our guide was helpful :)

      Admin

  10. blossominglotus

    This method is not working for me. I even tried updating the password using raw SQL. It does change the password but I still cannot log in with the new password.

    • WPBeginner Support

      If this method is not working then we would recommend reaching out to your hosting provider and/or checking that you are editing the correct database on your hosting provider if you have more than one database.

      Admin

  11. Guillaume Frasca

    Hi, I followed your advice, but when I click on Go, I have the #1142 error message “UPDATE command denied to user ‘scienceisa431’@’@XX.XX.XX.X’ for table ‘mod597_users’
    Is there a way around this?

    • WPBeginner Support

      Your user may not have proper access on your hosting environment, if you reach out to your hosting provider they should be able to assist!

      Admin

  12. James Wallis

    Saved my skin with this–thank you so much.

    • WPBeginner Support

      Glad our guide was helpful!

      Admin

  13. Joseph

    Thanks for the good job
    I was able to locate and change my WordPress details with this tutorial

    • WPBeginner Support

      Glad our guide could help!

      Admin

  14. Randy

    I tried this and I got a white screen on my website. Please help

  15. Syed Waris

    Thank you so much.
    The article was very helpful for me.

    • WPBeginner Support

      Glad our guide was helpful!

      Admin

  16. NS

    Thanks! The “MD5” encryption step is what I was missing when I tried to reset. Then I came across your article and tried it and it worked! You just saved me hours and hours of time and a potentially angry client.

  17. aisha

    I tried this but didn’t work. Need help

    • WPBeginner Support

      If your changes are not staying, you would likely want to check with your hosting provider to ensure you’re not running into a security tool blocking your change. Another common issue would be if you have a staging site or an old database for a previous site so you would want to ensure you are changing the information for your correct site.

      Admin

  18. Altuğ G.

    This didn’t work for me :(

    • WPBeginner Support

      It would depend on what part didn’t work. The most common reasons would be if you did not save your changes or did not convert to MD5

      Admin

  19. Pakodev

    Thanks! It worked.

    • WPBeginner Support

      Glad our guide was able to help :)

      Admin

  20. Arsène

    It worked, thank you very much

    • WPBeginner Support

      Glad our guide could help :)

      Admin

  21. Aikya Dasgupta

    Thank you very much. This worked for me and I am now able to access my WordPress dashboard.

    • WPBeginner Support

      Glad our guide was helpful :)

      Admin

  22. John

    Perfect – saved me from a big issue.. thanks! Now, about getting those WP system emails working again…………….!

  23. Tayyab Shafique

    it was really helpful.
    Thanks :)

    • WPBeginner Support

      You’re welcome :)

      Admin

  24. Saad

    thanks a lot for saving my day …

    • WPBeginner Support

      You’re welcome :)

      Admin

  25. Anita

    Thank you, this saved me a headache :D

    • WPBeginner Support

      Glad our guide was helpful :)

      Admin

  26. Elias

    You’re a genius. Thank you

    • WPBeginner Support

      You’re welcome :)

      Admin

  27. jackie

    REALLY helpful. I’ve been struggling for weeks and now i can finally log in again! thanks a lot!

    • WPBeginner Support

      You’re welcome, glad our guide was helpful :)

      Admin

  28. Robin B

    So, so helpful. Thanks so much!

    • WPBeginner Support

      You’re welcome :)

      Admin

  29. Chidi Ejikeugwu

    why did you recommend to use MD5 when changing password?

    • WPBeginner Support

      That is what WordPress uses for passwords by default

      Admin

  30. japsimran singh

    Thank You Buddy.
    It really helped.

    • WPBeginner Support

      Glad our article could help :)

      Admin

  31. banson

    Thank you problem Solved

    • WPBeginner Support

      Glad our guide was helpful :)

      Admin

  32. Nthtuko Mbhele

    Thank you so much, thank you, thank you

    • WPBeginner Support

      You’re welcome, glad our guide was helpful :)

      Admin

  33. Premier

    Thank you! Solved my problem!

    • WPBeginner Support

      Glad our guide was able to help :)

      Admin

  34. Yann

    Worked wonders, thanks!

    • WPBeginner Support

      You’re welcome, glad our guide was able to help :)

      Admin

  35. Marco

    thank you!!!!!!

    • WPBeginner Support

      You’re welcome :)

      Admin

  36. Anand

    Did not work for me. :(

    • WPBeginner Support

      You may want to ensure you set the password to MD5 and that you are editing the correct user file if you have multiple WordPress sites or users

      Admin

  37. Pranoy

    very very thank you
    big headache solved

    • WPBeginner Support

      Glad our guide could be helpful :)

      Admin

  38. Urs Keller

    You did super great job. I could reset my pw. Thank you!

    • WPBeginner Support

      You’re welcome, glad we could help :)

      Admin

  39. Taylor

    I have followed these steps and the password was generated however, whenever I put in the password it still says it is incorrect.

    Any help you can provide ?

    • WPBeginner Support

      You would want to double-check that you encrypted the password using MD5 as the most common reason

      Admin

  40. Cattel

    Direct explanation! Thanks!

    • WPBeginner Support

      You’re welcome :)

      Admin

  41. Hazel Pan

    Thank you for this noob-friendly guide! I was able to understand how to fix my issue right away. It also helped that I had awesome support from my hosting provider, Namecheap.

    • WPBeginner Support

      Glad our guide could be helpful :)

      Admin

  42. Terry

    Thank you so much for this article, it helped.

    • WPBeginner Support

      Glad our article was helpful :)

      Admin

  43. Umar Gondal

    May Allah bless you with eman. This article helped me to reset password of my website. Very informative article

    • WPBeginner Support

      Glad our article could be helpful :)

      Admin

  44. Ajit Kumar

    The email could not be sent. Possible reason: your host may have disabled the mail() function.

    error shows

    • WPBeginner Support

      If you have that error on your site, you would want to start by reaching out to your hosting provider.

      Admin

  45. George

    Great article, I can see how this “can” work, but didn’t work for us either!!!!! We have access to the registrar, access to the domain and web hosting, full access to file manager, phpMyAdmin and the Installatron.

    Followed your instructions to the T, didn’t work. We even changed the email in the email field. Its like the script didn’t update.

    • WPBeginner Support

      If this method didn’t work then you likely need to reach out to your hosting provider and your host should be able to assist in fixing this issue.

      Admin

  46. Donny

    Really helpful, thanks a lot.

    • WPBeginner Support

      You’re welcome :)

      Admin

  47. zorax

    Thank you, it was really helpful!

    • WPBeginner Support

      You’re welcome :)

      Admin

  48. Van

    This didn’t work for me. I’ve tried changing my password via my profile in WP Admin and using this technique; neither worked. WordPress 5 bug?

    • WPBeginner Support

      You may want to clear your cache on your site and browser and check with your hosting provider that they are not preventing changes to your site’s database.

      Admin

  49. Ammar Falak

    It didn’t work for us. I am still locked out of my WordPress Account. Please help!

    • WPBeginner Support

      If this method does not work, if you reach out to your hosting provider they should be able to help you log back into your site.

      Admin

  50. Sanyukta Khot

    Thank you for a very useful article! Saved me a lot of time!

    • WPBeginner Support

      You’re welcome :)

      Admin

  51. Dee

    Awesome!! Thanks so much for the valuable information.
    Please continue to help us newbies…

    • WPBeginner Support

      Glad our articles are helpful :)

      Admin

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.