How to reset your Wordpress password
Help! I’ve forgotten my Wordpress password!
Ever been there? Wordpress has a built in method to email you a new password, but what happens if it’s been so long that you don’t have access to the email address any longer? Or if you have too many email addresses and can’t remember what address you used when you setup your blog?
For this you’ll have to have access to the MySQL database that Wordpress is using to store the site information. I’ll show you how to reset the password in phpMyAdmin and in the MySQL shell. Other database administration programs should be similar since it’s really the query that matters.
phpMyAdmin
If you have access to your database through phpMyAdmin it’s pretty easy to reset your password. Login to phpMyAdmin and select the Wordpress database from the dropdown in the left frame. One of the tables will be wp_users, although the wp_ part may be different if you set up a different table prefix during installation. Click on that table.

This will bring up the structure of the database in the right frame. Click on the Browse tab.

This will bring up a list of the first 30 users in your database. The user with ID number 1 should be the admin user and probably the one you’re trying to reset. You’ll notice that the field user_pass contains a 32 character string of gibberish. It’s actually a md5 hash of the password. Unfortunately, or fortunately from a security standpoint, there isn’t an easy way to get the password back out of the hash so you have to just reset it.
Click on the small pencil icon to the left of the user you’re editing.
![]()
You should now see a list of all the fields. The third line down is user_pass. On that line under function select MD5 and enter your new password in the Value field. Don’t worry that it won’t be hashed like the previous password. Selecting the MD5 function will take care of that when you save.

Once your new password is entered click on Go and the record will be saved. You should now be able to login using the new password.
MySQL Shell
Resetting the password in the MySQL shell is a little more difficult, although quicker, only because you have to know the id of the user you’re trying to reset. If you’re resetting the password for the first user you created during installation this id should be 1.
Login to your MySQL shell and select the database your Wordpress installation is using.

Run the following query, replacing wp_users if you need to with the correct prefix and ‘new password’ with whatever password you’ll be using.

And now would be a good time to mention…
that you should keep track of your password in a safe place so that you don’t have to jump through these hoops again. Personally I like KeyRing on my Palm Pilot.
Question, Comments...
Do you have more questions. Please either leave a comment below or join us in our new forum.
Thanx for putting this up.