From time to time, everyone needs to reset one of their passwords. If you need to change your password, WordPress makes it easy, but you’ll need access to the email address you used to build your site. Things can get tricky if you don’t. Thankfully, there are a few workarounds for this problem.
In this article, we’ll teach you how to Reset WordPress Passwords Through the Login Screen, via WP-CLI, CQL, FTP, from phpMyAdmin, CPanel, and Using Reset Scripts.
Why Should You Change Your WordPress Password?
It shouldn’t be difficult to change any of your passwords. In reality, from a security standpoint, it’s always one of the best things you can do. Periodic updates, particularly if you reuse passwords across several channels, reduce the chances of someone else gaining access to your accounts.
Of course, you should stop reusing passwords, but that recommendation isn’t followed by many people. Furthermore, even if you use different passwords for each website, security breaches will occur. You’ll want to update your password as soon as possible in those situations.
Aside from security issues, there are a few other reasons why you should update your WordPress password:
- You previously gave someone else access to your account and now want to reclaim full rights.
- It’s possible that someone else has found out your secret.
- You actually forget your password.
If you find yourself in one of these cases, telling WordPress to reset your admin password is a simple process. In reality, most platforms these days make changing your password a simple and painless operation. After all, it’s in their best interests for you to keep your account safe because you may not want to use the platform if you don’t.
We’ll go through eight strategies for resetting a WordPress password in the sections below. The first one necessitates having access to your WordPress account’s associated email. Alternatively, if you’re already signed into your dashboard and don’t have access to your inbox, the second option would function.
Finally, if you can’t reach your email or dashboard, we’ll show you how to reset your WordPress. Let’s get started without further ado!
How to Reset Your WordPress Password Using the Login Screen
- Enter your username or the email address you used to create your WordPress account on the next screen. When you click Get New Password, an email with a connection to build a new password will be sent to you.
- Check your inbox for the email you received and click the link in it. You’ll be redirected to a page where you can change your password.
Finally, log in with your new password and your username or email address. You’re all set.
How to Reset WordPress Password via the Dashboard
If you can log into your WordPress dashboard, you can update your password there instead of using your email address. If you don’t have access to your email account right now, but your WordPress login session hasn’t yet expired, you can use this form. It also takes less time than changing your WordPress password via the login screen.
Article Continues Below
- To do so, go to your dashboard and select Users Your Profile from the drop-down menu. This section contains all of the details about your account, including your full name, username, email, and even your profile picture:
- More importantly, there’s an Account Management section where you can update your WordPress password even if you can’t remember your old one. All you have to do is press the Generate Password: button.
- WordPress will generate a protected password for you when you do so. You can, however, uninstall the password and replace it with whatever you want. Keep in mind that if WordPress considers your password to be too weak, it will prompt you to confirm that you still want to use it:
- Of course, you can create a password that is both unique and safe. After you’ve entered it into the field, scroll down to the bottom of the page and click Update Profile.
- You will not be logged out of your account if you use this form. The same tab will reopen, and you’ll see a simple message at the top of the screen that says Profile updated:
How to Reset WordPress Password via WP-CLI
WP-CLI is a collection of command-line tools for controlling WordPress installs on a server, and it is a command-line interface for WordPress. It enables WordPress admin users to perform various administrative tasks without having to use a web browser. Users can take care of their WordPress websites using the command-line interface by executing a series of pre-defined commands. Upgrades, database backups, and the publication of new articles are only a few of the activities.
If you’ve installed WP-CLI on your server to control your WordPress account, you can change your password using these instructions. If you haven’t already done so, you’ll need to do so before proceeding with these measures.
- Always make a copy of your site before making any adjustments.
- To use WP-CLI, you’ll need to connect to your server remotely via SSH.
You have two options for connecting to your server via SSH, so pick one from the list below. You can also learn more about connecting remotely to the server by clicking on the hyperlink text of bullet points.
- Use of SSH Client.
- Use of Cloudways Integrated SSH Terminal.
We’ve used PuTTY, an SSH client, in this example.
- Enter the server’s IP address and port in PuTTY, then choose SSH.
- Finally, press the Open button.
- After a good link, a window similar to this will appear:
- Now you must navigate to the directory containing your webroot or the wp-config.php file. WP-CLI would not function otherwise. It’s located in the public_html directory by default, and we’ll use that path to run WP-CLI in this example. To access the public_html folder, use the following command:
- cd applications/<your_application_name>/public_html/
You’ll see a window like this after successfully running the command above. :
- If you’re in the public_html directory, you can start using WP-CLI. To see all of the users, type this command.
- wp user list
- To change a user’s password, type this command:
- wp user update <user> –user_pass=<password>
- For example: wp user update john –[email protected]@%basqwq
- <user> = The user_login, user_email or ID of the user(s) to update.
- By using this command and passing more user> and —user pass=password> parameters, you can change the passwords of several users at once:
- wp user update <user> –user_pass=<password>, <user> –user_pass=<password>
- For example: wp user update 3 –user_pass=%yest$$12998, 4 –user_pass=1$#[email protected]@987
- <user>= The user_login, user_email or ID of the user(s) to update.
Using the same tool, you can change your administrator password.
How to Reset WordPress Password from phpMyAdmin
phpMyAdmin is a PHP-based open-source software tool that was first released on September 9, 1998. It is, in essence, a third-party tool for managing the database’s tables and data. On MariaDB and MySQL, phpMyAdmin supports a variety of operations. The primary goal of phpMyAdmin is to handle MySQL administration over the internet.
It is the most widely used framework for managing MySQL databases. Using this program, we can build, update, drop, change, remove, import, and export MySQL database tables. On MySQL and MariaDB, phpMyAdmin supports a broad variety of operations such as handling databases, connections, tables, columns, indexes, permissions, and users, among others. These operations can be carried out via a user interface, while any SQL statement can still be executed.
phpMyAdmin is available in 72 languages and supports both RTL and LTR languages, making it accessible to a wide variety of people. We can run MySQL queries, optimize, restore, and review tables, as well as perform other database maintenance tasks. phpMyAdmin can also handle administrative tasks including database development and query execution.
Normally, you can reset your WordPress password from the dashboard or submit an email request for a new one. You can update your password directly in the database if you don’t have access to both your email and the WordPress dashboard.
- Before making any changes, we suggest making a backup.
- In PHPMyAdmin, you need to access your database.
- Go to the control panel and log in.
- On the Advanced settings tile, click PHP and database settings.
- Choose a database
- Tap Select database in the top right corner of PhpMyAdmin and select the database you want to use.
- Organize the database.
- In phpMyAdmin, a new window appears, displaying your database. You can access all of your database’s tables from here. Take a look at the guides below to read more about the different steps you can take.
- Access the users table.
- In the menu on the left, select the users table. The table may have various prefixes, such as www_ in this case.
- Select the user whose password you want to modify and press Edit.
- Enter a new password.
- user_pass is next to it. Under Function, select MD5 from the drop-down menu.
- Replace the existing encrypted password with the new password under Value. You can type plain text; however, after saving, it will be encrypted.
- To save your changes, click Go.
- You’re done.
Your new password was encrypted and saved. It’s now possible to log in to WordPress with it.
How to Reset WordPress Password via SQL
Using the MySQL CMD to recover your password needs fewer steps and can be thought of as a universal password recovery method, as it can be used in almost any conceivable scenario.
You must, however, have a working knowledge of databases and how WordPress communicates with them. Aside from that, you should be familiar with the following technical aspects:
- The name of the database that the WordPress installation makes use of.
- The location of the MySQL server (IP or hostname)
- The ‘root’ user’s MySQL login credentials
- You’ll need the user ID of the user whose password you’d like to change. This is usually 1 because the admin user is created during the WordPress installation. The admin user’s username may be anything from “Jack” to “Mike” to “admin,” but the user ID will always be 1 since this is the first user you’re making.
To reset the password you need to follow the below instruction.
- Click on the phpMyAdmin icon and get access to it.
- Select the database that WordPress uses once phpMyadmin is opened. In the top navigation bar, click the SQL key.
- Click OK after entering the following code in the SQL query box.
- UPDATE `wp_users` SET `user_pass` = MD5( ‘123456’ ) WHERE `wp_users`.`user_login` = “admin”;
- The following command is equivalent to above with MD5 encrypted password.
- UPDATE `wp_users` SET `user_pass` = ‘e10adc3949ba59abbe56e057f20f883e’
- WHERE `wp_users`.`user_login` = “admin”;
Where 1234 –> Replace this with the plain text version of the current password you want to use.
–> e10adc3949ba59abbe56e057f20f883e –> e10a Replace this with the MD5 file of the new password you want to use.
admin –> Replace this with the username under which the password needs to be changed.
That’s what there is to it! You can now log in as admin or with any other user name and password.
How to Reset WordPress Password via FTP
If you’ve forgotten your WordPress administrator password, or if you can’t log in to the WordPress dashboard because you don’t have access to the WordPress MySQL database, or if the password reset feature isn’t working, you can adjust it through FTP.
Step to reset password WordPress password via FTP
Link to your WordPress website with an FTP client.
Navigate to the WordPress theme directory on your blog or website that is currently active. The wp-config-themes directory contains WordPress themes.
Download your WordPress theme’s functions.php file.
After the first?php section, add the following code. The user ID of the WordPress user you want to reset the password for is the number 1 at the end of the line of text. The user ID is always 1 if you’re using the default administrator account you built when you installed WordPress.
- Save the changes and re-upload the function.php file.
- After the file has been uploaded, go to your WordPress dashboard login page, which is usually http://www.yourwebsite.com/wp-admin.
- Log in to WordPress with the password and the default user account name (typically admin).
- The login page will automatically reload without redirecting you to the WordPress dashboard until you apply the credentials (try to log in). This indicates that the WordPress user password has been reset to the password. For the time being, don’t try to log in again. Any time you attempt to log in, the WordPress administrator account password will be reset.
- Download the updated functions.php file from the themes directory using an FTP client before attempting to log in again.
- Remove the line you previously added, save your changes, and re-upload the file.
With your administrator account and the password, you can now access the WordPress dashboard.
How to Reset WordPress Password from cPanel
Any changes you wish to make to WordPress can, in general, be done through WordPress. It’s typically best to reset your password by going to [yourdomain]/wp-admin and clicking the Forgot your Password? link.
If you need to see or change your WordPress email, username, or password for some reason, you can do so from your hosting cPanel. Follow these steps to locate this information:
- Log in to your cPanel hosting account.
- Under the Databases heading, choose phpMyAdmin.
- Click the username on the left, then the database (you might need to look this up in your wp-config file if you’re not sure which database it is).
- Select wp users from the drop-down menu.
- The username and email address are specified here, and you can change them by clicking Edit to the right.
- MD5 hash is used to represent the password. To adjust it, go to the Edit menu on the left, type in a new password, and then select MD5 from the Functions drop-down menu.
How to Reset WordPress Password Using Reset Scripts
If none of the other options above function, try the Emergency Password Reset Script. It’s important to remember that this is a PHP script, not a plugin.
You’ll need to know the following before using this script:
- You must know the admin username in order to use the script.
- The script then sends an email to the admin’s email address, updating the admin password.
- Even if you do not receive the email, your password has been reset.
- The script must be put in the WordPress installation’s root directory (in the same location as your wp-config.php file).
- FOR SECURITY REASONS, YOU MUST REMOVE THE SCRIPT FROM YOUR INSTALLATION WHEN YOU ARE DONE USING IT!
Steps for using the Emergency Password Reset Script
- Save the script available here to the root of your WordPress installation as emergency.php (the same directory that contains wp-config.php).
- Open http://example.com/emergency.php in your browser.
- Enter the administrator username (usually admin) and new password as directed, and then press Update Options. A message is shown indicating that the password has been changed. The blog administrator receives an email with the new password details.
- When you’re done, remove emergency.php from your server. It’s not a good idea to leave it on your server because it might be used to change your password.
It should always be simple to change your password. However, you’ll almost always need access to the email address you used to sign up. Things can get complicated if you don’t.
You are encouraged to shoot us any concerns or questions you may have! Let us know how you get on this one! :)