Changing a forgotten WordPress password



May 11th, 2006 by Kat Kingsley-Hughes

What do you do if you have a WordPress blog and you’ve forgotten the password? (This is quite common if you’ve ever clicked the ‘Remember me’ option some time back in the dim and distant past. This works great until you clean out your browser’s cache taking your cookies and your password along with it!)

First of all, don’t Panic! This short post will help you get back into your WordPress blog and get you back blogging.

To make these changes I'm going to assume that you have access to phpMyAdmin and are comfortable using it (making a wrong change here can trash your entire WordPress database!  You have been warned!).

  1. Log into phpMyAdmin.
  2. Click on the Databases link and then click on the database you want to edit from the list that appears.
  3. You will now be faced with a list of tables in that database.  From this point on I'm assuming that you used the default "wp_" prefix for your WordPress tables.
  4. In the right-hand pane scroll down to "wp_users" and click on the "Browse" icon (if you hover over the icons you'll notice a tooltip appear).
    WordPress password reset
  5. You'll now see the list of users for the site.  The Admin will be the user with the ID number 1.  Assuming that’s you, click on the "Edit" icon next to this to edit it (again, hover long enough and you'll see a tooltip appear).
    WordPress password reset
  6. You'll now see all the details associated with the Admin user.  The field that you are interested in is labeled "user_pass".  This field contains the password that have been encoded using the MD5 one-way hash which turns the password that was used into a string that is 32 alphanumeric characters long.  Don't bother trying to reverse the hash back to the password!  Consider the password lost!
  7. Into the "user_pass" field, type in your new password. 
    (REMEMBER THIS PASSWORD!!! )
  8. Now your new password will be not stored in the database as the plain text password you just typed in (which would make it easy to steal) but rather as an MD5 hash of the password. So the next important step is to convert your password.  Fortunately, phpMyAdmin offers a really easy way to do this.  
    From the "Function" field select "MD5".
    WordPress password reset
  9. Once you've made that change, scroll to the bottom of the screen and click "Go".  The password will be hashed using MD5 and stored in the database.
  10. Log out of phpMyAdmin.
  11. One final thing.  If you’re using WordPress 2.0 or higher you’ll need to delete the WordPress cache file.  Using your FTP program (or cPanel file manager) delete all the contents of the /wp-content/cache folder.
  12. Now log into your WordPress blog using the new password and start blogging again!

This entry was posted on Thursday, May 11th, 2006 at 4:27 pm and is filed under Wordpress. Both comments and pings are currently closed.

Comments are closed.

%d bloggers like this: