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:
If you’re on a shared hosting plan and have cPanel, login to cPanel and select phpMyAdmin found under Databases.
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.
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:
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.
Look for the row named user_pass (usually the 3rd one) and make the following changes:
- Under the Function field, set it to MD5.
- Under the Value field, enter your new password – let’s say mikerotch.
- Click on Save Changes.
Now you have successfully changed your WordPress password to mikerotch.
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!