How to Reset Your WordPress Password

100% Uptime SLA, 24/7/365 Live Support & Fast Cloud Servers

We've all been there, you've gone to login to your WordPress Admin area and you can't remember your password.

Don't panic! There are 5 different methods you can use to reset your WordPress admin password and we'll go through each in this article. The first method is the easiest, with the last being the hardest.

Changing a password vs resetting a password

Changing and resetting your password both lead to the same result, an updated password that you know.

Changing the password is something you can do yourself in the WordPress system. There are 2 methods to do this - changing the password on your profile and changing the password in the MySQL database using tools like phpMyAdmin

Resetting your password is slightly different where you use the forgotten password functionality to generate a new password for you.

Changing your WordPress password with access to your dashboard

To change your WordPress password when you are logged in, hover over your name top right on the WordPress dashboard and click "Edit My Profile".

Under account management, you can click generate password and then save.

Resetting your WordPress Password with an Email

If you have your account linked to a valid email address that you can access, you can use the built in Forgotten password functionality in WordPress.

Simply visit the WordPress login and click the Lost your Password? link at the bottom

Alternatively, you can go directly to (change to your domain name).

Once on the password reset page, enter your email address, or your username and click on the "Get New Password" button.

You will receive an email to the email address associated with your WordPress admin account. The email will contain a link, when clicked it will allow you to enter a new password for your account.

Once complete, you can now access your WordPress admin area via the login page.

Resetting your WordPress admin password with phpMyAdmin access

If your web hosting service has a control panel with phpMyAdmin access you can login and reset your WordPress password manually.

To first understand the structure of the database it's important to know the format of tables:

When logging into phpMyAdmin you will see tables with a prefix, often this prefix can be different but you should see tables with the following format


Some examples of this may be

wp_posts or wp2_posts
wp_options or wp2_options
wp_users or wp2_users

In our case, our tables are wp_<tablename>

To reset your WordPress admin password with phpMyAdmin you will need to find the _users table.

When you have found your user, click edit.

You will see a row with the name user_pass.

firstly, before you type the new password into the value column, it's important to select md5 from the functions column.

Once you have selected md5, enter your password in the value column.

One thing to note, if your email is wrong, this is the best time to update it to an email address that you can access.

Reset your WordPress password with WP-CLI

If your WordPress hosting comes with WP-CLI, like ours, you can login and use it to change passwords.

firstly, login to SSH as you usually would and then navigate to your WordPress installation.

On WPOwl's hosting this would be:


From there you can run the following SSH command to list all your WordPress users

wp user list

From the list of users, you want to take a note of the user ID, for many sites as there may only be one user this is likely to be a 1.

When you have the user ID, you can run the following command:

wp user update 1 --user_pass=newpassword

Reset your WordPress password with code

This last method is a little tricky, as it requires you to use either FTP or your control panel to edit your themes functions file.

To do this, you need to get access to your themes functions.php file.

We strongly recommend taking a backup of this file before changing it.

If you know your active theme name, browse to it in FTP or a file explorer in wp-content/themes/<YOUR_THEME/functions.php file and enter the following code just below the opening <?php

wp_set_password( 'password', 1 );

1 is the user's ID, if you don't know this you can check the database users table.

Once uploaded, load your website as normal and then try to login with the new password.

Once complete, make sure you delete this line in your functions.php.

And that's it! 5 different ways of changing or resetting your WordPress password.


Neil Skoglund
Avid WordPress fan and founder of WPOwl - home of the best managed WordPress hosting. Neil has 3 passions in life,  coding, guitars & family.

Leave a Reply

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

Registered in England and Wales with company number 12201331.

Registered Office: 252 High Street, Aldershot, 
United Kingdom, GU12 4LP
How to reset your WordPress admin passwordHow to reset your WordPress admin passwordHow to reset your WordPress admin password