24/7 WordPress website maintenance services

With 24/7 access to the world's best WordPress Expert for unlimited small jobs

Forgetting passwords is a common occurrence nowadays. There are so many passwords for different websites that you are likely to forget the most important one – the password for your WordPress website. What to do if you don’t remember the password? What if the password you know isn’t working? What if the email address for your account isn’t working? In this article, we will answer all these questions and show you how to recover the WordPress password.

There are many ways to reset passwords in WordPress. Methods differ depending on the access you have to your website. We will explain each method. Choose the method that best suits your access level.

Let’s get started.

Method 1: “Lost Your Password” Link 

The Fastest and the easiest way to recover your WordPress password is to use the “Lost Your Password” link on your WordPress login screen.

How To Recover WordPress Password

Click on the link, and you will go to the password reset screen. Here, you should enter the username or email address you have associated with your WordPress account. Once you do, you will receive a password reset link in your email.

How To Recover WordPress Password

You need to remember the email address associated with your WordPress website. 

What if you don’t remember the email address you use for WordPress login? Then you will have to use other methods. 

There is one trick you can use that can help you in such situations. You can create more than one user in your WordPress account. To do so, go to the WordPress Dashboard>>Users>>Add New. Here you will be able to add users. Now, create a new user with the user name and email address of your choice and give that user the administrator role. This way, you will have two login credentials that you can use to log in. This comes in handy when you can remember the other password.

Method 2: Accessing Website Through FTP

You can reset your WordPress password by connecting through FTP.

  1. First, log in to your website through FTP.
  2. Download the functions.php file of your active theme
  3. Edit this file by adding the following code after the first <?php line at the beginning of the file. 

wp_set_password( ‘password’, 1 );

Here you can enter the new password of your choice. 

4. upload this modified file to your site

5. Once you are able to log in to your website, edit this file and remove the code you just added. If you do not remove it, your password will change with every page load. 

Here are the best free FTP clients for Windows and Mac.

Method 3: Reset Password Using WP CLI

WP CLI is the command-line interface that you can use to manage your  WordPress installation. WP CLI, you can configure multisite installations without using a web browser. You can know more about WP CLI from the official website. Once you are able to use this tool, follow these steps to reset your password:

  1. Go to the /wordpress directory and type the following to see the list of all users:

$ wp user list

2. Select the user of your choice and update the password:

$ wp user update 1 –user_pass=$UP3RstrongP4$w0rd

Replace 1 with the user id. 

That’s it! You have successfully reset the password. 

Other Methods

There are a few other methods to reset the password. The ones we have discussed above are among the simplest ones. If none of them works for you, try other options. For example, if you have phpMyAdmin access to your WordPress database, you can reset the WordPress Password from phpMyAdmin.

In extreme conditions when none of these works and you have forgotten user name and password, you can use Emergency Password Reset Script. Find detailed information about this script here.

Losing your password, losing access to your site can be a nightmare. We understand your anxiety and the panic that results. Here at WPWarrior, we can help you in such an emergency situation. We offer all kinds of professional WordPress help. Do reach out if you have any problems or concerns with WordPress. We are here to help.