Forgetting passwords is nothing new for us. Lets count how many passwords we need to remember – Email accounts, facebook, twitter, youtube, other social networking sites, Google Analytics, WordPress admin area and many more. It may happen that the strong password which you have set just the other day was too hard to remember and now you cannot login to WordPress. And to top it all, you are not getting the lost password email. Now what to do? Is there a way to reset WordPress password?
If you’re the admin of your site, then yes, you can reset your lost WordPress admin password using phpMyAdmin.
Reset WordPress Password via phpMyAdmin
- Login to cPanel (also known as web hosting control panel). If you don’t have access to cPanel, then you will need to contact your hosting company and get access to database. The URL for cPanel would be yoursite.com/cpanel (in most cases)
- Optional step: Before delving in editing database, its a good idea to backup database from cPanel. Click on Backups and then on next page, click on the database name where your WordPress resides. Download and save the database to your computer.
- Now that we’re armed with database backup, we can move forward. Go to Home of your cPanel and click on phpMyAdmin.
- Click on the WordPress database name from left side. If you have more than one database created, then you will need to click on the correct database name. In most cases, many people have only one database, so finding it won’t be that hard.
- Find wp_users table. Click on Browse button in front of this table and click on it (Refer screenshot below)
- Find the admin username for which you want to change the password, and click on edit button.
- So finally, we’re on the last step. You can see the old encrypted password in user_pass row. Yes, this is not readable at the moment. Select MD5 from functions drop down column. And in the Value field, type your new password and click on Go. This time, make sure that you remember it.
That’s done. Now you can login using your newly set password for this particular username. This is really useful in cases when you forget the password and are not getting the lost password email. Therefore we just changed the password from phpMyAdmin, by accessing the database username and changing its password directly. Go ahead and ensure that you follow the steps exactly as pointed out in this tutorial.
Note: Follow the above method with acute care. You really don’t want to mess up anything in phpMyAdmin.
Randy says
Funny I ran into this today just doing some idle browsing on Delicious.com, Saqib. A day earlier and I would have got more sleep last night.
Last night I was locked out of one of my WP installs. Had the password, it just would not work and no reset email ever arrived. Made for a restless night. Turns out my account had taken me back to one of my old passwords (a recent reset at my host maybe?). Got logged in this morning. Whew!.
Saved the article and will try it out on a test account. Knew there had to be a way to do this. Subconscious search? Lady Luck? Higher power? Who knows? Fortuitous in any case.
Thank you for laying it out so clearly.
Saqib says
Glad to know that this article has helped you.
fazal mayar says
thats a good trick saqib, i tend to forget my pw all the time and try to recover it by the default way