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
Elegant Themes
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:

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 lovers 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. Toyin says:

    Thanks for this article.Simple guide,was able to change my password through myphp.

  2. harish chand says:

    Great thanks

  3. MITESH MISTRI says:

    Hey… Nice post and this idea really works. Thanks.

  4. Adeel Ahmed says:

    Thanks a lot. I had the problem but it has been solved . Otherwise I felt miserable about my wordpress login password being stolen

  5. Jedediah says:

    Odd, I did this correctly and it’s still not letting me in.

  6. venukanth says:

    really thanke ..most use full

  7. Hasan says:

    Thanks, it’s really helpful and great !!

  8. Razzaq says:

    another simple method for get the password, after edit the record change the email address. On wp-admin login screen, click on forget password. You will get the new link of make a new password.

  9. Harsh says:

    Thanks a lot friend, very helpful post :)

  10. Asaf Fialkov says:

    Many thanks! Worked like a charm

  11. Mike says:

    Fantastic, you are geniuses!

  12. Ken says:

    Thanks Man, your a lifesaver

  13. Dave says:

    Perfect. Thanks for posting.

  14. VaLAngel says:

    Great, great, great! 1 Billion Thanks…

  15. Clinton says:

    Thank you!

  16. Al says:

    Thanks buddy, i used to do lots of stuff on my wordress blog few years ago but now i kind of forget how to do it. Your blog post refreshed my memory…thanks again

  17. Jarrii says:

    Thank you so much :-) It works perfectly ;-)

  18. Hilda says:

    worked perfectly, thank you so much!

  19. Dan says:

    Followed your very clear steps. Worked like a charm. THANK YOU!

  20. Rose says:

    Thank you so much! I couldn’t get into my new install of Word Press and of course it is the weekend. This is so well written that I was able to reset the admin password in one try.

  21. Ewan says:

    How is this discussion affected by the salts in the wp-config file? Do we need to combine those when creating a new password?

  22. Marty says:

    Over the last few weeks, I’ve had the pleasure of dealing with clients that didn’t have a reputable developer/designer and left them high and dry with little to no access of their OWN site, noway of re-setting the password through the recovery email, this guide WOULD have been great 2 weeks ago, but I’m sure I’ll be using it in the near future…

    cheers Syed..

  23. Karl Craig-West says:

    Perfect, worked a treat.
    Many thanks indeed.

  24. Harpa says:

    Thank you so much

  25. Dotty says:

    Thanks so much – this really helped.

  26. Luis says:

    What a lifesaver post! Thanks!

  27. Ton says:

    Thank you so very much!

  28. Andrea says:

    ok, I have done step by step everything you have suggested and is not working……..what can I do?

  29. BK says:

    This was a life save. thanks

  30. vking says:

    thanks you man :D it’s work!

  31. Muhammad Abdul Qadoos says:

    why not :) we change email address and ask wp to resend password reset email :)

    • Editorial Staff says:

      You can do that as well. Then go click on reset button. Wait for the email to come. Then reset your password. Seems like a bit longer process, but to each their own.

      • subbareddy says:

        this helps very much when you are in local system . Password reset doesnt work some times in local server .

        I helped me a lot today

    • Benjamin says:

      Some hosts have the mail() function turned off and are unable to send emails via php.

  32. stevelockridge says:

    Fabulous!!! Thank you!!! My client contacted me because their previous designer vanished and left them with NO login information for ANYTHING. This saved us all a lot of headaches.

  33. rradvani says:

    great saved me :) !!! thanks wpbeginner!!

  34. sharphue says:

    See that user_email field in the screenshot above? Just change the value to an e-mail address that you have access to. On the WP-Admin login screen, click “lost your password?” and type in the same e-mail address and you will receive a reset password link that will be easier than messing with MD5 hashing.

  35. Oluniyi D. Ajao says:

    Thank you very much. You saved me having to re-install a WordPress installation.

  36. W^L+ says:

    There has been some talk about web applications moving to a hash of the password + another string, to make it harder for bad guys to get in. Do you think this is coming to WP soon? (I think Joomla and Drupal are already doing this.)

    • Editorial Staff says:

      WordPress already has that built-in. You just have to add your own security keys in your wp-config.php file. Open it and you will see the place for it and a link where you can get your security keys from.

  37. Jeff says:

    Under the functions column, if you choose MD5, MySQl will automatically encrypt your password in MD5. Simply type your plaintext password in the main box.

    This is a little easier than using other sites.

  38. kusanagi says:

    very helpful, thanks.

  39. Utkarsh says:

    You can also enter the password in plain text, and select MD5 from the function dropdown. It’ll automatically save the MD5 hash of the password in the database.

  40. Jaspal says:

    Thnx .. that’s a great tip .. it will be very helpful for me

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.