Are you looking to quickly reset the WordPress password from the database but not sure how to do it? If so, then you’ve come to the right place. In this case, we will show you how to quickly reset a WordPress password from the database, without using FTP or any cumbersome processes.
But why do we need to reset passwords from the database in WordPress?
It is not necessary to change the WordPress password directly from the database. However, sometimes we forget the username and password of a website, and then we are unable to login into our admin panel.
In cases like this, it’s much easier to change a WordPress user’s password from the database. All you have to remember is the password of your cPanel (or any other panel on your website), and you’re in.
So, let’s get started…
Where Passwords are Stored in the Database?
The WordPress database keeps the users’ and admin passwords in the wp_users table. Even if individuals gain access to your database’s stored passwords, they won’t be able to log in to your website since they’re all encrypted using their advanced encryption method.
The only way to reset your password and regain access to your website is by changing the user’s password hash in wp_users and setting a new password using the MD5 algorithm.
How to Reset Password in WordPress Database?
As I mentioned above, all the passwords get stored in your SQL database in a table with the name “wp_users” with proper encryption. In case you forget your password, the only way to regain access is by changing the password and saving the password in the MD5 encryption algorithm.
Here I’m sharing a quick way to do so – but before doing this, I highly recommend taking a backup of your SQL database using the method shared here;
To get started, you will need to log into your cPanel account (or whatever platform you are using for your website) and then select the “phpMyAdmin” option, as shown in the screenshot above.
This will bring up the SQL database where your websites’ databases are stored and then you will have to choose the database which belongs to the website you’re going to edit. For example, in my database, the name is “sunny_thewpx“, so I would like to open that database by clicking on the name.
Once you have chosen the right database, you will have to look for a table named “wp_users” (or something similar to that, since it may vary by host and we sometimes change the table prefix manually during installation but it will always conclude with the word “users“).
Now click on the “Browse” button to see all the fields, as shown in the screenshot above. Now you will have to look for a field named “user_pass” (it is usually after the 3rd or 4th field in the table).
Once you’re inside of “wp_users” table, browse the username for which you want to reset the password and then click on the “Edit” button. It will open a form with all the details filled automatically, as shown in the screenshot below.
You will now need to change the “user_pass” field with your new password (in normal strings like those shown in the image above) and select the MD5 algorithm from the drop-down list and click on the “Go” button.
If you’ve done everything correctly, it should show a success message and you should be able to log into your WordPress admin section using your new password.
That’s all for today, I hope you were able to complete this tutorial successfully and regained access to your website. If you have any queries about this tutorial or want to ask questions, please feel free to leave a comment on the box below.
I will do my best to respond to your questions as soon as possible. Furthermore, if you have any other method for resetting a WordPress password from the database or anything else you’d like us to know, please let us know in the comments section below.
Thank you for taking the time to read this! If you like it, please share it with your friends and family.
Have a great day!!!