403 Forbidden in WordPress: Plugin, .htaccess and Permission Fixes

403 Forbidden in WordPress: Plugin, .htaccess and Permission Fixes

Written by

in

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

Fix Box — Try this first (10 seconds)

A WordPress 403 usually comes from one of three layers. First, check file permissions: files need 644, folders need 755. Second, open .htaccess and look for a Deny or Require all denied rule.

Third, disable your security plugin for one minute and reload. If you are not sure which layer blocks you, start with our 403 pillar guide and the 403 Checker.

What a WordPress 403 looks like

The browser shows a plain page that says “403 Forbidden”. Sometimes WordPress adds its own message about access being denied.

The page loads fast, because the server refuses the request early.

A 403 is different from a 404. The file exists, but the server will not serve it to you.

RFC 9110 defines 403 as a refusal the server understands but will not fulfill.

Cause 1: File permissions

Every file has read and write permissions. Web servers need read access to serve a file. If a file is set to 000, nobody can read it.

WordPress uploads often break this way after a migration. The files arrive, but their permissions arrive wrong too. The fix is mechanical: 644 for files, 755 for folders.

Cause 2: A deny rule in .htaccess

Security plugins and hardened setups write rules into .htaccess. A single Require all denied line blocks every visitor. The rule does not care who you are.

Old rules also survive plugin removal. You delete the plugin, but its .htaccess block stays behind. That leftover block keeps returning 403.

Cause 3: A security plugin blocks you

Login-protection plugins count failed attempts per IP address. Cross the limit and the plugin blocks your whole IP. You then see 403 even on public pages.

This block feels random, because it follows your IP, not your account. A different network often works immediately. That pattern points at the plugin, not the server.

Our lab test: permission 000 and deny-all

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

Then we set the file permission to 000 and requested it again.

The server answered 403, and the log recorded the reason verbatim:

2026/12/02 01:24:30 [error] open() "/tmp/lab403root/index.html" failed (13: Permission denied), client: 127.0.0.1, request: "GET /index.html HTTP/1.1"

We restored permission 644 and the same request returned 200. Next we added a deny-all rule file. The server answered 403 again, with a different log line:

2026/12/02 01:24:30 [error] access forbidden by rule, client: 127.0.0.1, server: lab403, request: "GET /index.html HTTP/1.1"

Removing the deny rule restored 200 at once. Two different causes, two different log lines, one status code. The log tells you which fix you need.

Step-by-step fix

First, connect by FTP or your host file manager. Select your files and set them to 644. Select your folders and set them to 755.

Second, open .htaccess in the WordPress root. Look for Deny, Require all denied, or a block you do not recognise.

Back up the file, remove the suspect block, and reload.

Third, rename your security plugin folder temporarily. If the site loads, the plugin was the blocker. Re-enable it and whitelist your IP in its settings.

Still stuck? Compare your symptoms with the Nginx and Apache guide, because many WordPress hosts run those servers.

If Cloudflare sits in front of your site, read the Cloudflare 403 guide next.

What Did Not Work

Changing permissions on the top folder only did nothing in our first pass. The blocked file inside kept its own 000 permission.

Permissions apply per file, not per folder tree, unless you apply them recursively.

Clearing the browser cache also changed nothing. A 403 is a server decision, not a cached page.

We record this because it is the first thing most people try.

Prevention

After any migration, run a permission sweep before you test pages. Keep a clean copy of your working .htaccess.

Note which plugin writes rules into it, so leftovers are easy to spot.

FAQ

Frequently Asked Questions

Why do I get 403 only on wp-admin?

A plugin or rule often protects the admin path specifically. Check `.htaccess` for a block that names wp-admin. Then test with the security plugin disabled.

Can a 403 be caused by my host?

Yes, hosts sometimes block IPs after abuse reports. If every device on your network fails, ask the host to check their firewall. Mention the exact time of a failed request.

Is 403 the same as 401?

No. A 401 asks for credentials you have not provided. A 403 means the server understood you and still refuses.

Sources and date

Lab test: 2 Dec 2026, local lab server on our SI machine (Python 3.13.5, log lines above verbatim, client IP is localhost).

This page follows the 403.my.id LAB standard: reproduction, before-and-after logs, tested config, and one diagnostic aid (the permission checklist above).

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
  • Apache HTTP Server — Access control how-to: https://httpd.apache.org/docs/2.4/howto/access.html

Comments

Leave a Reply

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


More posts