How to Recover your WordPress Password using the Database

For many reasons, WordPress users can lose their passwords, if they are not keeping them in a safe place. In other cases, bloggers want to do something in their databases, and they accidentally lose access to their admin area. So, the password or the username, is not correct, through error messages that they get.

The good news is that you can recover your WordPress admin password, and username, from the PhpMyAdmin database. It’s the safest way to edit your password without modifying your blog files or adding complicated scripts that can damage the entire site if mistakes happened.

Before starting, make sure you have a cPanel account. From there, you can access the PhpMyAdmin tables, and modify the user or admin details from there.

To begin, log in to your cPanel, and locate the phpMyAdmin icon, then, click on it, and you will open the page, as the following screenshots.

recover wordpress admin password

Now, in your database tables list, click the one that your actual WordPress site uses, and you will get all its tables on the right side as the next example.

phpMyAdmin tables

Next, you need to find a table called “wp-users”. Please note that this is valid only if you have not configured a custom database prefix, the default prefix in WordPress is “wp”.

So, if your database prefix is “lo” for example, your user’s table will be “lo-users”. Anyway, we are talking about a single table, where the word “users” is included, in the end, and you will easily find it as the highlighted example in this screenshot.

WordPress users passwords

As you can see, you have the exact table that stores all your WordPress users, usernames, and passwords. So, you can start browsing it by clicking the “Browse” option.

browse WordPress users

Now, you can find or change your WordPress password by clicking the “edit” option on every user’s table as the next example.

How to Reset WordPress Password in PhpMyAdmin

On the next page, you will get your username, password, and all the details that come with every WordPress user and administrator. Please make sure that you’re again in the right database.

If you have many databases, you can find the exact one used in your actual WordPress site. You can find that in the “wp-config.php” file. Or, simply follow the post: how to find your actual WordPress database name.

Related:  Unable to Add Links in WordPress Posts or Pages? here is How to Fix it

When you are in the user’s details, you will notice that the password is encrypted, and it’s not the same as the real one.

password

That’s security protection that WordPress use and they encrypt your password with MD5 (message-digest algorithm).

If you just want to see your password and recover it in order to log in again, you need to convert that MD5 password to the real one. You can do that with online descriptor tools like http://md5.gromweb.com, you need to add your hidden password, and the system will show you the real one.

MD5 to text

You can get your real password as shown in the above example, and then, login again to your WordPress admin area with it.

If you want to change your password and create a new one, you can use the above tools to create an MD5 password. Or simply encrypt it automatically in phpMyAdmin, by selecting MD5 from the list, and then, enter your new password that will be encrypted as the following example.

create new WordPress Password

When you’re ready to apply the new password after saving it in a safe place, click the “Go” button, and WordPress will save the changes, so, you can log in with your new details.

Avatar for Fathi Arfaoui
About Fathi Arfaoui

Fathi Arfaoui is a Physicist, Blogger and the founder of Trustiko.com. He shares Business, WordPress and Blogging tips to build a better blog and succeed online.

Disclosure: The recommendations on this page are my own based on my tests and analysis. We may earn a small commission from web hosts and other partners if you use my referral link to make a purchase. That’s what helps us to maintain the site and add fresh content, Thanks for your support.

Leave a Comment