How to reset WordPress admin user's password?

There are several ways to reset WordPress admin user password in WordPress. A simple method is to change the password after logging to your WordPress admin area. But what happens when you do not have the current password? This article will give you detailed steps for various methods to reset WordPress admin user password.

Method – 1: Reset Password when you have current working password:


These steps can be applied when you have current admin user password and you are able to log in to your WordPress admin area using that password

  1. Login to your WordPress admin area using current password

  2. From the left pane options click on 'Users'

  3. It will list out all WordPress admin users. Select the one for which you want to change the password and click on 'Edit' link

    edit users profile to change password from admin area

  4. Specify the new password and click on 'Update User'

    enter new password


Method – 2: Reset Password using Password Reset link:

This an easiest option to reset a password when you do not have the current password. You can reset the WordPress admin user password through "Password reset link". Find the detailed steps as below,-

  1. Open WordPress admin page (wp-login page) and click on 'Lost your password?' link

    click on lost password link

  2. Enter your 'User name' or 'Email address' that is associated with the your WordPress admin user

    Enter wp username or recovery email address

  3. Now, click on 'Get Password'

  4. It will send you an email at the email address specified with that user. You will have to click on the verification link received in email and it will allow to set a new password for your user.

Method – 3: Reset Password through phpMyAdmin interface: 


If you don't have an access to the email account that is set for your admin user or if you are not able to receive emails at that account then you can use this method to reset the password of your WordPress admin user.
 
  1. Login to the phpMyAdmin

  2. Double click on your WordPress database

  3. Double click on "wp_users" table

  4. Locate your user and click on "Edit"

    Browse your WordPress Database and Select wp_users Table

  5. Enter a new password in "user_pass" fileld

  6. Select "MD5" from the dropdown menu

    Enter New Password for WordPress Admin User in user_pass Field

  7. Click on "Go"

Method – 4: Reset Password using MySQL command line (MySQL CLI):

WordPress stores the passwords in a MySQL database so you can update the new password from the database itself. In order to do that, you need to have an access to the database through phpMyAdmin/MySQL CLI or any other application that you are using to manage the database. In above method we have seen the steps for phpMyAdmin. Now let us see the steps for MySQL CLI,-

  1. Open terminal window in your system

  2. Login to MySQL command line (refer this URL-http://dev.mysql.com/doc/refman/5.6/en/mysql.html for more details) and run following commands:

    use your-wordpress-database;
    UPDATE wp_users SET user_pass = MD5(‘Enter-new-password-here’) WHERE ID=1 LIMIT 1;

Note-1: your-wordpress-database should be replaced with your WordPress database name
Note-2: ID is the user ID and usually it is 1 for default admin account.

Method – 5: Reset Password using FTP Method:


In case, if you do not have an access to the database or control panel then you will need to use the FTP method. Here are the steps for this method,-

  1. Download 'function.php' file located under Themes folder [Active Theme]

    download function dot php file

  2. Add 'wp_set_password ('Enter-newpassword-here',1)' in 'function.php' file at the second line after opening a PHP tag. 1 is the user ID and usually it is 1 for default admin account.

    edit function dot php

  3. Upload modified file back to it's original location

  4. Try to login with the new password. You will be redirected to the same page. Nothing will happen. Don't try to login again.

    login with new password

  5. Again download the same file and remove added line and upload it back to it's original location.

  6. Now you should be able to login using new password.

Method – 6: Reset Password using Password reset script:

There is also another method to reset password when you do not have an access to the database or control panel. It is using Password Reset Script. Here are the steps for the same:

  1. Copy the code from THIS URL

  2. Create a new file 'pwreset.php' containing the code that we copied under the root of your WordPress installation or you can create it locally and then upload it using FTP account

  3. Open the following URL in your web browser [replace 'www.demowordpress.com' with your website name]

    http://www.demowordpress.com/pwreset.php

  4. Enter your WordPress username and new password

    browes password reset scrtip

  5. Click on 'Update Options' button.

Note: It is mandatory to remove password reset script once you are done with password reset. In this case it is 'pwreset.php'.

  • 105 Users Found This Useful

Was this answer helpful?

Related Articles

How to write a comment in WordPress

How to write a comment in WordPress This tutorial assumes you've already logged in to...

How to manage categories in WordPress

How to manage categories in WordPress This tutorial assumes you've already logged in to...

How to Migrate / Transfer your WordPress Website to AccuWeb Hosting Server?

Open your cPanel account and under Files section, locate Backup Wizard. Click on the Backup...

How to secure complete backup of your WordPress website?

We do maintain the backup of our shared hosting clients' accounts regularly, however it is highly...

How to Fix White Screen of Death Error in WordPress?

Everyone who is involved in WordPress development must have faced this annoying white page...