How to reset a lost WordPress password: If you’ve lost or forgotten your WordPress admin password, you can easily reset the password. Either use the following MySQL statement to reset your WordPress admin password, or change it through
Use either phpMyAdmin or mysql’s command-line.
The following MySQL statement resets your WordPress password to default. Don’t forget to set a new password after logging on to your WordPress Dashboard through your Profile settings:
UPDATE `wp_users` SET `user_pass` = md5( "default" ) WHERE `id` = 1;
wp_ to your WordPress MySQL table prefix. You can look up the WordPress user ID with the query:
SELECT * FROM wp_users;
If you don’t have direct access to your MySQL database, and you wish to reset your WordPress admin password through FTP, follow the following steps:
- log on to your website using FTP, and download your theme’s
- edit the
functions.phpfile, and add on the second line (right below
wp_set_password( 'default', 1 );. This will set the password to default for the user with ID “1”.
- upload the file back to your website, to its original location
- log on to your WordPress website using this new password, change your password through your Profile settings, and remove the code from
functions.php. Otherwise your password will be reset each time you try to login.
Or you can do the downloading, editing and uploading of
functions.php in one go, by editing a file through FTP. The article is in Dutch, but you can Google Translate the article or look at the screenshots.
Note: both methods set a new password using the old and insecure MD5 algorithm. This is not secure! Nowadays, the WordPress password hasher implements the Portable PHP password hashing framework, which is exactly the reason why you have to change the password as soon as possible after logging on.
If you know your username or the email account in your profile, you can use the “lost password” feature of WordPress. If all else fails, use the emergency password reset script.
Lost your Umbraco password?
My name is Jan. I am not a hacker, coder, developer or guru. I am merely a systems administrator, doing my daily thing at Vevida.
If you feel a post has helped solve your problem, or has saved you time, please consider making a donation. You can transfer a direct donation through Paypal or via bank wire-transfer IBAN: NL31 ABNA 0432217258 (Jan Reilink). Thanks!