Change WordPress password when ‘reset password’ is not working

Imagine a situation when you forgot the password of your admin account of your WordPress site, and 'reset password' is not functioning. Or even, you cannot remember the email you used for it. You cannot access the wp-admin area. Now what?

Well, there's a solution. You can change the password from phpMyAdmin without knowing previous password.

So, what is phpMyAdmin and where do I find this?
Okay, phpMyAdmin is a database administration tool that comes with most of the hosting services. You can find this from your cPanel.

Well, now what?
Open phpMyAdmin and choose the database that your WordPress uses from the list at the left. Click on it.
Choose the database
If you do not know the database name, open wp-config.php from root directory of the WordPress installation, maybe with an FTP client like FileZilla or from your cPanel's file manager. Then search for DB_NAME constant. It'll look like this-

Okay. Now after clicking the database name in phpMyAdmin, it'll expand database tables in the right side. Click on wp_users.
Click wp_users
This name may vary with any prefix instead of wp. It may be foo_users or bar_users or anything else.

Next, find your username that you want to change password of and click edit.
Find username and click edit
It'll open an editor page.

Now, you have to do a lot of things here! LOL!
Set new password
1. Choose MD5 from Functions column and user_pass row.
2. Type your new password in Value column and user_pass row.
3. Click Go.

Bah! You are done with this struggle. Now go login with your new password and have fun.

Feel free to ask me, if you have any questions. I appreciate if your share this post.