Days
:
Hours
:
Minutes
:
Seconds

Tuning - Car Detailing & Dealer WordPress Theme $69 $19

View Now
Skip to content Skip to sidebar Skip to footer

How to Reset Your WordPress Password

reset your WordPress password

There are multiple ways to reset your password in WordPress. While the most straightforward method is typically using the “Lost your password?” link on the login page, there are situations—such as issues with your email—where you may need to explore alternative methods.

Here’s a guide on different ways to reset your WordPress password, depending on your access level to your website.

Changing Your Password via the Admin Panel

To change your password through the WordPress admin panel:

  1. Navigate to Users > All Users from the Admin Screen menu.
  2. Find your username in the list and click on it to edit your profile.
  3. Scroll down to the New Password section in the Edit User screen and click the Generate Password button.
  4. You can replace the automatically generated password with one of your choosing by typing it in the provided box. The strength indicator will show you how secure your password is.
  5. Click the Update User button to activate your new password immediately.

Using the Automatic Emailer

If you know your username or the email associated with your account, you can reset your password via email:

  1. Go to your WordPress login page (e.g., http://yoursite.com/wordpress/wp-login.php).
  2. Click on the “Lost your password?” link.
  3. Enter your username or the email address linked to your account.
  4. Wait for your new password to be emailed to you.
  5. Once you receive the new password, log in to your profile and change the password to something more memorable.

Resetting via MySQL Command Line

To reset your password using the MySQL command line:

  1. Generate an MD5 hash of your new password using an MD5 generator or by creating a key with Python.
  2. Log in to MySQL using the command mysql -u root -p and enter your MySQL password.
  3. Select your WordPress database using the command use database_name.
  4. Identify the users table with the command show tables; and look for the one ending with “users.”
  5. Retrieve the current login information with SELECT ID, user_login, user_pass FROM users_table;.
  6. Update the password using UPDATE users_table SET user_pass=’MD5_string’ WHERE ID = user_id;.
  7. Confirm the password change with SELECT ID, user_login, user_pass FROM users_table;.
  8. Exit the MySQL client by typing Control-D.

Resetting via phpMyAdmin

If you have phpMyAdmin access, you can reset your password as follows:

phpMyAdmin
  1. Log in to phpMyAdmin and select your WordPress database.
  2. Click on the wp_users table to browse user accounts.
  3. Find your username and click the edit (pencil) icon.
  4. Replace the current password with your new one, selecting MD5 from the dropdown menu.
  5. Click the ‘Go’ button to save changes.
  6. Test the new password on the login screen.

Resetting via FTP

For admin users, you can reset the password via FTP:

  • Log in to your site via FTP and download the functions.php file from your active theme’s directory.
  • Add the following code after the initial <?php line:

wp_set_password(‘my_new_password’, 1);

  • Replace my_new_password with your desired password.
  • Upload the modified file back to your site.
  • Log in to your WordPress dashboard and remove the added code from functions.php.

Using WP CLI

WP CLI, a command line tool for WordPress management, also allows password resetting:

  1. Navigate to the /wordpress directory and list all users with wp user list.
  2. Find the user ID you want to update.
  3. Update the password with wp user update 1 –user_pass=your_new_password, replacing 1 with the correct user ID.

Using the Emergency Password Reset Script

If other methods fail, you can use the Emergency Password Reset Script:

  1. Download the script from Emergency Password Script and save it as emergency.php in your WordPress root directory.
  2. Open http://yourdomain.com/emergency.php in your browser.
  3. Enter the administrator username and new password, then click Update Options.
  4. After resetting the password, delete emergency.php from your server.

Remember to use these methods responsibly and remove the script or code changes after successfully resetting your password.

For the Updates

Exploring ideas at the intersection of design, code, and technology. Subscribe to our newsletter and always be aware of all the latest updates.

Leave a comment

Download a Free Theme