
It happens to everyone. You go to log into your WordPress site, and the password you know is correct gets rejected. Or your password manager didn’t sync. Or you inherited a site from a former employee who never shared the credentials.
The good news: WordPress has several built-in recovery paths, plus a few manual ones for when those fail. Here’s how to get back in, calmly and without breaking anything.
This is the easiest method, and it works for most people.
yoursite.com/wp-admin or yoursite.com/wp-login.php)If the email never arrives, check these before trying anything else:
wordpress@yoursite.com, your host may be blocking it. Contact your host or use an SMTP pluginSoftware that adds specific features or functionality to a W... MoreIf your hosting provides SSH access, WP-CLI is the fastest method:
bash
wp user update admin --user_pass="YourNewStrongPassword"
That’s it. Log in with the new password immediately.
To list users first (if you’re unsure of the username):
bash
wp user list
If password reset emails aren’t arriving and you don’t have SSH access, you can reset the password directly in the databaseWhere all WordPress content, settings, and user data are sto... More.
Step 1: Access phpMyAdmin
Log into your hosting control panel (cPanel, Plesk, etc.) and open phpMyAdmin.
Step 2: Find your users table
Select your WordPress databaseWhere all WordPress content, settings, and user data are sto... More, then click on the wp_users table. The prefix may differ (wp2_users, myprefix_users), but it always ends in _users.
Step 3: Edit the password field
user_pass field, delete the existing valueImportant: WordPress normally hashes passwords using a stronger method than MD5. Using MD5 here will work for login, but WordPress will automatically re-hash your password to the more secure standard the next time you log in.
Step 4: Log in
Use your username and the new password you just set. Then change it again from the WordPress adminThe admin (administrator) is the highest user role with full... More to ensure it’s properly hashed.
If you can’t access the databaseWhere all WordPress content, settings, and user data are sto... More or your email, you can force a password reset by editing your theme’s functions.php file via FTP or your hosting file manager.
Warning: This method requires care. A syntax error in functions.php can break your site.
/wp-content/themes/your-active-theme/functions.phpphp
wp_set_password( 'YourNewStrongPassword', 1 );
Replace 1 with your actual user ID (usually 1 for the main adminThe admin (administrator) is the highest user role with full... More).
This works because wp_set_password() runs when the file loads, updating the password directly.
Many managed WordPress hosts include a password reset tool in their dashboardThe dashboard, or admin panel, is the backend interface wher... More.
Check your host’s documentation first, this is often faster than any manual method.
Sometimes the problem isn’t the password, it’s that you can’t even reach the login pageStatic content (e.g., "About Us," "Contact") not part of chr... More.
If you’re getting a white screen or 500 error:
The issue isn’t your password. Your site is broken. See our guides on disabling plugins via phpMyAdmin or fixing the “Unable to Create Directory” error.
If you’re seeing “Too many redirects”:
Check your SSL settings. Your site may be stuck in a redirect loop between HTTP and HTTPS.
If someone else changed the password:
If this is a site you own but someone else manages, contact them first. If they’re unresponsive and you own the hosting account, use the phpMyAdmin method above.
Getting back in is step one. Making sure it doesn’t happen again is step two.
A lost password feels like a crisis, but it rarely is. WordPress gives you multiple ways back in, from the simple reset link to direct databaseWhere all WordPress content, settings, and user data are sto... More access.
Try in this order:
functions.php (only if nothing else works)And once you’re back in, take five minutes to set up 2FA and a password manager. Future you will be grateful.