Do not despair if you have lost your WordPress password. YOu can quite easily reset your WordPress admin password using FTP.

This option is mostly useful if you have tried to reset it normally but were unable to.

What’s the problem?

You have lost your WordPress Admin Password and are using WordPress through FTP. You have tried to reset the password using the forgot password link but didn’t get the reset email.

Steps to reset your WordPress admin password using FTP

Step 1

Login to your FTP account
Login to your FTP account - Reset WordPress admin password using ftp

Step 2

Go to “xx/wp-content/themes/[whichever is your active theme]”

Go to theme - Reset your WordPress admin password using ftp

Step 3

Download the functions.php fileDownload the functions - Reset your WordPress admin password using ftp

Step 4

Delete the pre-entered text YourNewPassword with the actual new password that you want to use. Note that the number “1” within the script is your user ID number in the wp_users tableDelete the pre-entered pw - Reset your WordPress admin password using ftp

Step 5

Upload the edited functions.php file to your FTP account.Upload the edited functions - Reset your WordPress admin password using ftp

Step 6

Log into WordPress with your new usernameLog into WordPress - Reset your WordPress admin password using ftp

Step 7

Remove the code from your edited functions.php file and complete the process by uploading it to your FTP.Remove the code - Reset your WordPress admin password using ftp
And that’s how to reset your WordPress admin password using FTP.

Conclussion

Now you have access to your WordPress admin, it is wise to address the reason you could not reset your password using the link in the login page.
This is usually a problem with your emails not getting sent from your WordPress account. If you observe this issue, a good way to fix it is by configuring gmail smtp server to send emails from your WordPress website.