{"id":10851227,"date":"2018-11-06T02:52:42","date_gmt":"2018-11-06T02:52:42","guid":{"rendered":"https:\/\/wordpress.org\/support\/?post_type=helphub_article&p=10851227"},"modified":"2024-06-08T18:41:58","modified_gmt":"2024-06-08T18:41:58","slug":"reset-your-password","status":"publish","type":"helphub_article","link":"https:\/\/wordpress.org\/documentation\/article\/reset-your-password\/","title":{"rendered":"Reset your password"},"content":{"rendered":"\n
In WordPress, there is more than one way to reset your password. (Normally, the easiest way to reset it is through the “Lost your password?” link on the main login page for your blog or website.)
\nHowever, there are certain times (especially if your email isn’t working correctly) that you may have to take different steps to reset your password.<\/p>\n\n\n\n
Here’s a list of different ways to reset a password. The method that you use depends on the type of access that you still have to your website.<\/p>\n\n\n\n
To change your password in current versions:<\/p>\n\n\n\n
\n\n Your new password becomes active immediately.\n\n<\/p>\n\n\n\n
If you know your username or the email account in your profile, you can use the “lost password” feature of WordPress.<\/p>\n\n\n\n
Note: if you have a recent version of MySQL (version 5.x?) you can have MySQL compute the MD5 hash for you.<\/p>\n\n\n\n
Note that even if the passwords are salted, meaning they look like $P$BLDJMdyBwegaCLE0GeDiGtC\/mqXLzB0, you can still replace the password with an MD5 hash, and WordPress will let you log in.<\/p>\n\n\n\n
This article is for those who have phpMyAdmin<\/a> access to their database. Note: use phpMyAdmin at your own risk. If you doubt your ability to use it, seek further advice. WordPress is not responsible for loss of data.<\/strong><\/p>\n\n\n\n There is also an easy way to reset your password via FTP, if you’re using the admin user.<\/p>\n\n\n\n WP CLI is a command line tool for managing your WordPress installation.<\/p>\n\n\n\n\n
<\/a>
\n
<\/a>
\n
<\/a>
\n
<\/a>
\n
Other Tutorials using phpMyAdmin<\/h3>\n\n\n\n
\n
Through FTP<\/h2>\n\n\n\n
\n
<?php<\/code>
wp_set_password( 'my_new_password', 1 );<\/code>
In the above code, replace the text my_new_password<\/code> with your own new password for the main admin user. The number
1<\/code> above refers to the user ID number in the
wp_users<\/code> database table. Since we wanted the user ID of the main admin user, we just keep the number as
1<\/code>, which is typically the user ID of the main admin user.<\/li>\n\n\n\n
Through WP CLI<\/h2>\n\n\n\n
\n
$ wp user list
<\/code>
to see all users. Find the ID of the user you’d like to update.<\/li>\n<\/ol>\n\n\n\n\n
$ wp user update 1 --user_pass=$UP3RstrongP4$w0rd
<\/code>
replacing “1” with the id of the user you want to update.<\/li>\n<\/ol>\n\n\n\n