Friday, March 23, 2007

How To Recover Your Wordpress Login

Over the past few weeks, I've been fiddling with a lot of stuff on Wordpress. It seems like the mechanical stuff I've learned really helped me a lot in determining how to fix something. Recently I've stumbled upon a lot of problem regarding the access to the Wordpress login. One of them is the lost and forgotten username and password. If you handle or own a lot of your self hosted Wordpress blogs, you might come across this accessing difficulties once in a while and I have a solution for that.

To be able to recover your Wordpress login, here is two things you need to know before you even attempt to perform this recovering task:

  • You must have the master login to your webhosting or at least must be able to access phpMyAdmin.

  • You must know how to backup your Wordpress MySQL blog database.


If you don't know how to deal with the above list, try Google them or download WAMP, XAMPP or WOS and fiddle around with them on your Localhost before you proceed on your live blog. Okay, let's move on. Download your Wordpress MySQL database in .sql format (you can download it on whatever format you want but I like to stick with .sql). Use your favourite text editor. I use my Dreamweaver to do the job.

After you open the sql file, don't bother about reading all the mumbo jumbo codes unless you like to. Use your Search and Replace function and search for 'user_login'. This is very useful if your WP SQL file is big. I'll give you a peek of how the codes look like:

Peek inside your SQL raw data



As you can see, I've colour coded the values that is involved and how it is related. The code above is an example of a multi-user wordpress blog. If you only have one user, there will be only one user information. Once you know what to edit, get rid of those old password circled in red. Wordpress login uses MD5 to jumble the password so that it is not easily hacked. We now use md5 Hash Generator to get a new code for our new password.

Once we have replaced the new password generated by the md5 Hash Generator, it's now time to upload the database back to it's place. Make sure you have make a back up before you do this or else don't blame me if something goes wrong. Test your Wordpress blog and see if it runs okay or not. After you done that, try and access your Wordpress Admin area and if that doesn't work, maybe you've changed the wrong user login or keep on trying. There are a lot of other stuff you can do if you know how to edit your Wordpress MySQL database. I'll write about it when I'm in the mood. If you need help, place your questions on my comment box below and I'll see what I can help.

Further reading: Wordpress FAQ

2 comments:

tk2 said...

Nice guide.
I wonder, rather than replacing the md5 with new one, is it possible to crack the md5 hash [using rainbow tables and such] so we can get the old password?

Never had a chance to try it though.

Lesha said...

Somewhere I have seen ... And if on that very much.