If you do not have access to the email address that you have connected with your WordPress profile, it is a bit difficult to reset the password of your WordPress account. There are a lot of ways you can try to reset the password of your WordPress website without access to your email address which we are going to discuss in this article. Instead of following the methods in the order, try to do it from the easiest to the hardest based on the access to the necessary tools required for them.
For the below methods to work, you should have access to the server where the website is hosted. Unless you have these, it will be almost impossible to recover your WordPress password.
1. Using phpMyAdmin
phpMyAdmin is a database management tool that comes with most of the managed WordPress hosting services such as Siteground, Bluehost, etc. If you have the tool, you can use it to edit your database table and reset the password quite easily. In this article about resetting the WordPress password using phpMyAdmin, we explained the steps in detail. Follow it to reset your WordPress password in no time.
2. Using Softaculous
Softaculous is a script library that lets users install many applications easily with their one-click installer. It includes WordPress as well. This means you will be able to reset your WordPress password without accessing your email address as long as you can open the web hosting account. In cPanel, you will be able to find Softaculous (if available on the web hosting provider) which you can open and use to reset your password. We have created an article listing the steps to reset the WordPress password using Softaculous. If you cannot, see the application on your hosting dashboard, you may contact your hosting support to know if it is available or not.
3. wp_set_password()
WordPress has a function wp_set_password() that allows you to set an encrypted password to a specific user when placed on your PHP files. You can simply copy and paste the following code to your theme’s functions.php file and save the changes. Make sure to reload the login page once the code has been added.
wp_set_password( 'newpassword', 1 );
Make sure to replace ‘newpassword’ with the actual password and ‘1’ with the user ID.
4. Use WP-CLI
If you have WP-CLI installed on your web server, you can reset your user password with the following commands. Run the command after navigating to the root directory of your WordPress installation.
wp user update username --user_pass=newpassword
Replace ‘username’ with the actual username and ‘newpassword’ with the password you want to use.
5. Contact your hosting provider
If you still cannot reset your WordPress password even after trying both the above methods, your next best bet is to contact your hosting provider and ask them for help. This Will only work if you are on a managed WordPress hosting service such as Siteground or Bluehost. If you are managing your own website on a hosting such as Digital Ocean, you are your own.