How To Reset WordPress Password Via FTP

How to reset WordPress password, if Lost your password is not working

If you’re using the default admin user of your WordPress site you can reset your password via FTP.

  1. Access your site via FTP and edit your activated theme’s functions.php file
  2. At the beginning after the opening <?php line, add the following:
    wp_set_password( 'password', 1 );

    In this command, the 1 is the user ID of your WordPress site, and password should be changed to your desired password.

  3. Save and upload this file to your WordPress site.
  4. After logging in, go back to the functions.php file of your activated theme and remove the code you just entered because it will reset your password every time the user logs in.
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments