Resetting Your WordPress Password in the SQL Database
Locked out of your WordPress site? Having trouble resetting your password? No problem!
It can be extremely frustrating trying to log in over and over again only to have WordPress deny all of your attempts because you forgot your password. Sometimes if you have an overly-complex password, or it’s been a while since you’ve logged into a site, it can be very hard to remember your password. You can try and get your site to send you a password reset link, but that doesn’t always work or you might not have access to the administrator email that you used for the site (or you might not remember what that is was).
Luckily, since WordPress passwords are stored in the site’s SQL database, it’s really easy to reset them if you have access to the hosting control panel or SQL database.
One quick thing to note: you may see a few affiliate links on this page in different places. These links help us to keep publishing content that visitors can read for free and don’t influence or change opinions about hosts at all.
Here’s how to reset your WordPress password in the SQL database:
1) Log into your hosting control panel or connect to your SQL database. With some hosts, you’ll log into cPanel, Plesk, or another type of control panel to access your database. With other hosts, you might access your SQL database directly with some other type of software like Microsoft Access.
2) Click on phpMyAdmin (or whatever interface you use to load your SQL database), then select your database to view the tables.
3) Choose the wp_users table. If you’ve changed the table prefix, then find the “blank_users” table and open it—in this situation, “blank” will be replaced with whatever your table prefix is instead of “wp_” which is what WordPress uses by default. So, your table name could be “12389712asd_users” or something similar—just look for the users table with either a custom prefix or the “wp_” prefix.
4) Click “Edit” to open the user database and delete the current password in the “user_pass” box. Then type your new password.
5) Click the dropdown box next to the password box and select “MD5” in order to covert the password to an MD5 hash. This allows WordPress to store the password in a cryptographic form which is a more secure. If you don’t select MD5 after typing in your password, resetting it will not work as WordPress can’t read the password from the database as a string (plain characters). Then click the “Go” button in order to execute your change. Then test your login to see if it works.
Regardless of the type of SQL setup you have, this should change your password without having to reset it via the email function. Again, in order to make this work, you need to have access to the server admin panel and the SQL database since that is where WordPress stores the user passwords.
If you tried this and it didn’t work, go back and double check that you typed the exact same password in the WordPress prompt as you entered in the database. Also, you may have skipped the MD5 setting in step number five. If the password change didn’t work, try steps 1-5 again—errors usually come from missing one of these two things.If you’re still having trouble, you should contact your hosting company to see if they can help you with resetting your WordPress password.