403 Forbidden on wp-admin: Locked Out of Your Own Dashboard

403 Forbidden on wp-admin: Locked Out of Your Own Dashboard

Written by

in

Lab-tested: Local lab server (Python 3.13.5, nginx-style log format) · 2 Dec 2026 · Reproduced and fixed in our lab

Fix Box — Try this first (10 seconds)

Do not keep retrying the login — you may be feeding a lockout counter. Open FTP or your host file manager and rename the security plugin folder inside wp-content/plugins/ (add .disabled).

Then load /wp-admin/ again. In our lab that single rename restored the dashboard instantly. The 403 pillar guide maps every layer, and the 403 Checker confirms the result.

The symptom: site up, dashboard forbidden

Your homepage loads fine for visitors. Only /wp-admin/ or /wp-login.php answers 403 Forbidden. That split is the clue: the block targets the admin path, not the whole site.

Two layers do this most often. A security plugin locked your IP after failed logins. Or the host’s ModSecurity rules flagged your login request as an attack pattern.

Cause 1: security plugin IP lock

Login-limit plugins count failed attempts per IP address. Pass the threshold and the plugin blocks that IP from the admin area.

A changed home IP, a VPN, or a colleague’s typos can lock out the real admin.

The block lives in the plugin, not in WordPress core. That is good news. Disabling the plugin from outside WordPress removes the lock.

Cause 2: ModSecurity on wp-login

Many hosts run ModSecurity with the OWASP Core Rule Set. The rules score every request for attack patterns.

An empty or unusual User-Agent, a missing header, or a burst of login POSTs can cross the anomaly threshold.

The server then returns 403 before WordPress even sees the request. The error log names the rule, for example rule 949110 (anomaly score exceeded).

Our lab test

We reproduced both causes on a local lab server on 2 Dec 2026. The baseline dashboard request returned 200.

We then switched on a security-plugin style IP lock for /wp-admin/.

The dashboard returned 403 while the homepage stayed 200, exactly the real-world symptom:

2026/12/02 [error] access forbidden by rule (security plugin IP lock), client: 127.0.0.1, server: lab403b, request: "GET /wp-admin/"

Renaming the plugin folder — the FTP recovery move — restored 200 immediately. We then sent a login request with an empty User-Agent.

The ModSecurity-style rule answered 403 with its rule ID in the log:

2026/12/02 [error] ModSecurity rule 949110 anomaly score exceeded, client: 127.0.0.1, server: lab403b, request: "GET /wp-login.php"

A normal browser User-Agent returned the login form with 200. Same URL, different request shape, different result.

Step-by-step recovery

First, stop retrying the login form. Each failed attempt can extend a plugin lockout. Note the exact time, because you will search logs by it.

Second, connect by FTP or your host file manager. Go to wp-content/plugins/ and rename your security plugin folder, for example wordfence to wordfence.disabled.

WordPress treats a missing folder as a deactivated plugin.

Third, load /wp-admin/ again. If the dashboard opens, log in and check the plugin’s lockout list. Whitelist your current IP before re-enabling the plugin folder name.

If the dashboard still returns 403 with all security plugins renamed, the block sits above WordPress. Check the host error log for a ModSecurity rule ID.

Ask the host to whitelist that rule for your domain, or use the host’s ModSecurity panel if they expose one.

If you run behind Cloudflare, also check Security Events for a blocked wp-login.php request. The Cloudflare guide covers that layer.

The WordPress 403 guide covers the plugin layer in full.

What Did Not Work

Waiting “a few minutes” did nothing in our test. The plugin lock had no short expiry while the plugin stayed active.

The rename was the only thing that cleared it.

Clearing browser cookies also changed nothing. The block keyed on the client IP and request shape, not on cookies.

A different browser on the same connection hit the same 403.

Prevention

Whitelist your own IP inside the security plugin before you need it. Keep a second admin account with a strong password and two-factor login.

After any lockout change, log in once from a normal browser to prove the path works.

Keep FTP credentials somewhere you can reach without the dashboard. Recovery from a wp-admin 403 always starts outside WordPress.

FAQ

Frequently Asked Questions

Can I recover without FTP?

Yes, if your host offers a file manager in its panel. That is the same rename through a web UI. Without either, only the host can disable the plugin for you.

Will renaming the plugin folder break my site?

WordPress deactivates a plugin whose folder disappears. The site keeps running without that plugin’s features. Rename it back after whitelisting your IP.

Why does only my office IP get 403?

The lock is per IP address. Other networks never hit the counter. That pattern confirms a plugin lock rather than a server rule.

How do I know it is ModSecurity and not a plugin?

Rename every security plugin first. If `/wp-login.php` still returns 403, read the host error log. A ModSecurity block names a numeric rule ID.

Sources and date

Lab test: 2 Dec 2026, local lab server on our SI machine (Python 3.13.5 emitting nginx-style log lines; client IP is localhost).

The recovery rename and the empty-User-Agent trigger are the exact actions measured above.

Tested actions:

# Recovery: disable the locking plugin from outside WordPress
mv wp-content/plugins/<security-plugin> wp-content/plugins/<security-plugin>.disabled
# Trigger that reproduced the ModSecurity-style block
curl -A "" https://example.com/wp-login.php   # -> 403
curl -A "Mozilla/5.0" https://example.com/wp-login.php   # -> 200

References

  • RFC 9110 §15.5.3 — 403 Forbidden: https://www.rfc-editor.org/rfc/rfc9110.html
  • MDN Web Docs — 403 Forbidden: https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/403
  • WordPress.org — Hardening WordPress: https://wordpress.org/documentation/article/hardening-wordpress/
  • OWASP Core Rule Set — Documentation: https://coreruleset.org/docs/

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *


More posts