Free auditStart free
GuideError · HTTP status codes

403 Forbidden in WordPress

Fix a WordPress 403 Forbidden: find the refusing rule in .htaccess, server blocks, security plugins, firewalls, wp-admin protection or REST API nonces.

4 min
read
8
sources
Oct 21, 2026
updated
Scaplet Editorial Team
author
The short answer

A WordPress 403 Forbidden means the web server or a security layer refused the request before or while WordPress ran. Look at .htaccess rules and server blocks that deny paths, a security plugin or firewall, password protection on /wp-admin/, and for REST calls a missing nonce. Find the rule in the server error log; deactivate plugins to rule out a plugin.

  1. Where a WordPress 403 comes from
  2. Rules that deny by design, and when they hit the wrong path
  3. Plugins, firewalls, wp-admin and the REST API
  4. Verify the fix
30-second check

Where does your site stand?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?
Summarize this page withChatGPTClaudePerplexityGoogleAI Mode
01The four sources of a WordPress 403

Where a WordPress 403 comes from

RFC 9110 defines 403 as the server understanding the request and refusing to fulfill it. In a WordPress stack the refusal comes from one of four places, and the general meaning is on 403 Forbidden.
Source

Web server rules

Examples from the WordPress handbook
.htaccess rules such as Require all denied and RewriteRule ... [F]; nginx deny all
Where to look
.htaccess, vhost or nginx config
Source

A firewall plugin or WAF

Examples from the WordPress handbook
Plugins that modify .htaccess, or act inside WordPress, plus ModSecurity
Where to look
The plugin's block log; the server's WAF log
Source

Protection you added on purpose

Examples from the WordPress handbook
Password protection or IP allow rules on /wp-admin/
Where to look
/wp-admin/.htaccess and host panel settings
Source

WordPress itself (REST API)

Examples from the WordPress handbook
A cookie-authenticated request with no nonce
Where to look
The request headers and parameters

The server's own error log names the rule for server-level denials. For Apache see 403 Forbidden in Apache and for nginx 403 Forbidden in nginx.

02Fix it on your stack

Rules that deny by design, and when they hit the wrong path

The WordPress handbook gives rules that return a 403 on purpose. They are correct for the files they protect and cause a 403 when a path is mistaken or a rule is too wide.
Deny web access to sensitive files (.htaccess)
<FilesMatch "^(wp-config\.php|\.htaccess|\.htpasswd|debug\.log)$">
    Require all denied
</FilesMatch>
Block include-only scripts (the [F] flag returns 403)
RewriteRule ^wp-admin/includes/ - [F,L]
RewriteRule ^wp-includes/[^/]+\.php$ - [F,L]
nginx rules from the WordPress guide
location ~ /\. {
    deny all;
}
location ~* /(?:uploads|files)/.*\.php$ {
    deny all;     # PHP in uploads is refused on purpose
}

If a plugin or theme asks a visitor to load a .php file from uploads, or a script from wp-includes, the 403 is the rule doing its job, not a bug in WordPress. Move the script out of the blocked path. Note also that a hidden-file rule blocks paths that start with a dot. If you add the wp-includes rewrite rules yourself, the handbook says to place them outside the # BEGIN WordPress and # END WordPress lines so WordPress does not overwrite them, and warns that the wp-includes/[^/]+\.php$ rule stops ms-files.php from generating images on Multisite.

If the 403 started after you edited .htaccess or a plugin rewrote it, restore the default rules. WordPress's handbook says its .htaccess page may be used to restore a corrupted file, for example after a misbehaving plugin. Rename the file to .htaccess_old, load the site, then re-save Settings > Permalinks to get a fresh copy. The default block is on 404 Not Found in WordPress.

03Good to know

Plugins, firewalls, wp-admin and the REST API

Rule out plugins first. Deactivate all plugins; if you cannot get to the dashboard, rename wp-content/plugins to plugins.hold over FTP or in your host's file manager, test, and rename it back. WordPress's hardening guide notes that firewall plugins either modify .htaccess to restrict access at the Apache level or act inside WordPress, and that a web server WAF such as ModSecurity or a reverse proxy service can filter requests before WordPress sees them. A 403 that appears for your IP and not for others can point here.

Hardening can break things. The handbook says server-side password protection on /wp-admin/ can break parts of WordPress such as the AJAX handler at wp-admin/admin-ajax.php. Ensure that file stays reachable. For an IP allow list it shows a RequireAny block with Require ip lines; a visitor outside the list is denied.

For the REST API: the standard login method is cookie authentication, and requests need a nonce, sent as the X-WP-Nonce header or the _wpnonce parameter. Without one, WordPress sets the current user to 0, which turns the request into an unauthenticated one even if you are logged in, so an endpoint that requires a user can refuse it.

04How it works

Verify the fix

Google does not index URLs that return a 403 and drops those already indexed; see 4xx errors.

  1. 01

    Reproduce with curl

    Run curl -sI against the failing URL and note the status.

  2. 02

    Change one thing

    Restore .htaccess, deactivate plugins, or loosen one rule, then test again.

  3. 03

    Check the log

    The server error log should stop showing a denial for that path.

Questions

Asked a lot.

4 questions people ask next, answered from the sources on this page.

01How do I fix a 403 Forbidden error in WordPress?

Read the server error log for the rule that refused the request. Restore the default .htaccess rules, deactivate plugins (rename wp-content/plugins if you cannot log in), and check any firewall, WAF or /wp-admin/ protection. Test after each change.

02Why is WordPress not letting me log in?

A 403 on /wp-admin/ or the login page can come from a security plugin, a firewall, password protection on /wp-admin/, or an IP allow rule. Deactivate plugins first, then check /wp-admin/.htaccess and your host's firewall.

03How do I resolve a 403 Forbidden error in the WordPress REST API?

Send the nonce with cookie-authenticated requests, as the X-WP-Nonce header or _wpnonce parameter. Without it WordPress sets the current user to 0, so the request is unauthenticated even if you are logged in.

04Does 403 Forbidden mean I'm blocked?

It can, if a firewall or IP rule refuses your address. Test from another network, and ask your host to check the firewall log.

Sources · 8

Every fact, linked and dated.

Official docs first. The date is when we last opened each page.
  • rfc-editor.org
  • wordpress.org
  • google.com
  1. 01RFC 9110: HTTP Semanticsrfc-editor.org · checked 2026-10-25
  2. 02WordPress Advanced Administration: Apache HTTPD / .htaccessdeveloper.wordpress.org · checked 2026-10-25
  3. 03WordPress Advanced Administration: Nginxdeveloper.wordpress.org · checked 2026-10-25
  4. 04WordPress Advanced Administration: Security and hardeningdeveloper.wordpress.org · checked 2026-10-25
  5. 05WordPress Advanced Administration: Common WordPress errorsdeveloper.wordpress.org · checked 2026-10-25
  6. 06WordPress.org Documentation: FAQ Troubleshootingwordpress.org · checked 2026-10-25
  7. 07WordPress REST API Handbook: Authenticationdeveloper.wordpress.org · checked 2026-10-25
  8. 08How HTTP status codes affect Google's crawlersdevelopers.google.com · checked 2026-10-25
Free · 2 minutes

Tools point. Agencies advise. This one ships.

Run the free audit, then approve the fixes. Every change can be undone.

Free, no card60 secondsNobody will call you
  • 46 fixes shipped without a ticket Brightpipe
  • 0→7 ChatGPT citations in six weeks Paylane