How to change WordPress admin password from database with phpMyAdmin

If you have a WordPress site, there is a pretty big chance you will need to change your password frequently for security reasons. If you change your password quite often, it decreases the chance of someone else knowing the password and take control over it. So it’s always a good practice.

But what if you can’t remember what your last password was? Or your site is hacked? Or any other admin has changed it but didn’t inform you yet? Or you just lost it?

Definitely the first way you should try is resetting the password by clicking “Lost your password?” link under the WordPress default login form.
wordpress-login-form

Then you can put your username or email in the box and click on “Get New Password” button.
wordpress-reset-password

Your password reset link will be emailed to you. Easy, huh? But what if someone who has taken control over your account has changed your email address too?

In that case, you have to update your password from database. Let’s see how you can change your password in phpMyAdmin.

Login to your phpmyadmin and select the database from left column in case it’s not selected yet.
select-database

Then click on “wp_users” table. If you have custom prefix (like wp123_, wpabc_ etc.) then the table name will be “{your-custom-prefix_}users”.
wp-users-table

Now click on the “edit” link beside your username.
edit-entry-phpmyadmin

In the “user_pass” row, select MD5 from the dropdown (as WordPress use MD5 encryption for user passwords) and enter your new password in the textbox.
encrypted-password

Then click on the “Go” button at bottom-right.

Ta-Da! Your password is updated and now you can login with the new password in your WordPress Dashboard.

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *