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

    Hello,

    Added Https to all pages, says unsafe, attempt to login and no luck, hit forgot password system reverts to Mojo Page…changed password per instructions above still no luck…any ideas how to get https off wordpress?

  2. Tess

    OK, I have followed these instructions and successfully changed my admin password in the database and I still get a failed login message when I login with it. I need help gaining access to my site, please.

  3. Sandra

    Thank you so much! These instructions helped me reset my WP username and password

  4. neotanvir

    How can I transfer MD5 to normal text

  5. Patty Ayers

    Thank you! Worked like a charm.

  6. Edwin Schichter

    Very simpel…. just change and save the users emailadress into something familiar in the database, click on forgot password in the wordpress login page :-)

    • Patty Ayers

      Yes, but only if you already have access to the back end.

  7. Andrew

    Awesome thanks so much for taking the time to write this just recovered by site in 60 seconds – as a newbie rely on help online :)))

  8. Yana

    Thanks mate, you made my day =)

  9. Kinfe Weldu

    thank you.this solved my problem.

  10. sarah

    thanks very helpful :)

  11. Toyin

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

  12. harish chand

    Great thanks

  13. MITESH MISTRI

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

  14. Adeel Ahmed

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

  15. Jedediah

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

  16. venukanth

    really thanke ..most use full

  17. Hasan

    Thanks, it’s really helpful and great !!

  18. Razzaq

    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.

  19. Harsh

    Thanks a lot friend, very helpful post :)

  20. Asaf Fialkov

    Many thanks! Worked like a charm

  21. Mike

    Fantastic, you are geniuses!

  22. Ken

    Thanks Man, your a lifesaver

  23. Dave

    Perfect. Thanks for posting.

  24. VaLAngel

    Great, great, great! 1 Billion Thanks…

  25. Clinton

    Thank you!

  26. Al

    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

  27. Jarrii

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

  28. Hilda

    worked perfectly, thank you so much!

  29. Dan

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

  30. Rose

    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.

  31. Ewan

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

  32. Marty

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

  33. Karl Craig-West

    Perfect, worked a treat.
    Many thanks indeed.

  34. Harpa

    Thank you so much

  35. Dotty

    Thanks so much – this really helped.

  36. Luis

    What a lifesaver post! Thanks!

  37. Ton

    Thank you so very much!

  38. Andrea

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

  39. BK

    This was a life save. thanks

  40. vking

    thanks you man :D it’s work!

  41. Muhammad Abdul Qadoos

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

    • Editorial Staff

      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.

      Admin

      • subbareddy

        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

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

  42. stevelockridge

    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.

  43. rradvani

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

  44. sharphue

    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.

  45. Oluniyi D. Ajao

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

  46. W^L+

    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

      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.

      Admin

  47. Jeff

    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.

  48. Utkarsh

    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.

  49. Jaspal

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

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.