Latest WordPress Tutorials

8 Ways to Reset WordPress Password Safely

8 Ways to Reset WordPress Password Safely
Written by Muhammad Fayyaz

The password you entered for this user name is incorrect. Have you ever faced this issue and got fright Yes, this one warning could make you panic and make you feel that you are about to lose everything you have created on your site.

But don’t get panic; there are many ways to get your lost password back in WordPress. We try to teach you a different reset WordPress password in different scenarios if you ever forget.

Usually, you need to reset your WordPress password when you forget the password, and you don’t even remember the email, which helps you reset the password of your WordPress account.

  • Changing the Password
  • Why do you need to change the password?
  • How to change the password from the profile setting.
  • Why do we need to Reset passwords?
  • Methods to reset WordPress password
    • Reset Via email
    • Reset Via phpMyAdmin
    • Reset via MySQL Command
    • Reset via FTP
    • Reset Via WP CLI
    • Reset Via Emergency Password Reset Script
    • Softaculous Password Reset
    • Reset Non-admin users password
  • Problems After Password Reset
  • Conclusion

Changing The Password

Changing the password is different from resetting the password. When you change your password, you know the password you have set before and access your website and the setting panel. In simple words, if you know your current password, you can change your password.

Why do you need to change your password?

It is a good practice that you constantly shuffle your password with time because it makes your website more secure even if someone noticed your password, it doesn’t affect you because you change it in a while.

Sometimes you are working on your website in an environment where different people are working with you, and you don’t feel safe around them and thought they could access it, so you change it.

You often believe your password is not secure enough; that’s why you decide to change it. People change their Passwords even sometimes when it’s hard to remember, so they try to make more casual Passwords so they could remember.

Maybe the administrator has given you an account with the default setting, and you thought it’s not safe enough, so you replace it with yours.

How to change the password from the profile setting

You can easily change your password; if you have access to your website, you must do the following steps.

On the right upper corner of the WordPress dashboard, Go To> User Settings.

8 Ways to Reset WordPress Password Safely

8 Ways to Reset WordPress Password Safely

Click on, Edit Profile > Add a new password.

8 Ways to Reset WordPress Password Safely

After adding a new Password, you should copy it to a safe place or in a file so in case you forget again, you already have a backup of this password.

Below you will see an option> Update Profile. Click on this link, and your password is updated now.

8 Ways to Reset WordPress Password Safely

Why do we need to Reset passwords?

In changing the password case, you already have access to the account, and then you change it by your wish. But

that’s not the same in the resetting scenario. You reset your password when you forget your password or email and lost access to your account.

There are different methods to do that we will discuss each possible process with a detailed explained scenario and describe each step.

Methods to Reset WordPress password

There are different scenarios when you lock out and forget your password and are unable to access your WordPress. So first thing you can do if you ignore the password but remember your email.

Reset Password via Email:

It often happens when you forget your password but remember the email; you can reset your password. For this, you have to remember the email you have entered while setting up your WordPress. You will receive your password reset link in your email.

Put your website’s URL with extension wp-admin like www.sample.com/wp-admin. Will you find an option under the login text area ” Forget your password. ”
reset wordpress password

You will be asked for the email associated with your WordPress so that WordPress could send you a password reset link at your email address.

8 Ways to Reset WordPress Password Safely

Now login to your email, and you will see an email from WordPress with Password reset link; click on it. Now you can enter your new password.

That’s it; you can now login to your WordPress with your email and new password.

Reset Password Via PhpMyAdmin

We suppose you have an email in the previous method, but what happens if you ever lost both email and password What will you do clueless? We will show you different ways of how to reset the WordPress password in the database.

It is a direct password change method, so you have to play with the database and go into little bit deep into Cpanel.

Making changes to the database table could be dangerous, or you can even break your website because your website’s whole data resides there. So we recommend you hire an expert to perform this task.

Login to your Cpanel.

After login, you have to click on the PHPMyAdmin option lying under the database section.

8 Ways to Reset WordPress Password Safely

You will see a list of databases; you have to select your database.

8 Ways to Reset WordPress Password Safely

Now a list of tables will be in front of you; click on the wp_users table here.

8 Ways to Reset WordPress Password Safely

Wp-users is the default WordPress database table that stores data of the users in it. But sometimes, it stores data with different prefixes like wp30_users or something like that.

The users’ list will appear in front of you, and click on the edit option corresponding to your user name.

8 Ways to Reset WordPress Password Safely

Now you will see multiple options regarding the user; you need to work on user_pass under the user_login row.

8 Ways to Reset WordPress Password Safely

You will see your password in the user_pass row, Select and change the function to MD5, and then enter a new password. Now click on Go, and this is it your password has been changed.

Your password has changed. You can now go back to WordPress login and enter your new credentials.

Reset WordPress Password Via SQL

If you have technical knowledge and know-how about languages and queries, you have another option to reset the WordPress password in your website’s database.

To use this method to reset the WordPress password, you have to know SQL language queries.

You can simply Go to PhpMyAdmin, and in the upper bar, you will find the SQL option; click on it.

8 Ways to Reset WordPress Password Safely

Here a coding page will appear in front of you, where you can put this SQL Statement.

UPDATE ‘wpm_users SET ‘user_pass’=MD5(‘new_password’)

WHERE ‘wpm_users’.’user_login’=”admin_username”;

Remember you need to enter your new password, which you want to set in (‘new_password’), and the user’s name in “admin_username.”

Reset WordPress Password Via FTP

We can reset Password with FTP as well.

You need to login to your FTP client using File Zila or any other software, or you can even get excess it with Cpanel File manager.

Login to Cpanel, Go to file manager.

Select and Go into your website’s root directory html_public.

8 Ways to Reset WordPress Password Safely

Here you will find a Folder named wp-content, and in this folder, you will find the folder of themes.

8 Ways to Reset WordPress Password Safely

8 Ways to Reset WordPress Password Safely

Select file functions.php and be safe, copy it first, and then edit it because if anything wrong happens, we can restore the original file.

8 Ways to Reset WordPress Password Safely

Now add a line of code given below, right after <?PHP in this function.php file.

Wp_set_password(`wppassword`,1);

8 Ways to Reset WordPress Password Safely

You can set your wish’s password by replacing the `wppassword` with any password you want to select. One is the user id; usually, One is the value of the administrator. So we have set the administrator’s new Password as Password.

Now save the modified file. If you have edited the original file in the themes folder, go back to the WordPress login screen and login with new credentials. Still, if you have edited the copied file, you need to replace and upload it to the themes folder first and then try to log in.

Note:

Once you log in, you need to go back to the themes folder via FTP and edit the functions file, remove the line we have added.

Because if the line stays in the functions file, it will work as every time you access your website and load a page, it will reset the password, making it vulnerable.

Softaculous Password Reset

Most of the service providers use Cpanel to manage the website. And if you used the auto-installer in the Cpanel to install WordPress and don’t have access to email, you can reset it by accessing the the installation you created from Cpanel.  Login to your Cpanel, and you will find the WordPress manager option there; our panel installed WordPress by Softaculous.

8 Ways to Reset WordPress Password Safely

The WordPress manager option will take you to the installer screen and you will have to search for your website’s installer.

Now you will see a change password option corresponding to your website’s installer.

8 Ways to Reset WordPress Password Safely

Click on this option, and a new window will popup, named asking user name and password; give the admin user name-new password there.

Now you can log in to WordPress with the new credentials you have set.

Reset WordPress Password Via Emergency Password Reset Script

This method is not widely used, but if no above way has worked for you, you can try it. This method requires you to at least know the administrator’s username.

Using Emergency Password Reset The script, the reset password will send to the administrator’s email address. But it doesn’t mean you need access to the email.

Caution: If your email is not secure, don’t use this method.

Don’t confuse it with the Forget your password method, where you reset your password if you remember the username and or email.

This method will be used when you don’t have access to your website.

First, you need to login to Cpanel, and via file, the manager goes to the root directory of your website.

Here you have to create a file named emergency.php in the public_html folder.

8 Ways to Reset WordPress Password Safely

Edit emergency.php

8 Ways to Reset WordPress Password Safely

You can copy the script below into the emergency file.

Now go to the browser and type the URL of your website with the emergency.php extended page link. E.g., www.sample.com/emergency.php.

You will see a new window and ask you to enter an admin user name and new password after putting that information into the fields.

Click on the Update button.

Now you receive a message “Changed Password.”

Check email as updated information has been sent to your account.

Go back to the file manager in Cpanel and search for the emergency.php file in the root directory; now delete that file.

If you leave that emergency file, then anyone can use it to change your administrator password.

You can log in to your WordPress site now with a new password.

You can log in to your website with the new password.

Reset Non-Admin user password

Admin is the website’s boss; he has all the privileges to make changes to the website. If a website runs with multiple users and Admin has defined every user’s roles and assigned him limited benefits, the user could only work with a restricted environment.

And if he ever forgets his Password, he can’t reset it by himself if his email is not set up while making his id. In this case, he can ask Admin to reset his Password.

Admin has to go to the dashboard and in the left menu the slide he can Click on USERS> users list will appear in front of you.

Click on the user you want to edit.

Problem After Password Reset

Shuffling between the settings is not as easy as it seems. It doesn’t go smoothly every time, and resetting the password could create some problems for you after making changes to it. We will discuss common issues you could face after a password change.

A new password is not recognized?

After resetting your password, it doesn’t recognize your new password and refreshes the page. If still, it is not working, you need to clean the browser’s cache and cookies. The web browser stores all recent data to the cookies, and sometimes new information conflicts with the old information and shows you this error, so cleaning browser history is the best option.

You can also try incognito mode.

Didn’t receive an email after resetting the password?

When you reset your password, it sometimes happens when you reset your WordPress password. The WordPress password reset email is an automated generated email. Most of the emails were received as spam, so they automatically went into the spam folder, so you should check the spam folder; there are chances that the password reset email moved into that folder. Gmail also separate section for different types of emails, so it mainly sends these kinds of emails into the updates folder.

The website not working after resetting the password from the root directory?

When you make changes from the root directory, there are probable chances that you end up breaking your website. To avoid that, we always suggest before making a change to any root file, create a backup of that file, and if the difference you have made and the code you add to the root file doesn’t work, and you lost access to our website reupload that original file and replace that file. It will save you from breaking your website.

The website broke while resetting the password via the database

Making changes to the database is very risky because it contains all your data, and one change could harm your website. So, we recommend that whenever you try to alter root files or databases, always make a backup and then make changes. If this happens to you, the only choice is that you recheck the changes you have made into the database and make sure you follow all steps. If still, it is not working, then the only option is to restore your backup and try to reset the password from another method.

What type of password do you choose Tips?

Password protection is most important if you are surfing the internet. But most people prefer to set simple and easy remember the password; this is not a good practice password that is easy to remember is always easy to break. So we will suggest some tips you should follow while setting up the password.

When we set a WordPress password, some strong passwords prefer to use them randomly and mix different characters. But even if you want to put your Password, WordPress will tell you that this password is strong enough or weak.

  • I always prefer long passwords, maybe 8 to 10
  • Always use a combination of numbers and alphabets.
  • Alphabets should be upper or lower case.
  • Try to include special characters in your password.
  • Avoid using your relevant stuff names.

Final Words

There are multiple options; if you ever lost your password, you don’t need to fright. There is a different method with an extra level of complexity; some are easy and quick some are a little bit complex.

The most straightforward approach is when you remember your email; at least, you can reset your password in minutes. In other ways, you have too little bit technical knowledge.

If you are facing any other issues during resetting the WordPress password, let us know.

About the author

Muhammad Fayyaz

Muhammad Fayyaz is an award-winning Top Rated Freelancer on Fiverr.com and upwork.com. He's developed more than 1500 websites. Served more than 900 clients all over the world with 5-star ratings. Fayyaz is a highly skilled WordPress Developer and Digital Marketer with over 8 years of experience. He has a strong background in web development and is proficient in various programming languages. In addition to his online marketing skills, Fayyaz is also an expert in digital marketing, with a deep understanding of SEO, social media, email marketing, and lead generation. He's worked as a Technical Support Engineer for over two years. Fayyaz wants to give back to society, so he's created this blog to share his knowledge and help new comers.

Leave a Comment

seven − 2 =