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.
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.
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.
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.
Now, you can find or change your WordPress password by clicking the “edit” option on every user’s table as the next example.
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.
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.
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.
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.
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.