Topics

  • To Change Your Countersign
  • Through the automated emailer
  • Through MySQL Command Line
  • Through phpMyAdmin
    • Other Tutorials using phpMyAdmin
  • Through FTP
  • Through WP CLI
  • Using the Emergency Countersign Reset Script
    • A Word of Caution:
    • Directions for Use:
  • Additional Reference

In WordPress, there is more than one way to reset your password. (Normally, the easiest way to reset it is through the "Lost your password?" link on the main login page for your weblog or website.)
However, in that location are certain times (especially if your email isn't working correctly) that you may have to take unlike steps to reset your password.

Here'due south a list of different ways to reset a countersign. The method that you use depends on the type of access that you lot even so have to your website.

To Change Your Password

To change your password in electric current versions:

  1. In the Assistants Screen, carte du jour, go to Users > All Users.
  2. Click on your username in the list to edit it.
  3. In the Edit User screen, curl down to the New Password section and click the Generate Countersign button.
  4. If you desire to alter the automatically generated countersign, you can overwrite it by typing a new password in the box provided. The strength box volition show you how adept (strong) your countersign is.
  5. Click the Update User push.

Your new password becomes active immediately.

Top ↑

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.

  • Get 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 enter some details. Enter your username or the email address on file for that account.
  • Await happily as your new password is emailed to you.
  • One time yous get your new password, login to your profile folio and change this password to something you can call back.

Top ↑

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 zilch but the new password.
      2. tr -d '\r\n' < wp.txt | md5sum | tr -d ' -'
      3. rm wp.txt
    • On Mac Bone X:
      1. Create a file called wp.txt, containing naught but the new password. Then enter either of the lines below
      2. md5 -q ./wp.txt; rm ./wp.txt (If you lot 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. "employ (name-of-database)" (select WordPress database)
  5. "show tables;" (you're looking for a table name with "users" at the terminate)
  6. "SELECT ID, user_login, user_pass FROM (name-of-table-y'all-found);" (this gives you an thought of what's going on inside)
  7. "UPDATE (proper name-of-table-you-found) SET user_pass="(MD5-string-you-fabricated)" WHERE ID = (id#-of-account-yous-are-reseting-password-for);" (really changes the password)
  8. "SELECT ID, user_login, user_pass FROM (name-of-table-you lot-constitute);" (confirm that it was changed)
  9. (blazon Command-D to exit mysql client)

Annotation: if you lot accept a contempo version of MySQL (version five.10?) you can have MySQL compute the MD5 hash for yous.

  1. Skip step# 1 above.
  2. Practise the following for step# 7 instead.
    • "UPDATE (proper noun-of-table-you-found) Ready 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, significant they look similar $P$BLDJMdyBwegaCLE0GeDiGtC/mqXLzB0, you lot can still replace the password with an MD5 hash, and WordPress will let you log in.

Top ↑

Through phpMyAdmin

This article is for those who take phpMyAdmin access to their database. Annotation: use phpMyAdmin at your own risk. If yous uncertainty your ability to use it, seek further advice. WordPress is not responsible for loss of information.

  1. Begin past logging into phpMyAdmin and clicking databases.
  2. A list of databases will appear. Click on your WordPress database.
PHPMyAdmin database selection
phpMyAdmin database select
  1. All the tables in your database will appear. If not, click Structure.
  2. Look for wp_users in the Table column.
  3. Click on the icon for browse.
  4. Locate your username under user_login
  5. Click edit (may look similar a pencil icon in some versions of phpMyAdmin).
PHPMyAdmin select users database table
phpMyAdmin select users table
  1. Your user_id will be shown. Click on Edit.
  2. Adjacent to the user_pass is a long listing of numbers and letters.
  3. Select and delete these and type in your new password.
  4. Type in the password y'all desire to use. You tin can type it in normally–but call back, it is instance-sensitive.
  5. In this case, the new password will be 'rabbitseatcarrots.'
  6. In one case you have done that, click the dropdown menu indicated, and select MD5 from the menu.
phpMyAdmin select MD5 function on user_pass row
phpMyAdmin select MD5 role on user_pass row
  1. Cheque that your password is actually right, and that MD5 is in the box.
phpMyAdmin user_pass row with MD5 function and "rabbitseatcarrots" as the password
phpMyAdmin user_pass row with MD5 part and "rabbitseatcarrots" as the password
  1. Click the 'Go' button to the bottom right.
  2. Exam the new password on the login screen. If information technology doesn't piece of work, cheque that y'all've followed these instructions exactly.

Tiptop ↑

Other Tutorials using phpMyAdmin

  • Reset a WordPress password from phpMyAdmin

Pinnacle ↑

Through FTP

There is too an like shooting fish in a barrel fashion to reset your password via FTP, if y'all're using the admin user.

  1. Login to your site via FTP and download your active theme's functions.php file.
  2. Edit the file and add this code to information technology, right at the get-go, later on the first <?php:
wp_set_password( 'password', one );                

Enter your own new countersign for the principal admin user. The "ane" is the user ID number in the wp_users table.

  1. Upload the modified file back to your site.
  2. In one case y'all are able to login, make certain to go back and remove that code. It will reset your password on every page load until you lot do so.

Top ↑

Through WP CLI

WP CLI is a command line tool for managing your WordPress installation.

  1. Move into the /wordpress directory and blazon
$ wp user list

to see all users. Find the ID of the user you'd similar to update.

  1. Then, update the user
$ wp user update one --user_pass=$UP3RstrongP4$w0rd

replacing "i" with the id of the user you want to update.

More on wp cli

Top ↑

Using the Emergency Password Reset Script

If the other solutions listed higher up won't work, then try the Emergency Countersign Reset Script. Please note that it'southward not a plugin, information technology'south a PHP script.

Top ↑

A Give-and-take of Caution:

  1. The Emergency Password Reset Script requires that you lot know the administrator's username.
  2. It updates the administrator password and sends an e-mail to the ambassador's e-mail accost.
  3. Fifty-fifty if you don't receive the email, the countersign volition still be inverse.
  4. Yous do not need to be logged in to utilize it. (After all, if you could login, y'all wouldn't need the script.)
  5. Place the script in the root of your WordPress installation. Do not upload information technology to your WordPress Plugins directory.
  6. For security reasons, remember to delete the script when you are done.

Top ↑

Directions for Use:

  1. Copy the emergency script from Emergency Password Script and put into a file called emergency.php in the root of your WordPress installation (the same directory that contains wp-config.php).
  2. In your browser, open http://example.com/emergency.php.
  3. Equally instructed, enter the administrator username (usually admin) and the new countersign, so click Update Options. A message is displayed noting the changed password. An email is sent to the web log administrator with the changed countersign data.
  4. Delete emergency.php from your server when yous are done. Do non leave it on your server, every bit someone else could use it to change your countersign.

Top ↑

Boosted Reference

  • Here is some other password reset script that can be used without knowing the username or email.