How to reset WordPress Admin password from the database

The given information will describe how to reset the Password in case that does not work or due to any reason you have forget.

There are 3 ways to reset the password which we are mentioning here which can help almost everyone.

  1. Reset from the Forget Password request: You can simply go to the yourwebsite.com/wp-admin and try Forget Password at the below
  2. Reset the password from the PhpMyadmin: You can simply login to your hosting provider normally it will be cPanel or Parellel Plesk. We can go with the cPanel in this information, Once you logges in to your cPanel [Hosting account] Try to find “PhpMyadmin” and select the preferred database. Once you select the Database you need to find the table name “wp-user” it can be different if you have different extension like wc that it should be “wc-user” and select the password field with Option MD5 and put any of your password then click “Go” which will reset your password. You might not able to see the password as it is encrypted with MD5
  3. When you even loss the Username: It is very rare that you even lost the username as well, then you can create the users and insert the password with this simple query.
  4.  INSERT INTO `databasename`.`wp_users` (`ID`, `user_login`, `user_pass`, `user_nicename`, `user_email`, `user_url`, `user_registered`, `user_activation_key`, `user_status`, `display_name`) VALUES ('4', 'demo', MD5('demo'), 'Your Name', '[email protected]', 'http://www.test.com/', '2011-06-07 00:00:00', '', '0', 'Your Name');INSERT INTO `databasename`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, ‘4’, ‘wp_capabilities’, ‘a:1:{s:13:”administrator”;s:1:”1″;}’);

    INSERT INTO `databasename`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, ‘4’, ‘wp_user_level’, ’10’);

Rate This Article

(6 out of 14 people found this article helpful)