Have you ever had difficulties in resetting a WordPress password? WordPress offers various options when it comes to change a password. In some cases, it is straightforward, and sometimes it is on. 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 you need to continue a project someone left without given access. Today, we are going to cover some of the options you may have.

1- Using the forgotten Password from the login screen

The approach with the Password lost form is the most used. The steps to reset a password will be as follow:
  • Visit your login screen using the link https://www.example.com/wp-admin
  • Click on 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 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 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 will be able to use 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 quite easy 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 that you wish to reset Password
  • Click on Edit to your left
  • And then in the row user_pass, add your new Password
  • Select MD5 from the list of option 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 his/her 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 will like to add.

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

The WP-CLI is also an excellent tool that can help you to manage your WordPress website easily. 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=Newpassword. Where 1 is the user ID, and New Password is the new Password.

6- Use the Emergency Password Reset Script (For admin Password)

To use the emergency password reset password script, you need to know the admin username. 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 http://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. 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 either use the most straightforward approach if you have access to your email or advanced options.  If none of the methods above worked for you, we would be happy to assist you for Free. Send us an email, and we will get in touch.