Get back into the WordPress admin by identifying a redirect, a PHP error, a cookie, a user role or a security block. The priority is to restore a situation under control without wiping the traces useful to the diagnosis.

How do I recognise being locked out of wp-admin?
On WordPress, a visible outage can come from the core, the theme, a plugin, PHP, the database or the server. A reliable fix isolates one variable at a time and always keeps the option of going back. Start by noting when it appeared, the most recent changes, the URLs concerned and the behaviour observed.
Note the page's HTTP status, test in a private window, and read the PHP error log along with debug.log if WordPress debugging is enabled. Note too whether the admin is still reachable: the answer points straight at the theme, a plugin or the server environment.
A login loop
A 403, 404 or 500 error on wp-admin
The password is accepted, then you are back at the login screen
One signal alone does not prove the cause: âA login loopâ can come from âThe WordPress address or the site address is misconfiguredâ just as easily as from âAn inconsistent login cookie or cacheâ. Look for at least two findings that agree before you apply a lasting fix.
Telling the causes apart by how /wp-admin behaves
Being locked out does not always look the same: a redirect loop back to wp-login.php, a 403 error, a blank page, a âSorry, you are not allowedâ message, or a password refused. Each behaviour points at a different cause: cookies and the site's URL, a firewall rule, a PHP error, or an account that has been changed.
A login loop usually comes from a mismatch between the siteurl and home options â http against https, with or without www â or from a cookie a cache is blocking. A 403 error points rather at a security plugin, an .htaccess rule, or IP filtering on the server.
Getting back in without weakening your security
The WP_HOME and WP_SITEURL constants in wp-config.php let you force the site's address while you fix the options in the database. For a lost password with no working email, WP-CLI offers wp user update username --user_pass=new-password, safer than editing by hand in phpMyAdmin.
If a security plugin locked you out, rename its folder rather than deleting it, then re-enable it once you are back in and have fixed its list of allowed addresses. While you are in there, review the administrator list: an account you do not recognise changes the nature of the incident entirely.
Causes to check
For being locked out of wp-admin, the 4 causes below are ranked from the commonest to the rarest. Test the one matching the siteâs most recent change first, one at a time.
The WordPress address or the site address is misconfigured
An inconsistent login cookie or cache
A security plugin blocking your IP address
The administrator role has been changed, or the account is compromised
The recovery email WordPress sends, the Site Health report, the update history and the PHP logs often name the file and the line at fault. Start from that evidence rather than disabling plugins at random.
A good fix does not merely make the symptom disappear. It explains why the problem appeared and how to check that it does not come back.
Precautions before starting
Make a full backup of the files and the database, even if an automatic backup already exists, and write down the versions of WordPress, the theme, the plugins and PHP. Keep that copy off the server in question, and check it opens.
If the site is still taking form submissions or orders, plan a short maintenance window so nothing is written while you work.
Quick diagnosis: why is wp-admin blocked?
Three questions to aim the fix before changing anything in the database.
Want a human opinion on your exact situation?
Get a recommendationDiagnosis and fix
| Phase | Objective | A mistake to avoid |
|---|---|---|
| Observe | Reproduce it and gather the evidence | Changing several settings before you have a baseline |
| Isolate | Confirm the component or the rule responsible | Deleting files without keeping a copy |
| Fix | Apply the smallest documented change | Restoring a version that still contains the same cause |
| Validate | Test the whole journey and monitor it | Concluding from the home page loading alone |
How do I resolve being locked out of wp-admin step by step?
The 4 steps below tackle being locked out of wp-admin from the least intrusive to the heaviest. After each change, repeat the same test; if nothing changes, go back to the previous state before moving on to the next step.
- 01
Step 1
Test in a private window and note the exact HTTP code.
- 02
Step 2
Check siteurl and home in the database without changing them blind.
- 03
Step 3
Disable the suspect plugin temporarily from the files.
- 04
Step 4
Reset the administrator account, then review every privileged user.
sign in with a named account on several browsers.
Validate the resolution
Walk through the journey that was failing, then check the admin, the editor, the media library, the forms and user login. Clear the caches (plugin, server and CDN) before you conclude, or an old version can hide the result.
Validation checks
Watch the PHP log for a few days: some errors only surface when a scheduled task (WP-Cron) or a nightly backup runs.
Prevent a recurrence
Prevention has to answer the cause you identified. For being locked out of wp-admin, the first measure is âKeep two named administratorsâ; note too the signal that would have shown the incident sooner, and who is responsible for watching for it.
Keep two named administrators
Turn on two-factor authentication
Document the login URLs
Monitor the failed attempts
Apply updates on a staging copy, or failing that after a verified backup, one plugin at a time. Checking the key pages after each update catches most regressions before visitors do.
Frequently asked questions about being locked out of wp-admin
Why am I sent back to the login page over and over?
Most often the site address stored in the database does not match the address in use (http or https, with or without www), or a cache stops the session cookie being taken into account. The WP_HOME and WP_SITEURL constants let you test a corrected address.
How do you reset a password without email?
With SSH access, WP-CLI can set a new password for an existing account. Failing that, the host or the maintenance provider can do it from the database. Avoid sharing your credentials by email for this.
Does a 403 error on wp-admin mean you have been hacked?
Not necessarily. A security plugin, a web application firewall or an IP filtering rule can block you after several attempts. Do review the administrator list once you are back in, though.
How do you check the fix will hold?
Log in with a named account in more than one browser. Check the permissions and the admin email address. Check the protections are back on without a fresh block. Then watch the logs, the alerts and the relevant metrics for several days.
How to resolve it
If being locked out of wp-admin persists after these steps, we can pick the diagnosis up again from your logs and your access details, without acting blind on the site.
Get a diagnosisSummary with an AI
Choose your assistant: the request is prefilled where that is possible, and always copied, ready to paste if need be.

































đȘ