Easyway to resetting wordpress password using FTP

resetting wordpress password

Resetting wordpress password using FTP

There is lot of methods for resetting wordpress password. Normally you can reset password by clicking lost password link, which uses email to reset your password.
But if email is not working and other methods also not working or any 404 errors occur, you can reset your password via FTP.
Note: Use the methods at your own risk. I’m not responsible if any data loss.

Method 1: Edit functions.php

  • Login to your site’s FTP and navigate to the directory “/wp-content/themes/your active theme/”. Then download the file called functions.php
  • Edit the file, and find first <?php: and add the below code next to it.
    wp_set_password('password',1);
    Put your desired new password for the main admin user. “1″ denotes the user ID in the wp_users table.
  • once you’ve done upload the edited file back to the same directory of your site. Select overwrite if asks. Please make sure you have a backup.
  • Now you are able to login with the new password. Once you’ve logged change new password using admin pannel and delete the code on functions.php. Otherwise it will reset the password on every pageload.

Method 2: Emergency reset script

If the above method is not working you can use emergency password reset script.It is a PHP script.
Warnings:
  • You should know the admin user name
  • It will reset password and will send an email to admin’s email id. Even though you didn’t receive email, the password will be changed.
  • You don’t need to be logged in. If you could this method is not needed.
  • Put the script on the root directory of your website.
  • Make sure to delete the script once the password has been changed. (Important)
  • steps
    • Download emergency password reset script from here and place to your wordpress installation directory. File name should be emergency.php
    • Open ‘http://yourwebsitename.com/emergency.php
    • Follow the instructions. Enter admin username and new password. click update options. A message will be displayed to note the password change. An email will be send to the admin’s email.
    • Don’t forget to delete the emergency.php from your server. Because, anyone can use it to change the password.
    I hope one of these method will work for you. If doesn’t please feel free to comment below.

0 comments:

Post a Comment

www.comhttp.blogspot.in. Powered by Blogger.