How to reset a forgotten wordpress password
Step by step

Forgotten your WordPress password again?  There is no easy way to recover a forgotten WordPress password but there are plenty of ways to reset your password. Here are four of the easiest.

Method 1. The Builtin Method - The WordPress Login Page

This is the simplest method to reset a WordPress password and the first one you should try.  

If you can remember either your username e.g. admin (though you shouldn’t use that one, of course!) then go to the login page at https://<yoursite>/wp-admin

WordPress Lost Password Link

Click the Lost your password link below the login box and on the following page enter your username OR your email address.  

WordPress Lost Password Send Email

An email will be sent to the email address of the WordPress user's account.

WordPress Password Reset Email

Click the lower link in the email.  A browser window will open and you can enter a new password.

WordPress Enter New Password

WordPress will conveniently suggest a strong password for you.  If you use a password manager such as LastPass this will be useful.  Otherwise you can enter a password you're likely to remember so you don't have to go through these steps again.


Why This Method Might Not Work

  • If you can’t remember the  username or email address used for the account then obviously these steps won't help.
  • The email sent may not arrive.  This can happen if your server is not properly configured to send emails, if your server has problems sending an email or if you can't remember what email account is associated with the WordPress user name.
WordPRess cannot send email

If any of these happen then you can try the next Method to reset your WordPress password.

Method 2. Get Help From An Administrator

Every WordPress website has a user with Administrator access.  This means they can reset the password of any other user.  Simply get this administrator to reset your password.

The administrator should log in to the WordPress website, go to Users, click the name of the user who has forgotten their password. At the bottom of the page they can enter a new password for that user.

1.

WordPress Users

​2.

WordPress Reset Password

Once they click the Update Profile button the administrator simply lets the user with the forgotten password know what the new password is.  (A secure way to share passwords online is to use Privnote.)

This new password should work immediately for the user account with the forgotten password.

Why This Might Not Work

  • If you have no access to the administrator of the website then obviously this method won't help.
  • Also, the account whose password you've forgotten might be the administrator account!  If that's the only administrator account on the website then this method again won't help.

Method 3.  Reset The WordPress Password in the Database Using phpMyAdmin

WARNING - take care when editing your WordPress database.  If not done correctly, you can loose access to your entire site!

This method can be intimidating if you've never dabbled in your WordPress database before.  I've included it in the list of simple methods simply because most people have relatively easy access to their WordPress database via their hosting provider's control panel.

First, log into your hosting provider's control panel (on most hosting platforms this will be called cPanel).  Check with your hosting provider how to do this.

cpanel login

In cPanel go to phpMyAdmin

phpMyAdmin

Find your database name in the list of databases on the left.  (If needed, you can find the database name from your wp-config.php file in the root of your WordPress directory by using FTP.) LINK to NEW ARTICLE

Find the wp_users table (the name might be different but will almost always be something_users).

Find the user you want to change the password for and click edit.

wordpress wp_users table phpmyadmin

​The password is stored in the user_pass field

edit WordPress user in database phpmyadmin

Edit this user_pass field and under the Function column select MD5 from the drop-down list.  MD5 ensures the password will be encrypted when saved back to the database.

Type the new password in the Value column and click the Go (or similar) button.

Now the user should be able to log in as that user with the new password you just entered.

Why This Might Not Work

  • You might have no phpMyAdmin access to the WordPress database.

Method 4. Reset The WordPress Password Via FTP

This method, like the previous one, can also seem a bit intimidating if you aren't used to directly accessing your WordPress website files from the server directly.  But since most website owners will have some kind of direct access to their files, I'm including it here in the "easy" methods of recovering a lost WordPress password. We also have a post with more details on how to edit your WordPress files.

FTP, or File Transfer Protocol, is a method of connecting to the server where your WordPress website files are stored. Using an FTP client program, once connected you can download, edit and upload files from and to your website server. The FTP client I recommend is the free and open source FileZilla client.

Using your FTP client, connect to your WordPRess website server.  Exactly how to do this is beyond the scope of this article so you may need to check with your hosting provider to learn how to do this.

Once connected, you need to find the functions.php file of your WordPress site.  This is part of your WordPress theme and can usually be found in the directory wp-content/thems/<your-theme-name>/functions.php

Download the file and edit with your favourite editor - I recommend Notepad++ for Windows as a great free and open source all-round editor.

Add the following line of code to the functions.php file just after the first <?php tag:

wp_set_password (‘abcdef, 1’).

where abcde is your new password and 1 represents the administrator userid in your WordPress database's wp_users table.

Save the file and upload back to the server.

You should now be able to login to your site as the administrator and change the password to whatever you want.

Just remember to remove the added line of code from functions.php after you login and change your password!

That Should Do It!

And that's it.  I've successfully reset a forgotten or lost WordPress password with each of the above methods at one point or another.

If you haven't managed to reset your WordPress password with one of these methods then you'll need to get a bit more technical; watch out for part two of this post for those more advanced methods of resetting your WordPress password.

Did any of these methods work for you?  Still stuck?  Let me know in the comments ...

Want more articles like these?  

Subscribe to get the latest posts from the blog ...

  • by Seán
  • |
  • September 15, 2017
Click Here to Leave a Comment Below
Pretty - September 15, 2017 Reply

Thanks for this, I never knew you could reset your password via the cpanel. Good to know especially if you are the Admin for your WordPress site.

    strandsadmin - September 19, 2017 Reply

    Glad it helped, Pretty.

Leave a Comment: