6 different approaches to reset a WordPress password

Have you ever had difficulties resetting a WordPress password? WordPress offers various options when it comes to changing a password. In some cases, it is straightforward, and sometimes it is not. For example, you might easily reset a WordPress password if you can access your email. Or if the email system is working. But how if the WordPress email is no longer working? Or do you need to continue a project someone left without being given access to? Today, we are going to cover some options you may have.

1- Use the forgotten Password from the login screen to reset a WordPress password

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

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

2—Reset your Password using the wp-config.php file

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

  • Open the file wp-config.php
  • Add the 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 the browser)
  • From there, you can use your New Password with your username to access your website.

In case you don’t know the user id, you can check in the table wp_users of your WordPress database.

Necessary: Make 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. Hence, it is effortless to reset a password instantly from the database. To achieve that, you need to follow these steps:

  • Login to your WordPress database from your server.
  • Locate the database table wp_users
  • Find the user with that you wish to reset your Password.
  • Click on Edit to your left
  • And then, in the row user_pass, add your new Password.
  • Select MD5 from the list of options to your right
  • And finally, click on save or go to your right.

You will then be able to 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 straightforward. All you will need to do is :

  • Go to the tab users
  • Select the user you want to reset their Password
  • At the line “New Password,” click on generate a new password
  • Select the checkbox below the “New Password” field to send the generated Password to the user, or
  • Enter a password you would like to add.

5- Use the WP-CLI (Command Line Interface)

The WP-CLI is also an excellent tool that can help you manage your WordPress website easily. For example, to use it to reset a password, follow the following steps:

  • Move to your installation directory and type the command WP user list. The command line will display all the 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 the Emergency Password Reset Script (For admin Password)

You need to know the admin username to use the emergency password reset script. If you fulfill the condition, then you need to do the following:

  1. Copy the emergency script from Emergency Password Script and put it 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 https://yourwebsite.com/emergency.php.
  3. Enter the administrator username and the new Password, then click Update Options. You will see a message on the screen confirming the password change. And you will receive a confirmation email.
  4. Once you have completed, Delete emergency.php from your server. Please do not leave it on your server, as someone else could use it to change your Password.


There is no reason for you to get stock out of your WordPress website. To reset a WordPress password, you can use the most straightforward approach to access your email or advanced options. If none of the methods above worked for you, we would be happy to assist you for Free. Email us, and we will get in touch.

Recommended reading

Leave a comment

Thank you

Thank you for contacting Prositeweb,
Go back to the home page

Please fill free to contact us at any time for any request regarding our services. Contact us.

Thank you