rahulinfo.com: Some Helps, some Tips, some Musing

Recover admin access to wordpress

Ok first the reality:

You are the owner of a great well designed website developed using Wordpress.You have the admin access so that you may regularly update/sanitize your site.Admin access requires you to enter a username and password to enter the private world of administration.But on a fine sunny morning you discover that you can not login to admin. You have tried all the combination of username and password that you can possibly think of but none seems to be working. Fact is your memory has failed you on the right username and password combination.
To add to the agony there is never a mail me my password button on the admin panel so that you can get an email telling you what your password is.

The solution:
Well we do have a solution, better then tearing your hair -no use never – wherein you can regain your admin access albeit your memory have not played havoc on you and you have forgotten a lot of thing other then your admin pass.
The process is simple enough just follow these guidelines.

  1. Being the owner of the site you have access to wordpress database created in MySql.yes wordpress keeps almost all its stuff in the wordpress database.
  2. Start Phpmyadmin -quite a tool for handling mysql – in your cpanel or whatever panel your webhost have provided you.Now login to your database using username and password.OK if your memory has played real havoc with you and you can not remember MySql login details just browse to your site directory and start looking for file wp-config.php.This is the file where wordpress has kept or noted down your database username and password and also your database name.
  3. Now log in to mysql database server using these credential.
  4. Once you have logged browse a table called users which might be just user or wp_users or somefancyprefix_user.
  5. On browsing this table user_login will tell you what would be the admin’s user name.
  6. user_pass will tell you what your password is – but the password is encrypted with MD5 – so what you have here is a 32char long string which is MD5 of your password.
  7. Select a word that you think you can remeber well.Use md5 hash tool or there are some online sites that would hash your string/word to md5.Using these get md5 hash of selected word .
  8. In phpadmin edit the record in the user table for user_login as admin/rooter/or whatever your admin user name is and replace the user_pass field value with the md5 hash you have.
  9. Now you can log in to the admin section of your website with the word you have selected.
  10. Once logged in you have the choice either to keep this as your password for ever or change it with any word that you feel you are comfortable with.

Hope you find this tip as intresting and informative and of use.

You can follow any responses to this entry through the RSS 2.0 feed.