How to reset WordPress Password

There are many ways to reset a WordPress password, it can be done even if you can’t reset your WordPress Password from the WordPress Admin Program or from your website login page.

TABLE OF CONTENS:
1. Change a WordPress Password in your WordPress Admin.
2. Change a WordPress Password through the “Lost your password?” link on the main login page for your blog or website.
3. Change a WordPress Password through MySQL Command Line - Works perfectly!
4. Change a WordPress Password through phpMyAdmin

1. Change WordPress Password in your WordPress Admin

To change your password in current version 15-Juli-2019:

  1. In the Administration Screen, menu, go to Users > All Users.
  2. Click on your username in the list to edit it.
  3. In the Edit User screen, scroll down to the New Password section and click the Generate Password button.
  4. If you want to change the automatically generated password, you can overwrite it by typing a new password in the box provided.
  5. Click the Update User button.

Your new password becomes active immediately.

2. Reset WordPress Password through e-mail

Through the automatic emailerIf you know your username or the email account in your profile, you can use the “lost password” feature of WordPress.

  1. Go to your WordPress Login page (something like http://yoursite.com/wordpress/wp-login.php)
  2. Click on the “Lost your password?” link
  3. You will be taken to a page to enter some details. Enter your username or the email address on file for that account.
  4. Wait happily as your new password is emailed to you.
  5. Once you get your new password, login to your profile page and change this password to something you can remember.

3: Change WordPress Password through MySQL Command Line #

  1. Get an MD5 hash of your password.
    • Visit md5 Hash Generator, or…
    • Create a key with Python, or…
    • On Unix/Linux:
      1. Create a file called wp.txt, containing nothing but the new password.
      2. tr -d ‘\r\n’ < wp.txt | md5sum | tr -d ‘ -‘
      3. rm wp.txt
    • On Mac OS X:
      1. Create a file called wp.txt, containing nothing but the new password. Then enter either of the lines below
      2. md5 -q ./wp.txt; rm ./wp.txt (If you want the MD5 hash printed out.)
      3. md5 -q ./wp.txt | pbcopy; rm ./wp.txt (If you want the MD5 hash copied to the clipboard.)
  2. “mysql -u root -p” (log in to MySQL)
  3. enter your mysql password
  4. “use (name-of-database)” (select WordPress database)
  5. “show tables;” (you’re looking for a table name with “users” at the end)
  6. “SELECT ID, user_login, user_pass FROM (name-of-table-you-found);” (this gives you an idea of what’s going on inside)
  7. “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)
  8. “SELECT ID, user_login, user_pass FROM (name-of-table-you-found);” (confirm that it was changed)
  9. (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.

  1. Skip step# 1 above.
  2. 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.

4. Change a WordPress Password through phpMyAdmin

Article about resetting a WordPress Password through phpMyAdmin

 

 

Share