How do I reset my Wordpress admin password?
You can reset your password autmoatically by going to http://www.yourdomain.com/wp-login.php?action=lostpassword and replacing yourdomain.com with your actual domain. If that steps fails or you no longer have access to the email address on file, you can set a new password by reading the following tutorial by Wordpress: http://codex.wordpress.org/Resetting_Your_Password
OR follow methods as under:
Resetting Your Password
In WordPress, there is more than one way to set your password. In normal circumstances, you can do it through the WordPress interface. If you forget your password, WordPress has a built in recovery mechanism that uses email.
But on some hosts, especially when email isn't working right, sometimes you have to take different steps to reset your password.
Here's a list of different ways to reset a password. Any one of them will work, and you only need one to succeed. Which method you will use depends on what type of access you still have to your website.
To Change Your Password
To change your password in current versions:
- In the Admin Panel menu, go to USERS
- Click on your username in the list to edit
- In the Edit User screen, scroll down to the New Password section and type in a new password in the two boxes provided. The strength box will show how good (strong) your password is.
- Click the UPDATE PROFILE button
- Your new password takes effect immediately.
Through the automatic emailer
If you know your username or the email account in your profile, you can use the "lost password" feature of WordPress.
- Go to your WordPress Login page (something like http://yoursite.com/wordpress/wp-login.php)
- Click on the Lost your password? link
- You will be taken to a page to put in some details. Enter your username or the email address on file for that account.
- Wait happily as your new password is emailed to you.
- Once you get your new password, login and change it to something you can remember on your profile page.
Through MySQL Command Line
- Get an MD5 hash of your password.
- Visit md5 Hash Generator, or...
- Create a key with Python. or...
- On Unix/Linux:
- Create file wp.txt with the new password in it (and *nothing* else)
- tr -d '\r\n' < wp.txt | md5sum | tr -d ' -'
- rm wp.txt
- On Mac OS X:
- Create file wp.txt with the new password in it (and *nothing* else), then enter either of the lines below
- md5 -q ./wp.txt; rm ./wp.txt (If you want the MD5 hash printed out)
- md5 -q ./wp.txt | pbcopy; rm ./wp.txt (If you want the MD5 hash copied to the clipboard)
- "mysql -u root -p" (log in to MySQL)
- enter your mysql password
- "use (name-of-database)" (select WordPress database)
- "show tables;" (you're looking for a table name with "users" at the end)
- "SELECT ID, user_login, user_pass FROM (name-of-table-you-found);" (this gives you an idea of what's going on inside)
- "UPDATE (name-of-table-you-found) SET user_pass="(MD5-string-you-made)" WHERE ID = (id#-of-account-you-are-reseting-password-for);" (actually changes the password)
- "SELECT ID, user_login, user_pass FROM (name-of-table-you-found);" (confirm that it was changed)
- (type Control-D, to exit mysql client)
Note if you have a recent version of MySQL (version 5.x?) you can have MySQL compute the MD5 hash for you.
- Skip step 1. above.
- Do the following for step 7. instead.
- "UPDATE (name-of-table-you-found) SET user_pass = MD5('(new-password)') WHERE ID = (id#-of-account-you-are-reseting-password-for);" (actually changes the password)
Note that even if the passwords are salted, meaning they look like $P$BLDJMdyBwegaCLE0GeDiGtC/mqXLzB0, you can still replace the password with an MD5 hash, and WordPress will let you log in.
This article is for those who have phpMyAdmin access to their database. Note: use phpMyAdmin at your own risk. If you doubt your ability to use it, seek further advice. WordPress is not responsible for loss of data.
Begin by logging into phpMyAdmin and clicking databases.
- A list of databases will appear. Click your WordPress database.
- All the tables in your database will appear. If not, click Structure.
- Look for wp_users in the Table column.
- Click on the icon for browse.
- Locate your Username under user_login
- Click edit (may look like a pencil icon in some versions of phpMyAdmin)
- Your user_id will be shown, click on Edit
- Next to the user_pass is a long list of numbers and letters.
- Select and delete these and type in your new password.
- Type in the password you want to use. Just type it in normally, but remember, it is case-sensitive.
- In this example, the new password will be 'rabbitseatcarrots'
- Once you have done that, click the dropdown menu indicated, and select MD5 from the menu.
- Check that your password is actually correct, and that MD5 is in the box.
- Click the 'Go' button to the bottom right.
- Test the new password on the login screen. If it doesn't work, check that you've followed these instructions exactly.