Beginner's Guide for WordPress / Start your WordPress Blog in minutes

How to Reset a WordPress Password from phpMyAdmin

Do you want to reset your WordPress password using phpMyAdmin?

If you are unable to reset your WordPress password, then there is a way to reset it directly in your WordPress database using phpMyAdmin.

In this article, we will show you how to easily reset a WordPress password from phpMyAdmin.

How to Reset a WordPress Password from phpMyAdmin

Why Reset 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 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 login 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.

Click the phpMyAdmin Icon

This will launch the phpMyAdmin app where you need to select your WordPress database.

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.

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 check out our list of must have plugins.

If you liked this guide, then please consider subscribing 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.

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

262 CommentsLeave a Reply

  1. I have fighting with passwords for hours. Then I found this guide and I was home free. Thank you very much.

  2. Perfect tips and was very helpful in getting my client’s domains password changed. I was struggling and that “MD5” tag thing was actually missing. Thanks so much. This is the best place for any WordPress queries.

  3. I am locked out of WordPress, my site is down. I can go into my c-panel. If I change the password to an encrypted password, do I now copy that and use it to log in? I really don’t get it? It is encrypted isn’t it? What do I now use to log into my WordPress? Do I use the log in name and email that is there in the c-panel?
    Thanks

    • Susan, the MD5 is like a secret recipe where one ingredient is missing. Let’s say we are pen pals and we are going to meet for the very first time. Since I have never seen you, I need a way to know that it is really you. One way to do this if you can send me a piece of homemade cake and a list of all but one secret ingredient. When we first meet, you will finally tell me what the secret ingredient is, and then I will bake my own cake with the exact recipe. If the cake I makes is exactly same as the cake you sent me, then I know you are really my pen pal. The MD5 is the completed cake, and the plain password you came up with is the secret ingredient. When you send the password to WordPress, it will use your secrete password ingredient to see if it can bake its own MD5 cake. When you log into WP, use the plain text password. Your WP user name is usually different from your cPanel name. If you forgot your user name, it will be listed as “user_login” in the database.

  4. Hello there,

    I seem to be getting the username is invalid commad everytime I try to login.
    But the username and password is correct. It seemed like I might have created a different user name the first time I got locked out of my account. Or I forgot to renew my domain. I really can’t remember.

    When I use a different username, I’m able to log in into WP dashboard and do theme changes but it is not reflecting in my current website.

    The current dashboard does not have any of my old post or images.

    I logged into to my cpanel and checked under the myphpadmin, there is 2 database. One of it contain the old posts and images. I tried the above method using the MD5, I’m still unable to acess the old user id and my old post.

    I suspect the current active site is configured at the old database.

    Another question, when I reset the password through MD5, do I copy this same new rest password that was generated in the phpadmin screen ( the long one) and paste it in the wp login screen. I tried it. It didn’t work.

    Please help.

  5. Sir I was changed my wordpress admin password in the same way but now it my dashboard is not opening it is showing a wrong password but I have changed it. Sir please help me………

  6. An easier way is to use phpadmin and just change the email address to your current email and then go to regular login and click on “Forgot Password” and reset from email link. No need to worry about MP5 and all that stuff.

  7. I wish people who make training videos would slow down they are always rushing through it as if they have a train to catch, So slow down and you will have great training videos…

  8. I don´t know what kind of hash it is, but it´s not default form of MD5. WordPress password hasher does the job fine.

  9. Thank you very much, Syed and team WPBeginner.
    My site was put in maintenance mode and hence password reset option did not work.
    I changed the password as you suggested and everything is back to normal.
    Much thanks for the awesome content. :)

  10. Awesome! Helped me reset my password when I kept getting the “Host disabled the mail () function” error.

  11. Hi! I’m s using mamp as local host, and i’m having some troubles with it: I can’t recover my wordpress password by setting a new one on phpMyadmin. It shows that the password row has been updated to the new one I chose, but it is not recognized by wordpress.org when i try to log in. Can’t figure out what may be the problem. I’m giving up on hosting my site on MAMP. I’ve seen that I can create a new database with cPanel, since I’m paying for hosting service from namecheap. What do you suggest for starting a new project from zero? Thanks a lot!

  12. Unfortunately this isn’t working for me. I’m doing exactly what your asking, but when I made a new password using the MD5 Hash and copy and paste that new password in the field > save by hitting Go > then go to refresh my Website admin log in page, I enter the new password and still tells me I’ve entered the wrong password??? I’ve tried email recovery but never get sent an email… So painful!

    Any idea’s?

      • You don’t use the hashed password. Let’s say you set your new password to “letmeinalready,” choose MD5, and save it. You wouldn’t use that hashed password to get in – you’d use “letmeinalready”

      • Same problem here. I have followed all instructions to a T and it’s just not working. Can my web host chat help me? Me web developer has disappeared with this information.

        • Yes, if you reach out to your hosting provider they should have access to update your password for you

  13. wow, this is way too fast a video clip for me. Just can’t follow any. Didn’t even where to start.

  14. Do you have to be logged into your admin to start with? I can’t even log in to do any of the above!!!

    • awesome, very old post, but still being read and replied to!

      I used Duplicator to copy a one-page WP-site to localhost (XAMPP). Made a new database as instructed, password and everything.

      When I try to enter local password (or is it the database password?), screen reverts to site published on cloud host.

      Localhost DB has two entries: for Duplicator (prefix 2ecxx_) and what I thought was local copy (prefix wp_). But the ‘local’ DB _wp entries are actually referring to the cloud hosting environment.

      Tried to change wp_user username en PW (MD5), but does not work

      Changed siteurl in _wp_options to localhost, does not help

      When I use 2eczz_users username and PW, page also moves back to site published in the cloud

  15. Thanks A lot, VERY INFORMATIVE ARTICLE, i was up and down last two days. . you saved me. Thanks again

  16. Very informative article, i was stuck at database name, finally found with the help of this article.

  17. Thanks so much. I am NOT a programmer whatsoever and these instructions were easy enough for me to get. This was a lifesaver.

  18. The layout has changed a lot since this was posted- the admin tab or the browse tabs are nowhere to be seen..

  19. Lot of thanx guys. It has worked for me and was stranded on my website security but now am fine.
    The procedures are very user friendly hence easy to understand.
    God bless

  20. I did all those steps but I still cannot login into my wordpress wp-admin. Can you help me? Thanks.

  21. Why not use the md5 hash that is already there in phpMyAdmin? Just open the drop-down in the functions column. I will md5 hash your plain text password for you.

  22. Sir/Madam
    I am interested in becoming a professional web designer using the WordPress platform but don’t know where to start. Any advise thanks.

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.