Change A WordPress User Password in the Database
Ever lost your password to your WordPress setup and couldn’t login because the password reset mail took its time to arrive? Maybe you didn’t lose your password but wanted to configure Cloudflare’s Universal SSL on your site and your login process got stuck in a redirect loop?
Yet you urgently need to login to WordPress and there’s no other admin account available to resort to. Fear not, with access to your database you can easily fix the issue and overwrite your WordPress user password.
Most likely your hosting platform will have cPanel, complete with phpMyAdmin, making this process easy and definitely less daunting for most users than doing this via SSH/command line would be.
How to Reset a WordPress Password in the Database
Important: We recommend everybody to first backup their database – and also WordPress files – before proceeding.
First of all, you will need into your cPanel account[1^], and then proceed the phpMyAdmin section.
In your phpMyAdmin, find the database used for your WordPress installation and navigate to the
users table, find the user you wish to change the password for and double click on their password, in the
user_pass column. Now you can change the password for that user account.
WordPress doesn’t store password in plaintext in the database, instead they are stored as a MD5 hash. Thus you will first have to hash the new password before entering it in the database.
There are many free MD5 hash generators available online and most are easily accessible via your preferred search engine.
Here at rockingWP, usually we use TimeStampGenerator’s MD5 tool.
Once you have generated the MD5 hash for the new password you wish to use, paste this hash in the appropriate field in the
user_pass column for that user and hit
That’s all there is to it, you can now login with to your WordPress installation with the new password.