How to Change or Reset a WordPress Password (2022)

Reset wordpress password

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?

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? 
You need to clear your browser cache and try again.
How do I reset my password without email access?
You can try several methods such as SQL statement, getting the functions.php file through FTP, or changing the password through phpMyAdmin. Note that these are advanced techniques that require knowledge of WordPress filesystem and database management. 

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 2022 (Expert Pick).

Not using LoginPress yet? What are you waiting for?

Leave a comment

Your email address will not be published.

triangular shape yellowish icon

Frequently Asked Questions (FAQs)

These FAQs answer the most common questions about our WordPress custom login page plugin.

three shapes icon

Is LoginPress WPML Compatible?

LoginPress is fully supported with multilingual. LoginPress is also compatible with WPML Plugin, which means you can easily translate your login page with WPML plugin according to the given translation options in the WPML plugin.

Is LoginPress translation ready?

Yes, LoginPress has full translation and localization support via the LoginPress textdomain. All .mo and .po translation files should go into the languages folder in the base of the plugin.

Is coding skills needed to use LoginPress?

No, It is very easy to setup. Just plug and play. Have fun!

How to Install or Use LoginPress Pro?

Step-by-step instructions on How to Upgrade from existing Free version to Pro
1. You have installed and set up the Free version already.
2. Upload the Pro version.
3. Pro features will be enabled automatically.
4. You don’t need to set up Free version options again.
5. Setup Pro features like Google fonts, Google reCaptcha, Choose themes, etc.

Where is my license key?

License key is the Order ID which looks like in this format.
WHI150807-1234-12345
You can find it in the email Sales Receipt.

three shapes icon

If you Still have Questions?

Get In Touch