How To Reset Your WordPress Password Using phpMyAdmin

How To Reset Your WordPress Password Using phpMyAdmin

Post Series: WordPress Password Recovery
  1. 1.How To Reset Your WordPress Password Using phpMyAdmin
  2. 2.How to Reset WordPress Password Using MySQL Command Prompt

One of the primary reasons why companies like LastPass thrive is that we humans aren’t designed to remember random combinations of alphanumeric characters – which are essentially strong passwords. What happens if you’ve setup a client’s WordPress site, customized the theme, installed the plugins, added the content – everything in one go and then go out for a beer – all the while, 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!

Sourav

Sourav

Contributor at WPExplorer
Sourav is a WordPress enthusiast, an avid gamer and a sitcom collector. His playlists include heavy metal, electronic, and new-age tracks. When he's not online, he's spending quality time with his friends and family. You can follow him on Twitter.
Sourav
This article has 10 comments
  1. Moogle Stiltzkin (@mooglestiltzkin) says:

    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

  2. Srini says:

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

  3. Hassan says:

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

  4. Veronica says:

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

  5. Ashri says:

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

  6. News World Inside says:

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

Leave a Reply