Skip to main content
Easily create better & faster websites with the Total WordPress Theme Learn More
(opens a new tab)

How To Reset Your WordPress Password Using phpMyAdmin

One of the primary reasons why companies like LastPass thrive is that we humans aren’t designed to remember random combinations of alphanumeric characters (aka strong passwords). Sometimes when we forget them, we need to reset our passwords manually.

What happens if you’ve setup a client’s WordPress site, customized the theme, installed plugins, added content – everything in one go and then go out for a beer? Meanwhile, forgetting what password you set for the default user? Next morning, you’re finalizing the project and when you’re about to type the password, it dawns upon you – you have no freaking idea what it is!

In kill-me-now moments like these, there’s a quick healing potion. That’s what this post is all about.

I’m going to divide WordPress password recovery into two parts:

(a) recovering it using phpMyAdmin (if you’re on localhost using WAMP/XAMPP/MAMP)

(b) recovering the password using MySQL (if phpMyAdmin isn’t installed on your server. Part (b) will be present in the next post in this series.

Resetting Your WordPress Admin Password Using phpMyAdmin

First off, it’s launching phpMyAdmin that’s the tricky part. If you’re using WAMP or its variants, simply click on the icon on the taskbar and select phpMyAdmin as shown below:

phpMyAdmin from WAMP

If you’re on a shared hosting plan and have cPanel, login to cPanel and select phpMyAdmin found under Databases.

phpMyAdmin from cPanel

Once you’re inside phpMyAdmin, select the database that you’re using for your WordPress installation. In our tutorial, let us assume the database to be genesis_wp.

Select Database from phpMyAdmin 2

Look for a table entry called wp_users and select it. In most scenarios this should be the case. However, if you’re a security enthusiast, then you might have used a different prefix during the WordPress installation. The default prefix is wp_ hence the table entry wp_users. However, if your prefix was say ptbktwp_ then your user table entry would be ptbktwp_users.

The following two tables will help you understand:

Using the default prefix i.e. '_wp'
Using the default prefix i.e. ‘_wp’
Using a custom prefix: 'ptbktwp_'
Using a custom prefix: ‘ptbktwp_’

For simplicity, let us consider the default prefix – wp_users. Once the table is loaded, look for the username you had chosen while installing WordPress. In this tutorial I’m assuming it’s the default username – admin. Click on the little yellow pencil icon located next to the admin entry – that’s the edit icon.

Edit password under wp_users in phpMyAdmin

Look for the row named user_pass (usually the 3rd one) and make the following changes:

Reset WordPress Password in phpMyAdmin

  1. Under the Function field, set it to MD5.
  2. Under the Value field, enter your new password – let’s say mikerotch.
  3. Click on Save Changes.
Save Changes

Now you have successfully changed your WordPress password to mikerotch.

Settings changed

Awesome, now you’ve reset the WordPress admin password.
And, you owe me a beer. 😉

Reset Your WordPress Password Video Guide

I’ve prepared a video tutorial of the entire process. Hope you like it and would love to hear from you!

Have you ever been in a crazy forgotten password situation before? Let us know!

Recent in WordPress Tips
42 Comments
  1. Moogle Stiltzkin (@mooglestiltzkin) · 11 years ago

    thank you Mr Sourav K. Your excellent pictorial guide saved me big time. I had done all that except change the type to md5. Your guide helped me alot, thx again and kudos :} *respect

    • Reg Lee · 10 years ago

      Hi Mr Sourav K, I have tried your instructions as above to reset the admin password. However I am still met with the error message that “Invalid username or incorrect password” when I try to log in with the updated password. Please can you give me some help on what else I should look out for?

    • Timi Pudie · 10 years ago

      Honestly, If I could, I would have actually bought you that beer right now.. You are a life saver

      • Jimmy Malecki · 10 years ago

        I thought the same thing. You’re great at making it easy with a bit of fun. Thanks!

  2. Ahmad · 11 years ago

    thank you so much.

  3. Srini · 11 years ago

    You are awesome!!
    you have helped me solving it which i was trying hard on for half a day!!
    cool

  4. Hassan · 11 years ago

    Its really helpful for me, thank you very much for this superb step by step guide to change the localhost wordpress password.

  5. Ola · 11 years ago

    you really are awesome and a perfect tutor

  6. Thea Webster · 11 years ago

    Thanks, worked out perfectly.

  7. Veronica · 11 years ago

    Yay thanks! I normally use that emergency script, but seeing as FTP is also giving my problems this really helped.

  8. Ashri · 11 years ago

    It took awhile for me to figure it out due to slightlydifferent format and finding some passwords… but.. I FOUND IT! THANKS LOTS!!!! =)

  9. zamaan · 11 years ago

    helped thank you!!

  10. News World Inside · 11 years ago

    Pretty good instruction, specially the added video help a lot to do it for the beginner. Thanks

  11. Deva · 11 years ago

    Thank you!!!

  12. matias*berra · 11 years ago

    Thank you man! lets just say you have saved me a lot of trouble today 🙂

  13. Elcot Creative · 11 years ago

    Brilliant 🙂 🙂

  14. Chris · 11 years ago

    I owe you 24 cans of beer!!!!

    • AJ Clarke · 11 years ago

      Nice, we’ll send over our address to your email 😉

  15. Onwukwe Peter Omoke · 11 years ago

    Am so happy, it worked.

  16. PharmacyMBA · 11 years ago

    This tutorial is a lifesaver. I was able to recover my admin email using this method. I didnt have to use the method to change the password

  17. Luciana Cury · 11 years ago

    Thank you!!

  18. Max · 10 years ago

    All I can say is…. Thanks a Million! Phew!

  19. Gilmar Aleixo · 10 years ago

    Tks a lot, Sourav!

  20. Smriti Techno Logics · 10 years ago

    Thanks sir, Nice its working..

  21. adeemj · 10 years ago

    Great tutorial Saurav. Keep them coming – they are very informative and helpful especially to the newbies and even some seasoned bloggers.

    I won’t say that I know everything there is to know, but I like making new discoveries so I am constantly back stage going through my dashboard. It is by doing that I learned how to change admin name and even of late did a password reset. Everything comes with practice.

    Thanks for sharing… Have a great day….

  22. harrocarram · 10 years ago

    Duuuuuude.
    You rock.
    Lekker!

    If we ever meet, a beer it is.

  23. Alan · 10 years ago

    Nice one!!! Saved me losing my mind

  24. Francisco J Gallardo Popp · 10 years ago

    Even easier, change the mail to one you’ve access, and then proceed with recover form…

  25. aditya bisht · 10 years ago

    Hey thnx sir I don’t know how to change wordpress password now I can change my self thnx sir .??

  26. Beata · 10 years ago

    Thx man! You save my life! 🙂

  27. ASR · 10 years ago

    Hi,
    I tried this tutorial but I am still getting the error. Every procedure and step is correct. Why is that?
    Please help me.

    • AJ Clarke · 10 years ago

      You may want to contact your webhost for some assistance or hire a professional developer. There isn’t any reason you would still get an error if you modified the password via the database.

  28. Barry Edwards · 10 years ago

    This was a very handy quick fix after my multi site migration. Very clear. Thanks.

  29. jagmohan singh negi · 9 years ago

    i just tried to reset password via phpMyAdmin and its working.thanks for your valuable information.

  30. shaynel ahmed · 9 years ago

    absolutely a lifesaver!!! I am not very IT proficient – if I can do it – ANYONE can – i owe you a CRATE full of beers!!!

  31. taucan62 · 9 years ago

    wp users is missing

  32. birthdayhdcard · 9 years ago

    Actually, I want to know that how can i know what is password. I have forget my password but I had saved my password in my browser so now when i put url of my wp-admin it automatically login. But I have forget my pass so how may i know my current password

  33. Intaj Mondal · 9 years ago

    Phpmyadmin is simple and works fine.

  34. ehsan · 9 years ago

    thanks its realy work

  35. Chahat Bajwa · 9 years ago

    thank you so much sir. Your article saved my website. Very well article and the explanation is awesome. thanks once again sir.

  36. jazanne · 9 years ago

    You da real MVP

  37. Nalini PhD Msis · 8 years ago

    Good fix. Thanks a ton.

Sorry, comments are now closed.