Reset your self-hosted WordPress site admin password


Earlier this year I had installed WordPress on my laptop to do some testing. I ended up abandoning the project due to work load at school. I recently tried to access the WordPress install again only to realize that I couldn’t remember the password. I could not use the built in password recovery because it was not a live site and I had set a fake email address for the admin account. After all it was a test setup.

I did some digging around a found an easy way to get the password reset to something else.

Step 1: Access WordPress Users Table

  1. Access phpMyAdmin console by browsing to “servername or ip address”/phpmyadmin
  2. Once loaded the list of databases on you server is listed. Press the ‘+‘ next to the database for your wordpress installation to view tables.
  3. Locate and select the “wp_users” table

    mySQL WordPress Tables

    mySQL WordPress Tables

  4. You will now be presented with the below screen in the right panel

    Wordpress User Table Data

    WordPress User Table Data

Step 2: Generate md5 Hash

You will now need to replace the lost password with another by generating an md5 hash for that password and then inserting it in the wp_users table

Visit http://www.miraclesalad.com/webtools/md5.php and enter the new desired password in the box provided. The hash code will be generated as you type the new password.

md5 Hash Generator

md5 Hash Generator

Step 3: Edit User table

  1. Copy the md5 hash code generated by the website
  2. Return to the wp_users table view and replace the current hash for user_pass by double clicking on the current hash to enter edit mode, delete the contents and pasting the new hash.
  3. Follow the same process and paste the hash under user_activation_key column.

Step 4: Login

Now you will be able to login with your new password.

Advertisements

Posted on September 19, 2014, in How-Tos, Tech and tagged , , , , , , . Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: