Passwords, passwords, passwords… Nowadays, practically anything you use on the Internet requires registration. Even if you tend to have as little accounts as possible, you will still end up having dozens of different passwords to remember (at least we hope that you don’t use the same one across all Internet services).
And after all those accounts you have to keep in your mind, here comes our bellowed WordPress which requires another username and password just in order to log into the system.
Security wise, it is important to create a strong password which will be hard to guess and it might be a good idea to force strong passwords on your users. Like it wasn’t hard enough to keep up with all those passwords in your head, strong passwords are very hard to remember. All those meaningless characters put together can be easy to forget, and if you do so, you will be locked out of your WordPress website.
That’s why we’re about to show you different ways of resetting your WordPress passwords.
Reset WordPress password:
- Reset password through login screen
- Change the password via FTP
- MySQL password change
This method is the most obvious one. Once you get to your login screen, there will be a link on the bottom leading to the password reset option. If you can’t remember the combination of characters you have used to log in, simply enter your email address and you will have a new password sent to your inbox in a matter of seconds.
Unfortunately, you won’t be able to always use this option – the feature might be taken down on your website for security reason. If so, you will have to go around the problem.
Maybe you don’t remember your admin password, but we hope that you still remember your FTP credentials. This method requires you to log into your FTP client and navigate to functions.php file. Be careful to navigate to the file located in the theme folder you are using, and not the one in your root folder. Once you’re there, edit your functions.php file and add the following code:
wp_set_password( 'New Password', 1 );
After saving changes, this function will change the password for the user with ID=1. That’s the first user created after WordPress installation and in most cases that will be you – the admin.
After you have successfully changed the password, be sure to delete the function from the file. If you leave it there, the function will run on every page load and it will keep resetting your password.
Now that you are done with password reset and have deleted the function, go to user options and change the password to anything you like – but remember it this time.
If none of two methods worked for you, you can change the password through MySQL directly. You will need to have phpMyAdmin or MySQL access where you need to run a new query:
UPDATE wp_users SET user_pass = MD5('New Password') WHERE user_login = "admin";
This query will change the password for admin directly in the database.
Now that you know how to reset your admin password, don’t let it be an excuse to keep forgetting it. We still think that you should create strong passwords, but make sure you remember them this time.