Maintenance
Locked Out of wp-admin? Try This Recovery Checklist
If you can’t get into wp-admin, start with the simplest recovery path first: reset the password, check whether you’re using the right username or email, and clear out anything blocking login such as security plugins, browser issues, or a bad redirect. If that fails, there are safe ways back in through email, database access, hosting tools, or file-level changes, but always back up the site first before making risky edits.
The fastest fix depends on what kind of lockout you’re seeing. Sometimes WordPress is fine and only the login form is blocked. Other times the admin area is being redirected, returning an error, or refusing valid credentials because something changed after an update, a plugin conflict, or a security rule on the server.
What a wp-admin lockout usually looks like
“Locked out” can mean a few different things, and the symptom tells you where to look.
- You can reach
/wp-login.php, but the password won’t work. - The login page loops back to itself after you sign in.
- You see “Sorry, you are not allowed to access this page.”
- The login screen is blank, broken, or returns a critical error.
- Two-factor authentication or a security plugin is stopping access.
- You no longer have the email address associated with the admin account.
- The admin area is inaccessible after a migration, update, or hosting change.
Those are different problems, even though they feel the same. The good news is that most of them can be fixed without touching content, themes, or the database in a risky way.
Start with the safest recovery steps
Before you change anything, make a backup if you still have hosting access. If you’re using managed hosting, take a full file and database backup or create a snapshot. If you’re already locked out of the dashboard, use the host’s backup tools.
1) Reset the password the normal way
Use the Lost your password? link on the login screen. WordPress will send a reset email to the address attached to the user account.
If the email never arrives, check spam and any mail filtering in your host or email provider. On some sites, password-reset email delivery is broken because outbound mail isn’t configured properly. That does not mean your password is wrong; it means the reset message never reached you.
2) Confirm you’re using the right account
On older sites, the username is often not the same as the display name you remember. If multiple administrators exist, try each admin email you own. If the site was handed over by someone else, the original account may still be the only one with access.
3) Try a clean browser session
Open an incognito or private window and try again. Clear cookies for the site if the login page is looping or behaving strangely. A corrupted login cookie can make it look like WordPress is rejecting you when the session is actually the problem.
4) Check whether a security layer is blocking you
Security plugins, server-side firewall rules, Cloudflare settings, and host protections can block wp-admin after too many failed logins, a changed IP address, or suspicious traffic. If you recently enabled a security tool, look there first. You may be able to whitelist your IP or temporarily disable the blocking rule from your host dashboard.
If the login form works but access is blocked after sign-in
This is often where WordPress users lose the most time. The login accepts the username and password, then sends them right back out or shows a permissions message.
5) Disable plugins from the server side
If a plugin conflict is preventing admin access, the safest test is to disable all plugins by renaming the plugins folder through FTP, SFTP, SSH, or your host’s file manager. WordPress will stop loading those plugins on the next request.
If that brings admin back, rename the folder back and reactivate plugins one by one until the problem returns. That identifies the offender without guessing. If you want a structured approach, see How to Find the Plugin Causing a WordPress Conflict.
6) Switch the active theme if the theme is the problem
A broken theme can block admin access too, especially after an update or custom-code change. If you can reach the server, rename the active theme folder or switch to a default theme through the database or hosting tools. WordPress will fall back to another theme if one is available.
This is less common than a plugin issue, but it matters if the site broke right after a theme update or a child theme edit.
7) Check for a URL mismatch after migration or SSL changes
If the site was moved, converted to HTTPS, or had its domain changed, WordPress may be sending you to the wrong login URL or rejecting cookies. Verify that the WordPress Address and Site Address are correct. If you can’t access settings, check the values in the database or with your host.
URL mismatches often show up as endless login redirects. They’re especially common after migrations or when a host forces HTTPS without updating WordPress settings correctly.
How to get back in without the dashboard
If the standard reset and plugin checks don’t work, there are still safe recovery paths. Use the least invasive option you have access to.
8) Reset the password through your hosting control panel or database tool
Many hosts offer a database editor like phpMyAdmin or a WordPress toolkit. If you can access the database, you can update the admin password directly. Be careful here: the password field must be stored in the format WordPress expects, and that can vary depending on the method used. If you’re not sure, use your host’s WordPress tools or a documented password-reset process for your environment.
Always back up the database before editing it. A small mistake in the wrong table or row can create a bigger problem than the lockout itself.
9) Create a new admin account through a temporary file change
If you’re comfortable editing files and have server access, you can create a temporary recovery path by adding code that creates a new admin account on the next page load. This should be done carefully and removed immediately after use. It’s a last-resort method when the dashboard and password reset are both unavailable.
This approach is powerful, but it’s also the kind of change that should be handled cautiously. If there’s any doubt about the site’s state, get a backup first and consider professional help.
10) Use your host to restore a clean backup
If the lockout started right after an update, migration, or security event, restoring a known-good backup may be the quickest safe fix. This is often better than piecing together a broken admin session while the site remains unstable.
If the backup is recent and trustworthy, restoring it can save time and reduce risk. If the site has content changes since the backup, you’ll need to weigh recovery speed against the cost of losing those changes.
Special cases that need a different approach
Some lockouts are not just login problems. They point to a deeper issue in WordPress or on the server.
“Sorry, you are not allowed to access this page”
This often means a role or capability problem, a corrupted user record, or a mismatch caused by a migration. It can also happen if a plugin changed permissions. Check the account’s role, the user ID, and whether the database prefix changed during a move.
Login page keeps redirecting
That usually points to cookies, cached redirects, an SSL mismatch, or a bad site URL setting. It can also be caused by a plugin that handles security or redirects. Clear browser cookies, test in a private window, and verify the site URL settings before making deeper changes.
Login works on one device but not another
That suggests a browser cookie or security rule issue rather than a broken WordPress install. Try another browser, another network, or a private window. If the problem follows your IP address, a firewall or security plugin may be involved.
You were locked out after a hack or suspicious activity
If the site was compromised, the safest response is not just to regain admin access. You also need to clean the site, replace compromised credentials, review user accounts, and check for backdoors. For that scenario, start with WordPress Site Hacked? Here's How to Clean It Up — Safely.
How to prevent getting locked out again
Most repeat lockouts happen because no one has a recovery plan. Put these safeguards in place now, before the next problem shows up.
- Keep at least two administrator accounts with current, trusted email addresses.
- Store site and host access details in a secure password manager.
- Test password reset email delivery before you need it.
- Back up before every major update.
- Update plugins and themes in a controlled way, not all at once on a critical site.
- Limit aggressive login security settings that can lock out legitimate admins.
- Document how to access the host, database, and backups outside the dashboard.
If you want a more durable setup, a maintenance routine or managed care plan is worth it. See Care Plan if you’d rather have updates, backups, and monitoring handled for you.
When to stop troubleshooting and get help
Call a professional when you’ve already tried the safe steps and the site is still blocking access, especially if the lockout follows a hack, migration, or server change. It’s also time to stop if you need to edit the database, restore access through code, or troubleshoot without knowing whether the site is already compromised.
Mend handles locked-out WordPress sites every day, using a backup-first workflow and a plain-English report of what caused the problem. If you need a fast recovery without guesswork, start with a free diagnosis at /start/diagnosis. If the site is down or access is urgent, /start/emergency is the fastest route.
If you already know you need hands-on help and want a fixed price up front, you can also use /start/quick_fix. Access is handled securely with the free Mend Connect plugin, so you never need to share passwords directly. For the full service details, see /connect.
One final note: the safest way back into wp-admin is the one that preserves your data and tells you why the lockout happened. If you can’t get there confidently, don’t keep guessing. Restore access first, then fix the root cause.
Frequently asked questions
What should I try first if I can’t log into wp-admin?
Start with a normal password reset, check that you’re using the right admin account, and try a private browser window. Those are the safest and fastest checks.
Why does WordPress keep sending me back to the login page?
That usually points to cookies, a URL mismatch, SSL issues, caching, or a plugin that affects login flow. It can also happen after a migration or host change.
Can I regain admin access without the dashboard?
Yes. Depending on what access you still have, you may be able to use your host, the database, or server files to reset access. Back up first, because those methods can affect the site if done incorrectly.
When should I get professional help?
If the lockout follows a hack, update, migration, or server change, or if you need to edit the database or code to recover access, it’s safer to get help. That’s especially true if the site is live and important.