How to Change or Reset a WordPress Password (2023)
Do you want to change or reset a WordPress password?
Chances are that you have lost access to your website. Don’t worry though because you can easily change or reset your WordPress password to enhance your website security and restore access to the WordPress Dashboard.
In this article, we’ll show you how to reset or change WordPress passwords.
Let's get started!
Table Of Content
- When do You Need to Change or Reset Your WordPress Password?
- The Difference Between Changing and Resetting your password
- How Can You Change or Reset WordPress Password?
- How to Create A Strong Password?
- Conclusion
- Frequently Ask Questions
When Do You Need To Change or Reset Your WordPress Password?
Users (including many website administrators) usually don’t want to change their passwords. Many come up with an easy-to-remember alphanumeric combination and then stick with it. However, there are scenarios where you need to change your password.
Let’s go through some of these scenarios.
It’s really important to keep your WordPress website secure. As you know, the password is the gateway to your website. Once it’s stolen, you may lose control of your website. The first line of defense is to immediately change your password to protect your information.
You Suffer a Security Incident
Websites get hacked mainly because hackers can steal or guess the credentials. In such cases, the first recommendation is to change the passwords. In many cases, this step is required to start the repair and recovery process.
You Forget Your Credentials
When you forget your credentials (username and password), you can no longer access your account. In such cases, you need to reset your password to restore access to your account.
The Difference Between Changing and Resetting Your Password
Changing and resetting the password might appear to be the same process because the outcome is the same - a new password for your account.
The difference between the two is the situation where you use a particular process. The process of resetting a password is used when the user no longer has the correct password for any reason. Usually, this happens when the user forgets the password.
In contrast, the password change process is usually used to change the password in case of a security incident. In such cases, the user often has the right password but needs to change it to block unwanted access to the website.
How Can You Change or Reset WordPress Password?
The idea of changing or resetting user passwords is a great demonstration of WordPress’s flexibility. There are several ways you can reset or change your WordPress account password.
Method 1: Change WordPress Password Through Email
You can use the Lost Password feature if you know the username of the registered email account associated with the profile.
To change the password, go to the WordPress login page and click Lost your Password.
You will see the Password Reset form where you need to put your username or the registered email address.
After a while, you’ll get an email with the password reset link. Click the link to see the Password Reset form.
Note: If you didn’t get this email, check the Spam folder.
Now get back to the WordPress website login page and use the new credentials to log into the website.
Method 2: Change WordPress Password Through the phpMyAdmin Database
If you have cPanel-based hosting and lost the password to your WordPress website account, you can easily change the password through phpMyAdmin.
Important: This method requires you to access your hosting account and access the database. If you don't have the required technical knowledge, we recommend you try other methods of password recovery.
Log into your cPanel account and go to the Databases section. Click phpMyAdmin to launch the database manager.
You'll see a list of the available databases. You need to know the database table prefix used by your WordPress website. Generally, it's wp_ but often administrators change the table prefix to protect the database. You can check the wp-config file to find out the correct prefix.
Next, find the user table (generally, it has users at the end of its name). Click Browse next to the table.
Now that you're in the table, find the username under user_login. Next, click edit. Go to the next column, user_pass, and type in the new password.
Next, select MD5 from the dropdown menu in the Function column. In the next field, enter the new password. Click Go to finalize the process. The new process is now encrypted with MD5 encryption and stored in the database.
Exit cPanel and go to the WordPress login page. Use the new credentials to log into the website.
Method 3: Change WordPress Password Through SQL Database
You can also reset your WordPress password through an SQL statement.
Important: This method assumes that you know database handling and SQL. If not, please try other methods mentioned in this article.
Go to phpMyAdmin (in your cPanel account) and select the WordPress database. Now from the top menu bar, click the SQL tab.
Enter the following SQL statement:
Remember to replace new_password with your new password and username with the current username.
UPDATE `wp_users` SET `user_pass` = MD5( 'new_password' ) WHERE `wp_users`.`user_login` = "username";
Click Go to update the password in the database.
Now go to the WordPress login page and use the new credentials to log in.
Method 4: Change WordPress Password Through File Transfer Protocol (FTP)
FTP is a very popular way of accessing WordPress website files. For this method, you need to connect to your website using an FTP client.
Very Important: This method modifies the functions.php file. This is a very critical file, and you should be careful when codifying it. If you haven't handled WordPress files before, we highly recommend trying other password recovery methods.
Once connected to the website backend, go to your theme folder (generally located at wp-content/themes). You'll find the functions.php in the folder. Download it to the local machine.
Very Important: As soon as the download finishes, make a copy of the file. If anything goes wrong, you can upload this copy to restore the original functions.php file on your website.
Open the files in the editor of your choice, go to the top of the file (under the first opening PHP tag <?php), and add the following snippet to it.
wp_set_password( 'password', 'username');
where the password is the new password, and the username is the current username.
Please save the file on your local machine and upload it to the correct location on your website.
Now go to your website login page and log in using the credentials you set in the snippet.
Come back to your local machine and reopen the functions.php file. REMOVE the code snippet, and save the file. Next, upload it to the website to ensure that the password is not reset every time you try to access the dashboard.
Tips for Creating a Strong Password
You'll be surprised to learn how few users create passwords that could stop hackers from logging into their accounts.
Creating strong passwords is easy. You follow a couple of simple ideas, and you're good to go!
How to Choose a Strong Password
A strong password is generally ten characters long and has both capital and small letters, numbers, and a special character.
WordPress has a comprehensive password quality policy that lists these requirements.
Another critical thing to remember is to never use your name or user name as part of the password.
The best passwords appear random but make sense to their owners. For instance,
- IpaBMWwlp#9231.
(I purchased a BMW with license plate # 9231.)
- H!Wrul4mnpd?
(Hey! Why are you looking for my new password?)
Use a Password Generator Tool
The Strong Password Generator tool is a great option for creating strong passwords. Just a few clicks. and your hard-to-break password is ready.
Conclusion: Reset WordPress Password
As you saw, it is easy to change or reset a WordPress password. All you need is a username or a registered email address. If you don't have the username, try to get it from the WordPress database.
You must create a strong password and change it frequently. This is especially important for admin users who have complete access to the entire website.
Frequently Asked Questions
What should I do if I reset my password, but WordPress doesn't recognize it?
How do I reset my password without email access?
That's all for the guide of resetting your password! You can also check our guide on How to Redirect Users After Successful Login in WordPress and 9 Best WordPress Login Plugins In 2023 (Expert Pick).
Not using LoginPress yet? What are you waiting for?