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
Follow WPBeginner on YouTube
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:

Video Tutorial

If you don’t like the video or need more instructions, then continue reading.

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 »
  • Bowen


    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?

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

  • Kinfe Weldu

    thank you.this solved my problem.

  • sarah

    thanks very helpful :)

  • Toyin

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

  • harish chand

    Great thanks


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

  • 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

  • Jedediah

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

  • venukanth

    really thanke ..most use full

  • Hasan

    Thanks, it’s really helpful and great !!

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

  • Harsh

    Thanks a lot friend, very helpful post :)

  • Asaf Fialkov

    Many thanks! Worked like a charm

  • Mike

    Fantastic, you are geniuses!

  • Ken

    Thanks Man, your a lifesaver

  • Dave

    Perfect. Thanks for posting.

  • VaLAngel

    Great, great, great! 1 Billion Thanks…

  • Clinton

    Thank you!

  • 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

  • Jarrii

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

  • Hilda

    worked perfectly, thank you so much!

  • Dan

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

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

  • 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?

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

  • Karl Craig-West

    Perfect, worked a treat.
    Many thanks indeed.

  • Harpa

    Thank you so much

  • Dotty

    Thanks so much – this really helped.

  • Luis

    What a lifesaver post! Thanks!

  • Ton

    Thank you so very much!

  • Andrea

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

  • BK

    This was a life save. thanks

  • vking

    thanks you man :D it’s work!

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

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

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

  • rradvani

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

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

  • Oluniyi D. Ajao

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

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

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

  • kusanagi

    very helpful, thanks.

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

  • Jaspal

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