How to Change Your WordPress Password Without Email Access

How to Change Your WordPress Password Without Email Access

We all forget passwords.

It’s easily done — if you’re sensible and have different passwords for different accounts, keeping track of what’s what can be tough.

Usually, resetting a forgotten password in WordPress is simple enough. You just click on the little “Lost your password?” link below the login box, and a password reset link will be sent to your site’s registered email address.

But what if, for whatever reason, you can’t get access to that email account? This was something that I experienced recently, and as you might imagine, I was rather keen to discover a resolution. Today, I want to share my findings with you.

ManageWP Users Need Not Fear

If you are a ManageWP user, as long as you can gain access to your account, you do not need to worry about losing passwords for your individual sites.

After all, you can access any of your sites registered to ManageWP directly from your dashboard, which means that you can change any password to something a little more memorable with just a few clicks. Furthermore, you can use our bulk user management feature, which allows you to add and remove users, change multiple passwords, and plenty more.

So, ManageWP users get a free pass when it comes to forgotten passwords. But what if you are not a ManageWP user at the moment?

Using phpMyAdmin to Change Your Password

As long as you can gain access to your hosting account, don’t sweat it. With just a few simple steps, you can change the existing password to a new one, which will allow you to log into your WordPress site as per usual.

1. Identifying Your WordPress Database

If you do not know the name of the database which relates to the site you are unable to gain access to, you will first need to identify it. If you do know the name of the database, you can skip this step.

You will need to access the root directory of your website — either via your hosting provider’s File Manager (located on the cPanel), or via an FTP client. Either way will work fine. The file you are looking for within your site’s root directory is “wp-config.php” — go ahead and open it up.

Within that file you will see a variable identified as “DB_NAME”, like this:

DB_NAME

The value of that variable is the name of your site’s database. Make a note of it.

2. Locating Your Password in phpMyAdmin

Log into your hosting provider’s cPanel and locate phpMyAdmin:

phpMyAdmin

Once logged into phpMyAdmin, click on the “Databases” tab, followed by the name of the database that relates to the site you are unable to gain access to. You will be presented with a list of tables like this:

WordPress Tables

Click on the “wp_users” table. You will now be presented with a list of users registered to your site:

WordPress Users

Click to edit the user whose password you wish to change, and you will be presented with a list of variables relating to that user — the most important of which is “user_pass”.

3. Changing Your Password

If you look at the data contained within the “user_pass” variable, you will see that it is encrypted:

user_pass

In order to replace this, you will need to generate your own encrypted password. Fortunately, doing so is a piece of cake — just head over to the MD5 Encryption website, enter your chosen password into the relevant box, and hit “Encrypt It!”:

MD5 Encryption

Obviously, I recommend that you use a secure password, with random words or characters, numbers, symbols, and random capitalization.

The tool will spit out an encrypted password, which you can then copy and paste into the “user_pass” field in phpMyAdmin. Once you’re done, just hit “Go” at the bottom of the screen.

That’s it! If you head back to your WordPress site’s login screen, you will find that your new password will work!

Creative Commons image courtesy of Freddy The Boy

Tom Ewer

Tom Ewer is the founder of WordCandy.co. He has been a huge fan of WordPress since he first laid eyes on it, and has been writing educational and informative content for WordPress users since 2011. When he's not working, you're likely to find him outdoors somewhere – as far away from a screen as possible!

16 Comments

  1. Nick

    Since all the comments on this blog are pretty old, I just wanted to confirm that this method still works for resetting a wordpress password in 2021. The link for MD5 encryption in the article doesn’t work anymore, but you can easily find an alternative site by googling for one. Thanks!

  2. Cony

    Hello, I run an e-learning course (with buddypress). I am not legally allowed to change the e-mail addresses for my users. Do you have a suggestion how a user without access to his e-mail account (e.g. old company address) can change his profile e-mail address? Thank you very much!

  3. Sujit

    http://md5encryption.com/ is not working. any alternatives?

    1. Marko Tanaskovic

      MD5 is indeed not recommended anymore. Most php installations include the hash extension. The best choice for a hash function would currently be SHA-512. You can use SHA-512 with the following function:

      Or you can try using something like MCrypt (http://php.net/manual/en/book.mcrypt.php).

  4. Pax

    Thank you so much. You sir are a legend.

  5. illy

    Thank you ???

  6. Patrick

    Thank YOU! After an update from windows that obliterated my settings I lost the password and could not get into the site. Using your instructions here I was able to reset the account and get back into the site. A golden tip-o-the-hat to you good sir!

  7. Gourav Rathore

    Hello,
    I have read your blog. Its really helpful for me. I have an account on WordPress. I wanted that what is username but I forgot my login password. And by this blog, I understood very well that how I can get my new login password.
    So, Thank you for sharing this blog with us.
    Thanks a lot.

  8. tanya raj

    It worked for my blog. Thanks!!

  9. Melissa

    Thanks for the step by step. I can now revive my dead blog when i couldn’t remember my password

  10. aris

    really thanks bro

  11. Brand swift

    This is an amazing tutorial, thank you so very much! My web designer had tried to mess things up for me but am glad my site http://brandswift.com/ is out of his danger as I have changed the password, can never have access!

  12. Mukul Bansal

    Your post helped me recover my wordpress site’s password. Thank you soo much 🙂

    1. Tom Ewer

      Author

      You are more than welcome Mukul!

  13. Piet

    using an example with the username “admin” is just wrong

    1. Tom Ewer

      Author

      This is a post that teaches you how to change your password when you don’t have access to your email account. It’s not a post that recommends what username you should use.

Leave a Reply

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

Over 65,000 WordPress professionals are already using ManageWP

Add as many websites as you want for free, no credit card required. Sign up and start saving time!

Have questions? Get in touch!

Over 65,000 WordPress professionals are already using ManageWP

Add as many websites as you want for free, no credit card required. Sign up and start saving time!



Have questions? Get in touch!

Over 65,000 WordPress professionals are already using ManageWP

Add as many websites as you want for free, no credit card required. Sign up and start saving time!



Have questions? Get in touch!

Over 65,000 WordPress professionals are already using ManageWP

Add as many websites as you want for free, no credit card required. Sign up and start saving time!



Have questions? Get in touch!