Manually Reset Your Password:
The problem. In order to protect their blogs, people often pick strong passwords, such as u7*KoF5i8_. Of course, this is a good thing, but I have heard many stories of forgotten admin passwords.
The solution. When you lose your password, WordPress can email you a link to reset it. But if you don’t have access to the email address recorded in the WordPress database anymore, or if you prefer just running a simple command instead, here is the hack.
- Log in to your phpMyAdmin, select your WordPress database and open the SQL window.
- Insert the following command (assuming your username is “admin”):
UPDATE `wp_users` SET `user_pass` = MD5('PASSWORD') WHERE `wp_users`.`user_login` =`admin` LIMIT 1;
- You’re done. Your password has been successfully replaced by whatever you inserted in space above marked “PASSWORD.”
Explanation. User passwords are stored in the wp_users table. Of course, an MD5 hash is used to secure the password.
We have to set up an “UPDATE” SQL request and use the built-in MD5() MySQL function to convert our password to MD5 and then update it. The “WHERE” clause ensures that we’re updating only the admin’s password. The same request without the “WHERE” clause would result in all passwords being updated!