How to Reset a WordPress Password Without Email Access

Getting locked out of your WordPress dashboard without access to your email can be stressful. But don’t panic — there are multiple ways to regain control of your site. In this guide, we’ll show you how to reset a WordPress password without email access using practical, reliable methods that anyone can follow.
Why Would You Need to Reset Your Password Without Email?
Usually, you can reset a WordPress password by requesting a link via email. But sometimes, that’s not an option. Here’s why:
- The registered email account is no longer accessible.
- Your hosting email system isn’t working.
- You forgot to update the email after migration.
- A security issue or hack changed your email address.
When this happens, alternative solutions come in handy. Let’s explore them.
Best Ways to Reset a WordPress Password Without Email
1. Change Password Using phpMyAdmin
phpMyAdmin lets you edit your WordPress database directly. It’s one of the quickest ways to change a password.
Steps:
- Log in to your hosting cPanel.
- Open phpMyAdmin from the Databases section.
- Select your WordPress database.
- Find and open the
wp_users
table. - Locate your admin username and click Edit.
- In the
user_pass
field:- Choose MD5 in the Function column.
- Enter your new password in the Value box.
- Save changes by clicking Go.
Tip: Once you log in, reset your password again from WordPress for extra security.
2. Use the functions.php File
If you can access your site files, you can reset the password via your theme’s functions.php file.
Steps:
- Access your WordPress files using cPanel File Manager or FTP.
- Go to /wp-content/themes/your-active-theme/.
- Edit the functions.php file.
- Add this snippet at the bottom:
wp_set_password('YourNewPassword', 1).
(Replace YourNewPassword
with your actual password. The number 1
is your admin user ID.)
- Save changes and open your site.
- Log in with the new password.
- Remove the code immediately after logging in.
3. Reset Password Using WP-CLI
If your hosting supports SSH access, you can reset your password using WP-CLI.
Command:
wp user update 1 --user_pass=YourNewPassword
(Replace YourNewPassword
with your new secure password.)
4. Check Your Hosting Panel Tools
Many hosting companies provide built-in WordPress management options where you can change the admin password without logging into WordPress.
Comparison Table: Which Method Should You Use?
Method | Difficulty | Requires | Best For |
---|---|---|---|
phpMyAdmin | Easy | cPanel Access | Most users |
functions.php Edit | Medium | FTP or File Manager | When database access isn’t available |
WP-CLI | Advanced | SSH Access | Developers or power users |
Hosting Dashboard | Easy | Hosting Account | Managed hosting users |
After Resetting Your Password – Security Tips
- Always create a strong password with a mix of letters, numbers, and symbols.
- Enable Two-Factor Authentication (2FA).
- Update your email address to one you control.
- Schedule regular backups of your site.
FAQs About WordPress Password
1. Can I reset my WordPress password without cPanel?
A. Yes. If you have SSH access, you can use WP-CLI to update the password.
2. Is it safe to modify functions.php for a password reset?
A. Yes, but remove the added code immediately after logging in to avoid security risks.
3. How do I know my database name?
A. You can find it in the wp-config.php file in your WordPress root directory.
4. Can plugins help in this situation?
A. Not if you’re locked out. You need access to your dashboard to install a plugin.
Being locked out of WordPress without email access doesn’t mean losing your site. You can reset a WordPress password using phpMyAdmin, editing the functions.php file, running WP-CLI, or using your hosting panel.
To prevent this in the future, always keep your contact email updated, use 2FA, and store your credentials securely.