Has it ever happened that you forgot your WordPress Password? In this article, I will be mentioning different ways to recover Lost WordPress password. In today’s world, we have lots of passwords that we need to remember for our different accounts. Big thanks to Social media for this!!!! Remembering the passwords for different accounts is a very difficult task these days. Though you can save it in some notepad or any of online applications such as Evernote to be accessible from any part of the world. Different sites provide different ways to recover or reset their passwords.
Now coming to our topic, If you ever lose your WordPress password, follow below methods to reset WordPress password.
Method 1 – To Recover Lost WordPress Password using WordPress Login Page
If you want to reset WordPress password for an online self-host WordPress blog, the simplest method is to use WordPress Login page itself. Follow the below steps to recover your WordPress Password:
Step 1: Go to the login page for your dashboard (http://yourdomain.com/wp-admin)
Step 2: You will see a link to “Lost Your Password” as shown below –
Step 3: Click on ‘Lost Your Password’
Step 4: After clicking on this link, you will be asked to enter your username or your email id, and to get your new password, as shown below –
Step 5: Once you click on the “Get New Password” button, an email will be sent to your mail id to reset WordPress password.
Step 6: Open the email and click on the new link mentioned in the mail, you will be redirected to a new page where you can reset WordPress password.
Step 7: Enter the new password. It will also show a strength indicator bar which will help you to know the strength of your new password. Use a strong password that is not easy to be hacked or guessed.
While choosing the password, make sure that you follow the below rules.
- The password must be 12 characters or more.
- The password must contain small and capital letters, numbers and special characters.
- The password should not contain complete words.
- The password should not contain any of your personal information.
- You should not use the same password to secure any other account.
Step 8: Open the WordPress Login page again and enter the username along with the new password in the WordPress login area. You should be able to login to your dashboard now.
Step 9: You have successfully reset WordPress password.
Method 2 – To Recover Lost WordPress Password using phpMyAdmin
The above-mentioned method is the simplest method to recover lost WordPress password. But what if you do not know the email configured with this account? Where will you be receiving the link to reset WordPress password? This is when phpMyAdmin comes in rescue. Follow the below steps to recover lost WordPress password using phpMyAdmin –
Step 1: Login to your cPanel account (e.g. http://yourdomain.com/cpanel)
Step 2: Scroll down to ‘Database’ panel.
Step 3: Click on ‘phpMyAdmin’ as shown below
Step 4: You will be redirected to the phpMyAdmin page for your website.
Step 5: Select the database you are using.
If you do not know the name of the database which relates to the site you are unable to gain access to, you will first need to identify it. If you know the name of the database, you can skip this step.
Otherwise, you will need to access the root directory of your website — either via your hosting provider’s File Manager (located on the cPanel), or via an FTP client. Either way, will work fine. The file you are looking for within your site’s root directory is “wp-config.php” — go ahead and open it up.
Within that file you will see a variable identified as “DB_NAME”, like this:
Step 6: Click on the ‘wp_users’ table. It will show you all the users with usernames and passwords.
Step 7: Click on the ‘Edit’ button for the username you want to change the password.
Step 8: It will open the table in an editable format.
Step 9: Look for ‘user_pass’ to update the password as shown below. The password is stored as encrypted MD5 value.
Step 10: Select “MD5” for the Function dropdown, and change its value to a new password, in our case the new password is “Admin123“.
Alternatively, You can leave this ‘function’ dropdown as empty and can use any MD5 Encryption website such as ‘MD5 Hash Generator’ and can give MD5 Hash string for ‘Admin123’ directly as shown below –
Step 11: Click on ‘GO’ once you are done.
That’s it! You’ve just changed the password for username admin to “Admin123“
Step 12: Open the WordPress Login page again and enter the username along with the new password in the WordPress login area. You should be able to login to your dashboard now.
Step 13: You have successfully reset WordPress password.
Method 3 – TO RECOVER LOST WORDPRESS PASSWORD Using FTP
The other method to reset WordPress password is via FTP. It is most likely that you have FTP access to your server. Follow below steps to reset WordPress password:
Step 1: Login to your FTP server and navigate to your WordPress installation directory.
Step 2: Go to “wp_content/themes/” and enter the theme folder which is currently activated on your website.
Step 3: Edit the functions.php file of your theme. In most cases, the first line is the PHP tag
Step 4: Go to the next line and enter the following code:
Step 5: Save the ‘functions.php’
Step 6: Go to WordPress login page.
Step 7: Enter your superuser username (in most cases it “admin” or “Admin”) and fill the password field with the password, “Admin123” (without quotes).
Step 8: Click on “Login”
Step 9: You will successfully log in.
Step 10: Do not try to log in again for now. Each time you try to log in, you will reset the WordPress administrator account password. This is because the wp_set_password() function is still being executed. Therefore, we need to remove this function.
Step 11: To do this, again edit the functions.php file and remove the line you have added before and save the changes.
Step 12: Change the password from WordPress dashboard that you want to keep.
Step 13: Next time you can log in with your new password that you set in the previous step.
Congrats!!!! You have successfully reset WordPress password.
Is there any other way that I could mention to recover lost WordPress password? Do share your comments below.
Latest posts by Mohit Arora (see all)
- How to Fix WordPress White Screen Error? - February 18, 2018
- MailOptin Review: Best Email Marketing WordPress Plugin? - January 15, 2018
- WP Rocket Review – Why Should You Buy This Caching Plugin? - January 7, 2018