How to reset WordPress Admin Password using FTP

Previously we had posted a tutorial on how to Reset Your WordPress Password via phpMyAdmin, what if you dont have access to Phpmyadmin or afraid of using Phpmyadmin.Do you feel that the options are dried out.

It’s not the case, In WordPress there is more than one way to set your admin password.

There is another way to reset a lost WordPress admin password easily.The process of resetting WordPress Admin Password can be done via FTP, if you’re using the admin user.

How to Reset WordPress password using FTP

Reset WordPress Admin Password Through FTP :

1. Login to your website via FTP and download your current WordPress theme’s functions.php file.

2. Edit functions.php and add the below code to it, right at the beginning, after the first <?php:


Put in your own new password for the main admin user. The “1” is the user ID number in the wp_users table.

3. Upload the modified file back to your site.

4. After you then are able to login, make sure to go back and remove that code as it’s simply a plain text & it’s not safe to keep.

5. It will reset your password on every page load until you do.

Now you can login  to the WordPress Admin dashboard with your administrator account using the password password.

I hope this tutorial help you recover your admin password if you have been locked out of your WordPress blog.Please let me know if this doesn’t work for you, we would be happy to assist you further.