# 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.

Canonical: https://scaplet.com/errors/http/403/wordpress

Guide Error · HTTP status codes

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

403 4xx · Client error

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](#where-a-wordpress-403-comes-from)
2. [Rules that deny by design, and when they hit the wrong path](#rules-that-deny-by-design-and-when-they-hit-the-wrong-path)
3. [Plugins, firewalls, wp-admin and the REST API](#plugins-firewalls-wp-admin-and-the-rest-api)
4. [Verify the fix](#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 with [ChatGPT](https://chatgpt.com/?hints=search&q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fhttp%2F403%2Fwordpress%20(%22403%20Forbidden%20in%20WordPress%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Claude](https://claude.ai/new?q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fhttp%2F403%2Fwordpress%20(%22403%20Forbidden%20in%20WordPress%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Perplexity](https://www.perplexity.ai/search?q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fhttp%2F403%2Fwordpress%20(%22403%20Forbidden%20in%20WordPress%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [![Google](/logos/ai/google-color.svg)AI Mode](https://www.google.com/search?udm=50&q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fhttp%2F403%2Fwordpress%20(%22403%20Forbidden%20in%20WordPress%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.)

_01_The 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](/errors/http/403).

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](/errors/http/403/apache) and for nginx [403 Forbidden in nginx](/errors/http/403/nginx).

_02_Fix 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)
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)
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
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](/errors/http/404/wordpress).

_03_Good 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.

Does the 403 mean you are blocked?

It can. Firewall rules and IP lists can refuse one address while others get through. Try from a different network or ask your host to check the firewall log for your IP.

_04_How it works

## Verify the fix

Google does not index URLs that return a 403 and drops those already indexed; see [4xx errors](/seo-issues/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.

_01_ How 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.

_02_ Why 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.

_03_ How 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.

_04_ Does 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. 01 [RFC 9110: HTTP Semantics](https://www.rfc-editor.org/rfc/rfc9110.html) rfc-editor.org · checked 2026-10-25
2. 02 [WordPress Advanced Administration: Apache HTTPD / .htaccess](https://developer.wordpress.org/advanced-administration/server/web-server/httpd/) developer.wordpress.org · checked 2026-10-25
3. 03 [WordPress Advanced Administration: Nginx](https://developer.wordpress.org/advanced-administration/server/web-server/nginx/) developer.wordpress.org · checked 2026-10-25
4. 04 [WordPress Advanced Administration: Security and hardening](https://developer.wordpress.org/advanced-administration/security/hardening/) developer.wordpress.org · checked 2026-10-25
5. 05 [WordPress Advanced Administration: Common WordPress errors](https://developer.wordpress.org/advanced-administration/wordpress/common-errors/) developer.wordpress.org · checked 2026-10-25
6. 06 [WordPress.org Documentation: FAQ Troubleshooting](https://wordpress.org/documentation/article/faq-troubleshooting/) wordpress.org · checked 2026-10-25
7. 07 [WordPress REST API Handbook: Authentication](https://developer.wordpress.org/rest-api/using-the-rest-api/authentication/) developer.wordpress.org · checked 2026-10-25
8. 08 [How HTTP status codes affect Google's crawlers](https://developers.google.com/crawling/docs/troubleshooting/http-status-codes) developers.google.com · checked 2026-10-25

## Keep learning

[All errors](/errors)

[Learn 403 Forbidden HTTP status codes](/errors/http/403) [Related 4xx errors Status codes and links](/seo-issues/4xx-errors) [Read next 404 Not Found in WordPress HTTP status codes](/errors/http/404/wordpress) [Do Run a free site audit Free, about two minutes](/site-audit)

Other 403 errors
[403 Forbidden in Laravel](/errors/http/403/laravel) [403 Forbidden in nginx](/errors/http/403/nginx) [403 Forbidden in Spring Boot](/errors/http/403/spring-boot) [403 Forbidden on Cloudflare](/errors/http/403/cloudflare) [403 Forbidden on CloudFront](/errors/http/403/cloudfront)

Nearby in errors
[404 Not Found](/errors/http/404) [404 Not Found on Apache](/errors/http/404/apache)

More in 403 Forbidden
[403 Forbidden in Apache](/errors/http/403/apache) [403 Forbidden in Chrome](/errors/http/403/chrome) [403 Forbidden in Django](/errors/http/403/django) [403 Forbidden in IIS](/errors/http/403/iis) [403 Forbidden in Laravel](/errors/http/403/laravel) [403 Forbidden in nginx](/errors/http/403/nginx) [403 Forbidden in Spring Boot](/errors/http/403/spring-boot) [403 Forbidden in WordPress](/errors/http/403/wordpress) [403 Forbidden on Cloudflare](/errors/http/403/cloudflare) [403 Forbidden on CloudFront](/errors/http/403/cloudfront)

Free · 2 minutes

## Tools point. Agencies advise. _This one ships._

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

[Audit my site free](/site-audit)

Free, no card 60 seconds Nobody will call you

- **46** fixes shipped without a ticket Brightpipe
- **0→7** ChatGPT citations in six weeks Paylane
