How to Reset WordPress Admin Password (3 Easy Ways)
If you forgot your WordPress login password or unable to login to your WordPress admin dashboard, then you need to reset your password. The good thing about WordPress is that it has an inbuilt password reset feature. Using the “forgot password” option on the login page, you can easily reset WordPress admin password.
However, if you don’t have access to your email or your WordPress site isn’t sending password reset link, you need to manually recover or reset your WordPress login password.
In this article, we will show you how to quickly reset the WordPress admin password.
1. Reset WordPress Password (with email access)
The first method to reset WordPress admin password is via the WordPress login page. But for this method, you need to access your email.
First, go to your WordPress login page which is basically your website URL and “/wp-admin” at the end, such as “yourdomain.com/wp-admin”.
Click on the Lost your password link. Enter your username or email address of your WordPress administrator account and click on the Get New Password button.
After that, you will receive a password reset link to your email. Open the link and set a new password.
2. Reset WordPress Password Using phpMyAdmin (with no email access)
If you don’t have email access or your WordPress site is not sending a password reset link to your email, then you can manually reset WordPress password from cPanel.
First, log in to your web hosting cPanel account. Under the Databases section, click on phpMyAdmin.
On the left side, click on your database.
Then scroll down and find the wp_users table. You might see a different table prefix for security purpose such as “wpabc_”.
Click on the wp_users and it will load users’ rows. Next to the username, click on Edit to change the password of your WordPress administrator account.
From the user_pass column, you need to enter a new value for your password.
Under the Function column, click on the drop-down menu and select MD5. Then click on “GO” at the bottom.
That’s it. You have just changed your WordPress admin password using phpMyAdmin.
3. Reset WordPress Password Using Theme’s functions.php file (with no email access)
This is also an easy process to reset WordPress admin password if you don’t want to edit your phpMyAdmin. In this case, you need to edit your active theme’s functions.php file.
First, log in to your hosting cPanel and go to:
- file manager
- open your active theme’s folder
Edit the file and add the following code at the beginning, right after the <?php line
wp_set_password( 'password' , 1 );
Here, you need to put your password and the “1” is the user ID number in the wp_users table.
Once done, save the file.
Now open your WordPress login page and enter the password you have added in the theme file.
After you are able to log in, make sure to go back and remove the code you have added into the theme’s functions.php file.
That’s it. This is how you can quickly reset WordPress admin login password with or without having your email access. If you have any question regarding this article, let us know in the comment section. If you find this tutorial helpful, do share it on social media.
Related WordPress articles,