Resetting wordpress admin password when you have only ftp access

Through FTP

There is also an easy way to reset your password via FTP, if you’re using the admin user.

1. Login to your site via FTP and download your active theme’s functions.php file.

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

Put in your own new password for the main admin user (instead of ‘password’). The “1” is the user ID number in the wp_users table.

3. Upload the modified file back to your site.

4. Browse the site so the script will run and reset the password

5. Go back and remove that code. It will reset your password on every page load until you do and you will not be able to log-in

6. Log-in with ‘admin’ and the new password

Leave a Reply

Your email address will not be published. Required fields are marked *