◦ Comprehensive security
◦ 24/7 support
WordPress Guide → Errors → Locked Out of WordPress
Locked out of WordPress? Here’s how to fix it
It’s a sinking feeling—typing your WordPress login, hitting Enter, and getting nothing. Or worse, seeing an error message you don’t understand.
Don’t panic. Whether it’s a forgotten password, a plugin conflict, or something more technical, there’s always a way to get back into your site. Let’s walk through every possible fix, starting with the easiest.
Why you might be locked out of WordPress
Before trying different solutions, it helps to know what may have caused the issue. Common reasons include:
- Entering the wrong username or password too many times
- Forgetting which email address is tied to your WordPress account
- A plugin or theme update causing login issues
- Your IP address being blocked by a security plugin or firewall
- A corrupted .htaccess file or incorrect file permissions
- A hacked website that changed your account or password
- Your administrator user role was changed or deleted
- Cache or cookie issues that are preventing a successful login
Let’s look at how to fix them.
1. Try the “Lost your password?” link
This is the quickest way back in if you simply forgot your password.
- Go to your login page (usually yourdomain.com/wp-login.php).
- Click “Lost your password?”
- Enter your username or email address.
- Check your inbox for the reset link and follow the instructions.
What if the email doesn’t arrive?
- Double-check your spam or junk folder.
- Make sure you’re using the correct email address tied to your WordPress account.
- If your site isn’t sending emails properly, you’ll need to reset your password another way (see the next section).
2. Reset your password using phpMyAdmin
If the reset email doesn’t work, or you don’t have access to the inbox, phpMyAdmin lets you update your password directly in the database.
- Log into your hosting account and open phpMyAdmin (usually found in cPanel).
- Select the database your WordPress site uses (you can check wp-config.php to find it).
- Click the table named wp_users (it might have a different prefix, like wp34_users).
- Find your username and click Edit.
- In the user_pass field, select MD5 from the function dropdown.
- Enter your new password in the Value field.
- Click Go to save changes.
Now go back to your login screen and try the new password.
3. Disable plugins via FTP or your host’s file manager
A plugin conflict can cause login errors, especially after an update or new installation. Disabling all plugins can help you rule this out.
- Connect to your site via FTP using a client like FileZilla, or use the File Manager in your hosting dashboard.
- Navigate to wp-content/.
- Find the folder called plugins.
- Rename it to something like plugins_disabled.
This disables all plugins without deleting them.
- Try logging in again. If it works, a plugin was the issue.
- Rename the folder back to plugins to reactivate them.
- Reactivate each plugin one at a time from the dashboard until the issue returns. That’s your culprit.
4. Clear your browser cache and cookies
It sounds simple, but corrupted browser data can sometimes block you from logging in.
To clear cache and cookies:
- On Chrome: Click the three dots in the top-right corner > More Tools > Clear Browsing Data.
- Select Cookies and other site data and Cached images and files, then click Clear Data.
Close your browser, reopen it, and try again.
5. Check your IP address and security plugin settings
Security plugins like Wordfence or iThemes Security might block your IP if they detect suspicious behavior.
Here’s how to check and fix that:
- Try accessing your site from a different internet connection (like mobile data) to see if it’s an IP issue.
- If your IP is blocked, use FTP or File Manager to rename the security plugin folder under wp-content/plugins/. This disables the plugin.
- Log in and check the plugin’s settings for blocked IPs.
- Whitelist your IP if possible, or remove it from the block list.
Tip: You can find your current IP by Googling “What is my IP?”
6. Restore your site from a backup
If a recent update or hack broke your login, restoring your site to an earlier version can be a last-resort fix.
How to restore:
- Many hosting providers have automatic backups you can restore from your control panel.
- If you use a plugin like UpdraftPlus, you can restore from the plugin dashboard—if you still have access through FTP or WP-CLI.
- Keep in mind this will undo any changes made since the backup date.
Make sure to back up the current version first (just in case), even if it’s not working properly.
7. Fix file permission errors
WordPress relies on correct file and folder permissions. If they’ve been changed accidentally, it might lock you out.
- Connect via FTP or File Manager.
- Check that:
- Files (like wp-login.php) have permission set to 644
- Folders (like wp-content) are set to 755
- Files (like wp-login.php) have permission set to 644
If you see anything else (like 000 or 777), change it back.
Incorrect permissions might come from a plugin or script, so review recent changes.
8. Repair the WordPress database
A corrupted database can also prevent you from logging in.
- Open your site’s wp-config.php file via FTP or File Manager.
- Add this line of code before the /* That’s all, stop editing! */ line:
define(‘WP_ALLOW_REPAIR’, true); - Visit yourdomain.com/wp-admin/maint/repair.php
- Click Repair and Optimize Database
Once complete, remove the line from your wp-config.php file.
9. Check if your user role changed
If your admin role was removed, or if your user account was deleted, you won’t be able to log in or access the dashboard properly.
You can verify and fix this in phpMyAdmin:
- Go to the wp_users table and find your username.
- Copy your ID number.
- Open the wp_usermeta table.
- Look for rows with your user ID and meta key wp_capabilities.
- Make sure the value is:
a:1:{s:13:”administrator”;b:1;}
If it’s different (or missing), edit it or create a new row using your user ID.
10. Contact your hosting provider
If none of these solutions work—or if you’re not comfortable making changes in phpMyAdmin or FTP—your web host can help.
Most hosting providers will:
- Help you reset your password
- Check for server-level blocks or firewall issues
- Restore a backup on your behalf
- Review error logs for clues
This is often the fastest route if you’re completely stuck.
Bonus: how to prevent future lockouts
Once you’re back in, take a few steps to make sure it doesn’t happen again:
- Use a password manager to avoid forgotten logins
- Enable 2FA (two-factor authentication) using a plugin like WP 2FA
- Create a second admin user as a backup
- Set up email logging with a plugin like WP Mail SMTP to make sure reset emails are delivered
- Use a backup plugin like UpdraftPlus or Jetpack VaultPress Backup
These tools will save you from hours of stress next time something goes wrong.
Next steps for fixing a WordPress lockout
WordPress login issues happen to beginners and pros alike. Whether it’s a forgotten password, plugin conflict, or IP block, there’s always a fix—as long as you know where to look.
Start with the lost password link, then work through the steps above until you’re back in control. If needed, your host is always a great backup resource.
Ready to upgrade your WordPress experience? Professional hosting improves speeds, security, and reliability for a website and a brand that people find engaging and trustworthy.
Don’t want to deal with server management and maintenance? Our fully managed hosting for WordPress is the best in the industry. Our team are not only server IT experts, but WordPress hosting experts as well. Your server couldn’t be in better hands.
Click through below to explore all of our hosting for WordPress options, or chat with a WordPress expert right now to get answers and advice.
Additional resources
Diagnosing WordPress errors on your site →
Even more common errors, how to troubleshoot them, and how to solve them
Error: WordPress missed schedule – why it happens and how to fix it →
Fix the “missed schedule” WordPress error and ensure your scheduled posts publish reliably and on time.
What is managed WordPress hosting? →
What it means, what it includes, and how to decide if it’s right for you