Imagine your WordPress password has been compromised and you no longer have access to your website and you are forced to use the “Forgot Password” option.
In this case, an email will be sent to you, including a link to reset the password. What would happen if you don’t have access to that email address? Or due to some issues, your website won’t send you an email? In such cases, your website is in serious danger.
Not only your security is compromised, but the security and privacy of your users are also compromised, and this is not what we are looking for.
Of course, these are just scenarios. But if for any reason you wanted to change your password, how would you do it? In this article, we will teach you to change your WordPress password from phpMyAdmin.
If you are interested in securing any of your WordPress posts, pages, or categories, please read our post on the best WordPress plugins for security passwords available on our website immediately.
Furthermore, you will learn how to customize your WordPress login page, how to optimize it, and which plugins will be most beneficial for you.
Why change your password from phpMyAdmin?
You may ask why we use phpMyAdmin to change our WordPress password instead of using the WordPress dashboard.
As you know, on your WordPress dashboard login page, you can click on “Forgot/Lost your password” in which case WordPress will send you an email to reset your password.
But what if for some reason we don’t have access to our email address? The safest way is to directly change your password through your WordPress database.
Change WordPress password from phpMyAdmin
To change the WordPress password from the database (phpMyAdmin), first, you need to open your cPanel. Then in the Database section click on phpMyAdmin.
Once you are in your database, look for your website from the tables. Once you click on the said table you will see a list. Look for {table-prefix}_users and right-click on it and click Browse. In the {table-prefix}_users that opens, you will see a row of options.
Scroll down and click on “Edit”. You will change your password on this page. On the new page that opens you can also see all of your user’s information along with their passwords.
In the user pass field, the value is the WordPress password which you can change. Also, don’t forget to set “Function” to MD5.
MD5 will encrypt your password. Once you are done, simply click on “Go To” to save the changes on your database and websites.
There is another route you can take, which is much simpler and easier, but still with phpMyAdmin. Follow the steps above and select {table-prefix}_users , then simply select SQL or MySQL from the toolbar and import the code below:
UPDATE `wp_users` SET `user_pass`= MD5('yourpassword') WHERE `user_login`='yourusername';
You just need to replace “yourpassword” with your new password and obviously replace “yourusername” to your actual username.
And finally, click on Go to save changes done to your database.
2 Comments Leave a Reply
I’m in xammp. Neither method worked for me after several tries, even closing and restarting the sql and apache.
You have to make sure the new generated password is correct and you are updating it correctly.