Knowledge Base
MilesWeb / WordPress FAQ

Resetting WordPress Admin Password.

Approx. read time : 2 min

It is obvious to forget passwords as one of the human attributes. At times, it can be crucial to recover lost password. Today, we will see how to recover lost password for WordPress admin (wp-admin).

It can be recovered by the following ways:

1. By using ‘Lost Password’ option.

2. By using PhpMyAmin in cPanel.

3. By using FTP.

4. By using the Emergency Password Reset Script.

In this article, we are going to see the first 3 options, leaving the 4th option.

# 1. By using ‘Lost Password’ option.

If you know the username or the email account of your WordPress, then you can use the ‘Lost Password’ utility and reset the password.

a. Access your WordPress Login page i.e, http://mydomainsite.com/wordpress/wp-login.php (NOTE: the url may differ depending upon your WordPress installation preference).

b. Hit the ‘Lost your password?’ option

 

WP

 

c. Insert the username or email address and click on ‘Get New Password’

WP1

4. An email with a link to reset password will be delivered at the email address registered at the time of WordPress installation.

5. Click the link in the email and it will open the page to reset password. Enter twice a strong new and at least twelve characters long password, then click ‘Reset Password.’

# 2. By using PhpMyAmin in cPanel.

You can the WordPress password in the database with the help of phpMyAdmin in cPanel. NOTE: You must have cPanel access in order to do so.

a. Log into your cPanel.

b. Now under ‘Databases’ section, click ‘phpMyAdmin’

php1

 

c. Click on the name of your WordPress database. Now click on ‘wp_users’ table and then ‘edit’ it.

 

WP4

 

d. On the next page type in or copy/paste your new password into ‘user_pass’ box, select MD5 in Function column and click Go to finish.

#3. By using FTP.

This method can be used when you don’t have access to your WordPress database or instead of the above two methods.

a. Connect to your website data with the help of your preferred FTP client such FileZilla or CyberDuck and navigate to themes section of your WordPress installation in order to download functions.php file to your PC. For example, my path to the file as below:

/home/demopara/public_html/wp-content/themes/twentyfifteen/functions.php

b. Edit the functions.php on your pc and on line 2, right after the first <?php line add the following code/line:

wp_set_password(‘xxxxxx’,’admin’);

 

NOTE: Make sure to replace ‘xxxxxx’ (without quotes) with your preferred password, and user ‘admin’ (without quotes) with your actual WordPress username.

c. Save the file and upload it file back to your /themes folder under your hosting account on the server.

d. Now login to your WordPress admin area with the temporarily set password.

e. Now you need to remove the wp_set_password line from the functions.php file on your pc and re-upload the file as above. By doing so, the WordPress would not reset the password again and again every time you would access the admin area.

#4. By using the Emergency Password Reset Script

You need to do as instructed at the following url in order to use the Emergency Password Reset Script 

http://codex.wordpress.org/User:MichaelH/Orphaned_Plugins_needing_Adoption/Emergency

That’s all !

 

 

Save

Need help? We’re always here for you.