How to Change WordPress Password?

How to Change WordPress Password?

Did you just lose your WordPress site password? Or, do you want to change the password for security reasons?

Are you looking for a solution to change the WordPress Password? If yes, we have good news for you. 

WordPress allows you to change passwords in many different ways. Some of these processes are simple and only require a click of a button. Meanwhile, some require at least some technical knowledge of web development.

In this article, we’ll go through every method of changing passwords. 

The most common way to change the WordPress password is to open the “Lost your password” link. It requires you to enter your email or username. However, there are cases when you do not have either an email, username, or password. 

Considering different cases, here we have listed all the possible ways of changing a WordPress password. Different users have separate access to the website. Depending on the type of access, you can choose the method that’s best suited for you.

Simple Password Change 

In the current WordPress version, you can change the password by following some simple steps. Firstly, log in to the admin dashboard and follow the steps below:

  • Go to Users > All Users.
  • Pick the username for which you want to change the password.
  • You’ll see the Edit User screen. Now scroll down and go to the New Password section.
  • Click on the Generate Password button.
  • You can also choose to write your password instead of clicking on the Generate Password button.
  • There is a strength button to help you build a strong password.
  • Click on the Update user button, and that’s it. 
Change Password from dashboard

Using the Automatic Emailer

You can use the Automatic Emailer feature to change your WordPress password if you know your email address. For this, use the “Lost password” link on your WordPress login screen. Here are the steps you need to follow:

  • Go to your WordPress login screen.
  • Click on the “Lost Password” link.
  • A page will open where you need to enter your email or username.
  • You will get an email with your new password within a few seconds.
  • Use the password to log in.
  • Once you’ve logged in, change the password.

Using MySQL Command Line

If you’re familiar with the MYSQL command line, you have good news. You can use the command line to change your WordPress password as well. 

However, it will require you to generate a hash key of your password using Python or any other hash key generator. This method allows you to change your password by simply following the steps below:

  • Log in to MySQL using: “mysql -u root -p.”
  • Enter your password.
  • “use (name of database)”
  • “show tables;” (Note: look for table name with “users” at the end)
  • “SELECT ID, user_login, user_pass FROM (users-table-you-found);” 
  • “UPDATE (users-table-you-found) SET user_pass=”(hash-key-you-generated)” WHERE ID = (id#-of-account-you-are-resetting-password-for);”
  • “SELECT ID, user_login, user_pass FROM users-table-you-found);” (Note: to confirm that the new password works)
  • Press Ctrl-D to exit MySQL.

Using phpMyAdmin

Sometimes all you have is the phpMyAdmin access of your database. In such a case, if you want to change the password of your website, you can follow the steps mentioned below:

  • Log in to phpMyAdmin using the login credentials.
  • Click on “Databases.”
  • You will see a list of databases. Choose your WordPress database. 
  • All the tables in the database are listed. Click on “Structure” if the tables are not listed.
  • Look for the table with “users” at the end.
  • Click on the “Browse” icon.
  • Find your username under user_login.
  • Click the edit icon.
  • You will see the user_id. Click on Edit. 
  • Delete the password under user_pass and type in your new password. (Note: Remember the password is case-sensitive)
  • Once enter the new password, click the dropdown menu and select MD5 from the dropdown.
  • Hit the “Go” button.
  • Check if the new password works.

Using FTP

An FTP can allow you to reset and change your password with ease. If you can log in through your FTP using the admin user, you can easily change or reset the password. Follow the steps below:

  • Login and download the active theme’s function.php file.
  • Open it using any code editor and add the following line in the very beginning after the PHP tag.
wp_set_password( 'password', 1 );

(Note: Add your new password in “password” and 1 is the user ID number in wp_users table)

  • Upload the edited functions.php file. 
  • Once you have logged in, remove the added code. Otherwise, the code will reset your password every time the page loads.

Using WP CLI

WP CLI is a command-line tool that allows you to manage your WordPress installation. Though it requires a basic understanding of how the command line works, it is easy to use. You can follow the steps below to use it:

  • Get into your /WordPress directory and type “$ wp user list.”
  • Check out all the users and find the one for which you want to change the password.
  • Update user by typing “$ wp user update 1 –user_pass=$UP3RstrongP4$w0rd.”
  • Replace 1 with the user_ id you want to update.

Using the Emergency Password Script

Finally, if none of the above methods work for you, you can use the Emergency Password script. It is a PHP script that requires you to know the administrator’s username/email. Once the password is updated, you will be notified through email. 

To work with the emergency password script, you need to place it in the root of your WordPress installation. Please follow the steps below:

  • Copy the emergency script from Emergency Password Script and paste it in an emergency.php file. Then, place it in your WordPress installation.
  • Open
  • Enter the administrator username (admin) and the new password. 
  • Click Update options.
  • You will get an email in your admin email with the changed password information.
  • Once you’ve logged in, you can delete the emergency.php from your server for security reasons. 


Now, anytime you need to change your WordPress password, you can do so with ease. Learn and use a suitable method for changing your password accordingly.

Different plugins can help you change or reset your password easily for WordPress. You can choose one of the plugins that are best suited for you. However, the above-listed methods are easy to follow and keep you free from the hassle of finding the right plugin.

We hope you find this article useful. Let us know if you face any trouble while trying out these methods. We are always here to help. But, before that, please read the instructions carefully and follow the steps thoroughly.

Also, check out our articles on WordPress Admin Dashboard to get to know more about the features of WordPress.

About the Author

Nabin Jaiswal

Nabin Jaiswal is the co-founder of CoachPodium, WP Delicious, and other WordPress products. With over six years of experience in WordPress, he is passionate about writing and sharing his insights with the community. Nabin is committed to contributing to the community through knowledge-sharing and innovation. He has also had the privilege of being a speaker at multiple WordCamps, sharing his expertise and experiences.

View All Posts

Leave a Reply

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