Ways to reset/update user password for WordPress websites


WordPress system gives you many ways to reset the administrator and user password. The most common method used is doing it through the default WordPress interface. It is the easiest way to reset/recover the password for WordPress website.

WordPress has its own built-in password recovery mechanism that makes it very easy to reset the passwords for website admin. It uses the user email to reset the password. The only problem with this system is that emails don’t work properly in some of the hosts. and as an admin, you have to choose some other method to reset the user’s password.

Here, I have discussed a few techniques you can use to reset the passwords for the WordPress website. Any of the following methods can work for you depending on the kind of access you have to the website.

Changing Vs Resetting Your WordPress Password.

When it comes to securing your WordPress website, one of the most important things you can do is to ensure that your password is strong and unique. However, sometimes you may need to change or reset your password for various reasons.

Changing your WordPress password is a straightforward process that you can do yourself if you know your current password. To change your password, simply log in to your WordPress dashboard and go to your profile settings. From there, you can enter a new password and save the changes.

On the other hand, resetting your password is necessary when you can’t remember your current password. In this case, you will need to use the “Lost your password?” link on the login page to request a password reset email. This email will contain a link that will allow you to create a new password.

It’s important to note that resetting your password is a security measure that is put in place to protect your website. It ensures that only authorized users can access your site and make changes. As a site admin, you can also reset passwords for other users on your site.

Both changing and resetting your WordPress password are important for maintaining the security of your website. Whether you’re changing your password as a precautionary measure or resetting it because you can’t remember it, it’s essential to have a strong and unique password to keep your website safe from potential threats.

Resetting password through automatic emailer:

You can use this default ‘Lost Password’ feature of the WordPress system if you know the username of the registered email of the user. It’s just a five-step process to update the password through an automatic emailer.

  • Go to your WordPress Login page
  • 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, log in and change it to something you can remember on your profile page.

Updating passwords through FTP

If you are an admin user of the website, you can easily update the password using the FTP.

1. Log in to your site via FTP and download your active theme’s functions.php file.
2. Edit the file and add this code to it, right at the beginning, after the first wp_set_password( ‘password’, 1 );

Put in your own new password for the main admin user. The “1” is the user ID number in the wp_users table.
3. Upload the modified file back to your site.
4. After you then are able to log in, make sure to go back and remove that code. It will reset your password on every page load until you do.

Through phpMyAdmin

Playing with phpMyAdmin is always a risky thing. You got to have the technical knowledge to do that. And if you are not technically pro, I would recommend contacting the developer who can do this for you.

Following are the steps with the screenshot to change the user password through phpMyAdmin.

1. Begin by logging into phpMyAdmin and clicking databases.
2. A list of databases will appear. Click your WordPress database.
3. All the tables in your database will appear. If not, click Structure.
4. Look for _users in the Table column.
5. Click on the icon for a browse.
6. Locate your Username under user_login
7. Click edit (may look like a pencil icon in some versions of phpMyAdmin)
8. Your user_id will be shown, click on Edit
9. Next to the user_pass is a long list of numbers and letters.
10. Select and delete these and type in your new password.
11. Type in the password you want to use. Just type it in normally, but remember, it is case-sensitive.
12. In this example, the new password will be ‘muprpassword’
13. Once you have done that, click the dropdown menu indicated, and select MD5 from the menu.
14. Check that your password is actually correct, and that MD5 is in the box.

15. Click the ‘Go’ button to the bottom right.
16. Test the new password on the login screen. If it doesn’t work, check that you’ve followed these instructions exactly.

How to Reset WordPress Password using SQL?

Resetting a WordPress password using SQL can be a bit technical and should only be attempted by experienced users who are comfortable working with databases. Before proceeding, it’s also important to create a backup of your WordPress database in case something goes wrong.

Here are the steps to reset a WordPress password using SQL:

  •         Access your website’s database using a tool like phpMyAdmin.
  •         Find the “wp_users” table in the database and click on it to open it.
  •         Locate the user whose password you want to reset and click on the “Edit” button next to their username.
  •         In the “user_pass” field, delete the current encrypted password and replace it with a new one.

Note: Make sure to choose a strong password and use an online password generator if necessary. Also, make sure to select the “MD5” function from the dropdown menu to encrypt the new password.

  •         Click on the “Go” button to save the changes.
  •         Log in to your WordPress site using the new password.

It’s important to note that resetting a WordPress password using SQL is a last resort option and should only be done if you can’t reset the password using the normal methods, such as the “Lost your password?” link on the login page.

Also, remember that resetting a password in this way will permanently change the password, so it’s important to make a note of the new password and update any other systems or services that may use the same login credentials.

How to Reset WordPress Passwords from cPanel?

Resetting a WordPress password from cPanel is a quick and easy process that can be done by following these steps:

  •         Log in to your cPanel account and navigate to the “File Manager” option.
  •         Find the root directory of your WordPress site and open the “wp-config.php” file.
  •         Look for the following line of code:

define(‘DB_HOST’, ‘localhost’);

  •         Underneath this line, add the following code:

define(‘WP_ALLOW_REPAIR’, true);

  •         Save the changes and navigate to your WordPress site in a web browser.
  •         Type the following URL into the address bar:

http://yourdomain.com/wp-admin/maint/repair.php

Note: Replace “yourdomain.com” with your actual domain name.

  •         On the “Database Repair” page, click on the “Repair and Optimize Database” button.
  •         Wait for the repair process to complete and then click on the “Return to WordPress Login” button.
  •         On the WordPress login page, click on the “Lost your password?” link.
  •         Enter your WordPress username or email address and click on the “Get New Password” button.
  •         Check your email for a password reset link and follow the instructions to create a new password.
  •         Log in to your WordPress site using the new password.

After you have successfully reset your password, be sure to remove the code you added to the “wp-config.php” file to prevent unauthorized access to your site.

That’s it! Resetting a WordPress password from cPanel is a simple process that can be done in just a few minutes.

How to Reset WordPress Passwords Using the Emergency Password Reset Script?

The Emergency Password Reset Script is a feature built into WordPress that allows you to reset your password in case you’re locked out of your site or can’t reset your password using the normal methods. Here’s how to use the Emergency Password Reset Script:

  •         Log in to your web hosting control panel and navigate to the file manager or FTP client.
  •         Find the WordPress root directory and locate the file named “emergency.php”.
  •         If you can’t find the “emergency.php” file, you can create it manually by opening a plain text editor and pasting the following code:
<?php

/*

Emergency Password Reset Script

Author: WordPress.org

*/

define('WP_USE_THEMES', false);

require('wp-load.php');

$user_login = isset($_GET['user']) ? $_GET['user'] : '';

if (empty($user_login)) {

    echo "Username empty.";

    exit;

}

$user = get_userdatabylogin($user_login);

if (!$user) {

    echo "Invalid username.";

    exit;

}

$new_pass = wp_generate_password(12, false);

wp_set_password($new_pass, $user->ID);

echo "Password has been reset to: $new_pass";

?>
  •         Save the file as “emergency.php” and upload it to the root directory of your WordPress site.
  •         Navigate to the following URL in your web browser:
http://yourdomain.com/emergency.php?user=username

Note: Replace “yourdomain.com” with your actual domain name and “username” with the username of the account you want to reset the password for.

  •         The script will generate a new password and display it on the screen.
  •         Log in to your WordPress site using the new password.
  •         Once you have logged in, delete the “emergency.php” file from your server for security reasons.

That’s it! The Emergency Password Reset Script is a handy tool that can help you reset your WordPress password quickly and easily. Just make sure to delete the “emergency.php” file once you’ve used it to prevent unauthorized access to your site.

User Password update through WP CLI

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

1. Move into the /WordPress directory and type
$ wp user list
to see all users. Find the ID of the user you’d like to update.
2. Then, update the user
$ wp user update 1 --user_pass=$UP3RstrongP4$$w0rd
replacing “1” with the id of the user you want to update. You can also use the user login or email instead of id to reset the password.

Updating passwords through plugins

Plugins are always an important part of any WordPress setup. It makes many complex tasks easy and effective. The same is with resetting multiple users’ passwords for your WordPress website. You don’t need to have any advanced technical knowledge to do that if you have installed the ‘Mass User Password Reset’ plugin.

Mass Users Password Reset is a WordPress Plugin that lets you reset the password of all users. It can group the users according to their role and resets the password of that group. It sends a notification email to users about their new randomly generated password.

Mass User Password ResetPro Features:
  • Role-based grouping
  • An email notification with a new password
  • Custom filter-based actions
  • Custom email template
  • Option to send a password reset link
  • Test Mode
  • WooCommerce compatible
  • Multilingual translation
  • Excellent support

So, these are some of the methods you can use to reset/update the user password for your WordPress website. As I mention, any of these methods can work for you depending on the level of access you have to the website.

I hope this information will help you. Reach me in the comment below if you have any queries for the same.

How to Troubleshoot Common Issues with Password Changes and Resets?

Changing or resetting a WordPress password can sometimes cause issues, but don’t worry – most problems can be fixed easily. Here are some common issues you may encounter when changing or resetting your WordPress password, along with some troubleshooting tips:

  •         Password reset email not received: If you don’t receive the password reset email, check your spam folder or try adding the email address to your contacts list. Also, make sure the email address associated with your WordPress account is correct.
  •         Invalid username or email address: If you receive an “invalid username or email address” error message when trying to reset your password, double-check the information you entered and make sure it matches the information in your WordPress account.
  •         Unable to reset password with email: If you can’t reset your password using the email method, try using the “Forgot Password” option on the WordPress login screen. If that doesn’t work, you may need to reset your password using PHPMyAdmin or cPanel.
  •         Login page keeps refreshing: If the login page keeps refreshing after you enter your username and password, try clearing your browser cache and cookies or using a different web browser.
  •         Error messages: If you receive an error message when trying to reset your password, check the message for any clues as to what went wrong. You can often find solutions to common error messages online.
  •         Locked out of WordPress account: If you’re locked out of your WordPress account, try resetting your password using the Emergency Password Reset Script or contact your web host for assistance.
  •         White screen of death: If you see a white screen after changing or resetting your password, it may be caused by a plugin conflict or a theme issue. Try disabling your plugins or switching to a default theme to see if that fixes the problem.

By following these troubleshooting tips, you should be able to resolve most issues related to changing or resetting your WordPress password. If you’re still having problems, don’t hesitate to reach out to the WordPress community or contact your web host for assistance.

Recent Articles

Browse some of our latest articles...

Prev
Next