Get Appointment

We have received your message and will contact you soon.

Thank you for choosing prositeweb, your web development agency in Montreal. Please call us at +1 (514) 548-2165 if you need immediate support.

6 Different Approaches to Reset WordPress Password

Have you ever had trouble resetting a WordPress password? WordPress offers various options for changing a password. In some cases it's simple, and sometimes it's not obvious. You can easily reset a WordPress password if you can access your email. Or if the mail system is working. How to do if WordPress email no longer works. Or you have to continue a project left by someone without having access to it. Today we are going to cover some options you may have.

1- Using Forgot Password from Login Screen to Reset a WordPress Password

The approach with the Lost Password form is the most used. The steps to reset a WordPress password will be as follows:

  • Access your login screen using the link https://www.example.com/wp-admin
  • Click the Forgot Password link at the bottom of your website
  • WordPress will ask you to enter your username or password. Enter your information and click generate password
  • You will receive a link to your email with instructions to reset your password.

2 – Reset your password using the wp-config.php file

In this case, you can either use FTP, must access your root directly on your website server.

  • Open the wp-config.php file
  • Add code wp_set_password('New password,' 1); – Where New password is your new password and 1 is the user ID
  • Save your wp-config.php and reload your website (on browser)
  • From there, you will be able to use your new password along with your username to access your website.

In case you don't know the user ID, you can check in the wp_users table of your WordPress database. Required: Be sure to remove the line of code after resetting the password.

3 – Change the password directly from the database

WordPress uses Md5 encryption to encrypt the password. Therefore, it is easy to reset a password instantly from the database. To achieve this, you need to follow these steps:

  • Connect to your WordPress database from your server.
  • Locate the wp_users database table
  • Find the user for whom you want to reset your password.
  • Click Edit to your left
  • Then, in the user_pass line, add your new password.
  • Select MD5 from the list of options to your right
  • Finally, click save or go to your right.

You can then use your new password to access the website.

4- Change the password from the WordPress admin dashboard.

If you have access to the WordPress admin dashboard, resetting a user password is simple. All you will have to do is:

  • Go to the user tab
  • Select the user whose password you want to reset
  • On the “New password” line, click on generate a new password
  • Check the box under the "New password" field to send the generated password to the user, or
  • Enter a password you want to add.

5- Use the WP-CLI (command line interface)

The WP-CLI is also a great tool that can help you easily manage your WordPress website. To use it to reset a password, follow these steps:

  • Navigate to your installation directory and type the command WP user list. The command line will show all users
  • Then update the user password using the command WP user update 1 –user_pass = New password. Where 1 is the User ID and New Password is the new password.

6- Use emergency password reset script (for admin password)

To use the emergency password reset script, you need to know the administrator username. If you meet the condition, you must do the following:

  1. Copy the emergency script from Emergency Password Script and place it in 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 https://yourwebsite.com/emergency.php.
  3. Enter the administrator username and new password, then click Update Options . You will see a message on the screen confirming the password change. You will receive a confirmation email.
  4. Once you are done, delete urgence.php from your server. Please don't leave it on your server, because someone else might use it to change your password.

Conclusion

There is no reason for you to go out of stock on your WordPress website. To reset a WordPress password, you can use the easiest approach to accessing your email or advanced options. If none of the above methods worked for you, we would be happy to help you free of charge. Send us an e-mail and we will contact you.

Recommended reading

Share :

npgilblas

Online Store Design - Champs
09 May 2022
Organizing Events - How to Use a Website to Attract and Retain Attendees
17 October 2022

Do you have a project in mind? Contact our web agency for a free evaluation.

We are the experts in creating websites, online stores and functionalities for websites based in Montreal. Contact us today to create your website starting at $1,200.