Forgetting your password is something that happens to everyone. If you haven't logged into your WordPress site for a long time, as an administrator, you may accidentally forget your password. The good news is that there are several ways to retrieve or reset your WordPress user password.
![图片[1]-WordPress重置密码的多种方法,预防你忘记后台密码-光子波动网 | WordPress教程、Elementor教程与故障修复](https://www.361sale.com/wp-content/uploads/2024/07/2024071303143359.png)
1. Changing passwords through other administrators
If you have other administrators on your WordPress site, you can ask them to help you change your password. The steps are as follows:
1. In the WordPress backendLeft MenuIn thesubscribers -> all usersThe
2. Find your username in the list of users and click on thecompilerThe
![图片[2]-WordPress重置密码的多种方法,预防你忘记后台密码-光子波动网 | WordPress教程、Elementor教程与故障修复](https://www.361sale.com/wp-content/uploads/2024/07/2024071303000357.png)
3. In the new page, scroll down to theSetting a new passwordsection, clickbuttonsThe
![图片[3]-WordPress重置密码的多种方法,预防你忘记后台密码-光子波动网 | WordPress教程、Elementor教程与故障修复](https://www.361sale.com/wp-content/uploads/2024/07/2024071303022472.png)
4. Use the generated new password or enter a commonly used password. It is recommended to have a password strength ofunyieldingto ensure that WordPress SecurityThe
5. Clickupdate a userButton.
![图片[4]-WordPress重置密码的多种方法,预防你忘记后台密码-光子波动网 | WordPress教程、Elementor教程与故障修复](https://www.361sale.com/wp-content/uploads/2024/07/2024071303033935.png)
2. Retrieve password by e-mail
If you remember your username or email, try using WordPress'Retrieve passwordFunction:
1. Open the WordPress login page (for example:https://www.361sale.com/(wp-login.php).
2. Click "Forgot your password?"Link.
![图片[5]-WordPress重置密码的多种方法,预防你忘记后台密码-光子波动网 | WordPress教程、Elementor教程与故障修复](https://www.361sale.com/wp-content/uploads/2024/07/2024071305511640.png)
3. Enter your username or e-mail in the new page.
![图片[6]-WordPress重置密码的多种方法,预防你忘记后台密码-光子波动网 | WordPress教程、Elementor教程与故障修复](https://www.361sale.com/wp-content/uploads/2024/07/2024071305523346.png)
4. Open your mailbox and click on the email in theReset Password LinkThe
5. Inputnew passwordClicksave (a file etc) (computing)Button.
take note of: If your server cannot send e-mail, this method will not work. You can set up an SMTP mail server for subsequent use after modifying it through other methods.
Retrieve your password by email, see "How to Reset WordPress Password When Email Access is Unavailable"
3. Setting a New Password from the MySQL Command Line
If you can log in to the server via SSH, you can set a new password using the MySQL command line:
1. Log in to the MySQL server using the mysql command line client: shell
mysql -u root -p;;
2. Select the database that corresponds to your WordPress site (e.g. wordpress_com):
use wordpress_com;
3. Use the UPDATE command to update the password (the plaintext password in the example is "123456"):
UPDATE wp_users SET user_pass = '$P$B6Hfv7awfwI57yNk5Bh8Opuz0MoKlS.' WHERE ID = 1;
4. Change password via phpMyAdmin
If phpMyAdmin is installed on the server, you can reset the user password through it:
1.Login phpMyAdminThe
![图片[7]-WordPress重置密码的多种方法,预防你忘记后台密码-光子波动网 | WordPress教程、Elementor教程与故障修复](https://www.361sale.com/wp-content/uploads/2024/07/2024071305573895.png)
2. Select the WordPress database and find the wp_users tableThe
![图片[8]-WordPress重置密码的多种方法,预防你忘记后台密码-光子波动网 | WordPress教程、Elementor教程与故障修复](https://www.361sale.com/wp-content/uploads/2024/07/2024071305575418.png)
3. Edit the users who need to change their passwords, double-click password for the user_pass fieldThe
4. Enter the WordPress encrypted password string.Save ChangesThe
For more information, see "Reset WordPress Password with Pagoda Panel and phpMyAdmin"
5. Reset password via FTP
If you can log in to the WordPress site's FTPYou can use the wp_set_password function to change the password:
1. Login to the website through FTP and download the theme of the functions.php fileThe
2. Edit the file infirst <?php beyondAdd the following code:
wp_set_password('123456', 1);
Where "123456" is the password to be set and 1 is the user ID.
3. Upload the modified file back to the website.
4. Refresh the home page of the website, the administrator password will be changed to "123456". After logging into the background, delete the added code so that the password is not reset every time you open the page.
To reset the password via FTP, see "Easy way to reset WordPress administrator password using FTP"
6. Changing user passwords from the WP CLI command line
The WP CLI is a command line tool for managing WordPress sites:
1. Go to the WordPress site directory and enter:
wp user list
This command will list all users and find your user ID.
2. Update user passwords:
wp user update 1 --user_pass='$P$B6Hfv7awfwI57yNk5Bh8Opuz0MoKlS.'
Attention:The password "123456" set in this article is for demonstration purpose only. After you change your password, please login to WordPress backend and change your password. It is recommended to use a complex password and use a password management tool (e.g. Chrome's built-in password management tool, 1Password, Enpass, etc.) to memorize your password so that you can avoid forgetting your password and not being able to log in to your website.
With these methods, you can easily retrieve or reset your WordPress administrator password to ensure site security.
Link to this article:https://www.361sale.com/en/13528/The article is copyrighted and must be reproduced with attribution.
















![表情[wozuimei]-光子波动网 | WordPress教程、Elementor教程与故障修复](https://www.361sale.com/wp-content/themes/zibll/img/smilies/wozuimei.gif)
![表情[baoquan]-光子波动网 | WordPress教程、Elementor教程与故障修复](https://www.361sale.com/wp-content/themes/zibll/img/smilies/baoquan.gif)

No comments