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/MariaDB 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/MariaDB)
- 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?) or any version of MariaDB, you can have MySQL/MariaDB 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.