Suppose you are gearing up to publish an important update or manage a time-sensitive project on your WordPress site, but as you try to log in, your password doesn’t work. Frustration kicks in, and you’re left wondering, ‘Now what?’ Don’t worry — you’re not alone. There are many who still don’t know how to reset your WordPress admin password. The good news: there is no rocket science in it. Follow our quick guide and regain access to your site without a hitch.
Why It is Essential to Reset Your WordPress Admin Password
Resetting your WordPress admin password regularly is an essential part to keep your site secure and accessible. If you’ve ever been locked out due to site issues like the white screen of death, it’s a good idea to check for common errors and restore access without delays.
Your admin account holds the keys to your entire site, and allows you to manage content, configure settings, and oversee user roles and permissions. Due to its extensive access and authority, it becomes a significant target for hackers seeking to exploit or compromise your site.. By updating your password periodically, you lower the risk of unauthorized access, especially if you’ve noticed any unusual activity.
Plus, we’ve all been there: forget a password or leave it unchanged for so long that it becomes a weak spot. A quick password reset not only restores your access but also strengthens your site’s defenses. Just like updating plugins and themes, a fresh password is a simple way to keep your WordPress site secure and running smoothly.
4 Easy Ways to Reset WordPress Password
Here’s a step-by-step guide to resetting your WordPress admin password using four different methods.
Method 1: Reset Your Password Through the WordPress Login Page
This is the simplest and most easiest way to reset your password, provided you still have access to the email associated with your WordPress admin account.
- Visit yourwebsite.com/wp-admin to access the login page.
- Below the password field, you’ll see the “forget password?” link. Click on it.
- On the next screen, enter the email address or username associated with your admin account.
- WordPress will send an email with a link to reset your password. The email usually arrives within a few seconds. If it’s not in your inbox, make sure to check your spam folder.
- Open the email, click the link, and you’ll be redirected to a page where you can enter a new password.
- Choose a strong password that combines uppercase letters, lowercase letters, numbers, and symbols, then save it.

This method is quick and easy, as long as you have access to the associated email.
Method 2: Reset Password in Database
If you can’t access your email, you can reset the password directly in the database using your hosting account’s cPanel. This method requires some familiarity with database management, but it’s effective if the email method isn’t an option.
- Access the control panel of your hosting provider (such as cPanel) by logging into your hosting account.
- In cPanel, look for the phpMyAdmin option, usually located under the “Databases” section.
- In phpMyAdmin, choose the database associated with your WordPress site. If you’re unsure which one to choose, you can check your wp-config.php file for the database name.
- Now in your WordPress database, find the wp_users table. This table stores all user data, including admin account information.
- Find the row with your admin username and click Edit.
- Here:
- In the user_pass field, delete the current value.
- Select MD5 from the dropdown menu under the “Function” column.
- Enter your new password in plain text in the user_pass field.
- Click “Go” to save your new password. The password will be saved in an encrypted format.
Once you complete these steps, you can log into your WordPress admin account with the new password.
Method 3: Reset Password with FTP/SFTP by Editing the functions.php File
If you don’t have access to your email or cPanel, you can reset the password by adding temporary code to your theme’s functions.php file. You’ll need FTP or SFTP access for this method.
- Open an FTP client (such as FileZilla) and log in with your FTP credentials. You can get these credentials from your hosting provider if you don’t already have them.
- In the FTP client, go to the wp-content/themes/yourtheme folder. Replace “yourtheme” with the name of your active theme.
- Find the functions.php file and download it to your computer for editing.

function temp_admin_account() {
$user = 'tempuser';
$pass = 'temppassword';
$email = '[email protected]';
if (!username_exists($user)) {
$user_id = wp_create_user($user, $pass, $email);
$user = new WP_User($user_id);
$user->set_role('administrator');
}
}
add_action('init', 'temp_admin_account');
Open the functions.php file in a text editor and add the following code at the bottom:
- Replace ‘tempuser’, ‘temppassword’, and ‘[email protected]’ with your preferred username, password, and email.
- Save the changes and upload the file back to the same directory via FTP.
- Go to your WordPress login page and enter the temporary credentials you created (tempuser and temppassword).
- Once logged in, immediately remove the code from functions.php by editing the file again and deleting the code you added.
This approach can be a lifesaver in emergencies and allows you to recover your site access quickly and efficiently. But it should be used carefully since it involves modifying theme files.
Method 4: Reset Password Using WP-CLI (Command Line Interface)
If you’re comfortable with terminal commands and have SSH access to your hosting account, WP-CLI can be an easy way to reset your WordPress admin password. WP-CLI (WordPress Command Line Interface) lets you manage WordPress tasks directly from the command line. This method is quick and efficient, ideal for those who prefer simple site management. It’s especially useful if you’re locked out of the WordPress dashboard. With WP-CLI, you can reset your password and complete other admin tasks without delay.
Follow these steps to reset your password using WP-CLI:
- Open an SSH client, such as PuTTY, and log in with your server credentials. If you don’t have these, your hosting provider should be able to provide them.
- Once logged in, use the cd command to move to your WordPress directory. This is typically located at a path like /path/to/your/wordpress.
- To update your password, use the following WP-CLI command. Replace adminusername with your actual admin username and newpassword with the new password you’d like to set:
wp user update adminusername –user_pass=newpassword
- After the command executes, your password will be updated. You can now log in to WordPress using the new password.
WP-CLI is a fast and easy way to reset your password, especially if you’re already familiar with server tools. This method saves time and helps you quickly regain access to your site. Once you’re logged back into WordPress, you can proceed with any other changes or updates needed. WP-CLI offers a powerful way to manage your site with just a few commands to make it a valuable tool for advanced users.
Conclusion
In summary, resetting your WordPress admin password is easy and can be accomplished through various methods tailored to different needs and skill levels. Whether you choose the quick login reset, a cPanel update, FTP adjustments, or WP-CLI commands, each method helps restore access while adding a layer of security to your site.
Updating your password regularly is a small yet effective way to keep your site safe from unauthorized access. By staying dynamic with password management, you ensure your WordPress site remains secure, accessible, and ready for whatever you need to accomplish.
Explore our WordPress maintenance services or check out our guide on plugin updates to keep your site running smoothly. Contact LDNinjas to secure your access today and keep control of your website at all times!