How to change a user password in WordPress
Enter the following command in an SSH terminal to access the mysql server command line. Use your "root" or "sa" mysql username to ensure you have the appropriate privileges:mysql -u <username> -p
Enter the user's password
The following commands will be typed at the mysql> prompt:
1. Locate the name of the Wordpress database
show databases;
2. Select the appropriate database for use
use name-of-database;
3. Locate the table with "users" at the end, normally "wp_users"
show tables;
4. List all users along with their md5 password hashes. Locate the "ID" number of the user in question
SELECT ID, user_login, user_pass FROM name-of-table-you-found;
5. You will need to generate a "new-md5-password" -- You may use an online md5 hash generator such as http://md5-hash-online.waraxe.us/ to accomplish this.
UPDATE name-of-table-you-found SET user_pass = MD5('new-md5-password') WHERE ID = (id#-of-account-you-are-resetting-password-for);
6. Confirm your changes
SELECT ID, user_login, user_pass FROM name-of-table-you-found
Article Details
Last Updated
26th of April, 2010
Related Articles
No related articles were found.
Attachments
No attachments were found.


