It happens to the best of us: you go to log into your WordPress dashboard, hit “Sign In,” and the dreaded “ERROR: The password you entered is incorrect” message appears. Whether you forgot the password, or a client changed it without telling you, getting locked out of your website’s command center can feel like a disaster.
The good news? Your site is safe, and WordPress, along with your hosting environment, provides multiple recovery mechanisms. Depending on your situation and technical comfort level, you can use the simplest email reset or go straight to the database.
In this guide, we’ll walk you through three step-by-step methods to reset your WordPress password, guaranteeing you regain access quickly and securely.
Table of Contents
ToggleStep by Step Reset WordPress Password
Method 1: The Standard Email Reset (The Easiest Way)
This is the fastest, simplest method and should always be your first attempt. It relies on the email address associated with your main administrator account being accessible.
Step-by-Step Email Recovery
- Navigate to the Login Page: Go to your standard WordPress login URL, typically
yourdomain.com/wp-admin
oryourdomain.com/wp-login.php
. - Click the Recovery Link: Below the login form, click the link that says “Lost your password?”
- Enter Your Details: You will be prompted to enter either the Username or the Email Address associated with the admin account.
- Tip: If you’ve forgotten both, try entering the admin email you used when you first set up your hosting account.
- Check Your Email: WordPress will send a password reset link to that email address. This is usually a message from
WordPress <wordpress@yourdomain.com>
.- If you don’t see it, check your spam or junk folder.
- Set a New Password: Click the secure link in the email. It will take you to a page where you can set a brand new, strong password. Click “Reset Password” to finalize the change.
When This Fails: If the recovery email never arrives—perhaps because your website’s email function is broken, or you no longer have access to the original email address—you’ll need Method 2.
Method 2: Resetting via the Database (The Reliable Way)
If the email method is blocked or inaccessible, you can force the password reset directly in the database. This method requires access to your hosting control panel, such as cPanel (see our guide on [Our cPanel Login Guide]).
You will use a tool called phpMyAdmin, which is the primary interface for managing your database.
Step-by-Step Reset via phpMyAdmin
- Log in to cPanel: Access your hosting control panel (cPanel) using your credentials.
- Open phpMyAdmin: In the cPanel dashboard, find the “Databases” section and click on “phpMyAdmin.” This tool allows you to interact directly with your website’s data.
- Select Your WordPress Database: In the left-hand sidebar of phpMyAdmin, click on the name of your WordPress database. If you have multiple sites, it’s often the database name listed in your site’s
wp-config.php
file. - Find the Users Table: Look for and click the table named
wp_users
(or a variation likewp_xxxx_users
, wherexxxx
is a random prefix used for security). - Edit the Admin User: Locate the user you need to reset (usually the one with
user_login
set toadmin
or your primary username) and click the “Edit” button next to their row. - Update the
user_pass
Field: This is the most critical step.- Find the field named
user_pass
. - In the Value column, delete the existing encrypted string and type your NEW password (e.g.,
MyNewSecurePassword123
). - Crucially, in the Function column (next to the Value column), change the dropdown menu from
---
toMD5
.
- Find the field named
- Save Changes: Scroll to the bottom and click the “Go” button.
Why MD5? WordPress does not store passwords as plain text. It uses a cryptographic function (hashing) to secure them. By selecting
MD5
in phpMyAdmin, you tell the database to encrypt your new plain-text password before saving it, making it secure and compatible with the WordPress login system.
You can now log in to your WordPress dashboard using the new password.
Method 3: The Emergency Reset Script (The Failsafe)
If you have no access to the original email and your hosting provider doesn’t offer cPanel/phpMyAdmin, or you prefer not to touch the database directly, you can use a small, temporary PHP script. This script forces a new password directly through the file system.
Step-by-Step Reset via functions.php
- Access Your Files: Log in to your hosting account and use the File Manager (or an FTP client) to navigate to your WordPress installation directory.
- Locate the Theme Folder: Go to
wp-content/themes/
and find the folder for your currently active theme. - Edit
functions.php
: Find the file namedfunctions.php
and click “Edit.” - Insert the Emergency Code: Paste the following line of code at the very top of the file, after the opening
<?php
tag:wp_set_password( 'MyNewPassword', 1 );
- Replace
MyNewPassword
with your desired secure password. - The
1
in the function refers to the User ID of the primary admin (which is almost always 1).
- Replace
- Save the File: Save the changes to
functions.php
. - Trigger the Reset: Open your website’s front page (
yourdomain.com
) in your browser. Just loading the page executes the script and resets the password. - IMMEDIATELY REMOVE THE CODE: Go back to your
functions.php
file and DELETE the line of code you just added. Leaving it there is a major security risk and will reset your password every time someone visits the site.
You can now log in using the password you defined in the script.
Conclusion: Securing Your Future Access
Being locked out of your WordPress site is a temporary setback, not a permanent problem. Whether you used the simple email link, the direct database method, or the emergency file script, you are now back in full control.
To prevent this issue from ever happening again, always use a Password Manager to store unique, complex passwords for all your online accounts.
And remember, the reliability of your hosting is key to a smooth WordPress experience. At Quape, we provide secure and high-performance Web Hosting solutions from our base in Singapore. Our infrastructure is designed for speed, and our dedicated support team is always available to help you navigate issues, ensuring your valuable time is spent building, not troubleshooting.
Secure your website’s future with Quape hosting today!
- How to Log In to WordPress Dashboard Easily - September 30, 2025
- Forgot WordPress Password? How to Reset It Easily - September 29, 2025
- How to Log In to cPanel Easily for Beginners - September 27, 2025