8 Ways to Fix the 403 Forbidden Error in WordPress

The 403 Forbidden error in WordPress appears when the server understands your request but refuses to authorize it. Unlike a 404 (page not found) or a 500 (internal server error), a 403 indicates a permissions or access control issue. The most common cause is a corrupted .htaccess file or incorrect file permissions, and the quickest fix is to reset the .htaccess file via the WordPress admin dashboard.

What Causes the 403 Forbidden Error in WordPress?

Before diving into fixes, it helps to understand common triggers. The 403 error is almost always a server-side permission problem, not a missing page or a script crash.

Before You Start: Back Up Your Site and Database

Always create a full backup — files and database — before making changes. A small misstep in file permissions or .htaccess can take your entire site offline. Use your hosting control panel or a plugin like UpdraftPlus to export a backup.

1. Is Your .htaccess File Corrupted? Reset It.

The .htaccess file is the most common culprit. A corrupted rule or a leftover redirect can trigger a 403. Resetting it takes 30 seconds.

Steps:

  1. Log in to your WordPress admin dashboard.
  2. Go to Settings → Permalinks.
  3. Click Save Changes — no need to change any option. WordPress regenerates the .htaccess file automatically.
  4. If you cannot access the admin area, use FTP or cPanel File Manager to rename .htaccess to .htaccessold in your site's root folder. Then visit your site — if it loads, the error is gone. Create a new .htaccess by saving permalinks once you regain access.
# Example .htaccess generated by WordPress

BEGIN WordPress

RewriteEngine On RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L]

END WordPress

2. Are Your File Permissions Set Correctly?

Incorrect file permissions can block WordPress from reading files. The standard setup is 755 for directories and 644 for files. The wp-config.php file should be 600 or 640.

How to check via FTP:

  1. Connect to your server using an FTP client (e.g., FileZilla).
  2. Navigate to your WordPress root directory.
  3. Right-click the wp-content folder, select File Permissions, set it to 755, and check Recurse into subdirectories (apply to directories only).
  4. Repeat for a file (e.g., index.php) — set to 644 and apply to files only.

If you're unsure, many hosting panels offer a "Reset file permissions" tool. Use it if available.

3. Could a Plugin or Theme Be Blocking Access?

A newly installed plugin or theme — especially security or caching plugins — can accidentally block your IP or the entire admin area.

Disable all plugins via FTP:

  1. Go to /wp-content/plugins/ via FTP.
  2. Rename the entire plugins folder to pluginsold.
  3. Check your site. If the 403 disappears, a plugin is the culprit.
  4. Rename the folder back to plugins, then rename individual plugin folders one by one to identify the offender.

For themes, rename the active theme folder inside /wp-content/themes/ (e.g., twentytwentyfour to twentytwentyfourold). WordPress will fall back to a default theme.

4. Is a Security Plugin Blocking Your IP?

Popular security plugins like Wordfence or iThemes Security maintain IP blocklists. If you triggered a rule (e.g., too many login attempts), your own IP can get blocked.

Fix via FTP:

  1. Rename the security plugin's folder in /wp-content/plugins/ to deactivate it.
  2. Alternatively, access your database via phpMyAdmin and delete the plugin's option rows (e.g., wordfenceblockedIPs).
  3. Once you regain access, whitelist your IP in the plugin's settings.

5. Are Your WordPress URL Settings Wrong?

If the WordPress Address (URL) and Site Address (URL) in Settings → General point to different domains (e.g., one with www and one without), WordPress may redirect to a forbidden URL.

Fix via wp-config.php: Add these lines before the / That's all, stop editing! / line:

define('WPHOME', 'https://yourdomain.com');
define('WPSITEURL', 'https://yourdomain.com');

Replace https://yourdomain.com with your actual site URL. Save the file and reload your site.

6. Is modsecurity or a Server Firewall Blocking You?

modsecurity is a web application firewall that can trigger false positives and block legitimate requests. Your hosting provider must disable it for your account.

What to do:

<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>

Place it at the top of your .htaccess file. If it works, the error is caused by modsecurity.

7. Is Your CDN or Caching Plugin Causing the 403?

Content delivery networks (CDNs) like Cloudflare or caching plugins like WP Rocket sometimes cache a 403 response or block requests from certain IP ranges.

Troubleshoot:

8. Could It Be a Hosting-Level Block?

Some hosting providers implement hotlink protection, IP deny lists, or .htaccess overrides that you cannot see. If none of the above fixes work, contact support with clear details.

What to tell support:

Most hosts can resolve this in minutes once they know the context.

CauseEasiest FixTime Estimate
Corrupted .htaccessReset via Permalinks1 minute
File permissionsSet 755/644 via FTP5 minutes
Plugin conflictRename plugins folder5 minutes
Security plugin blockRename plugin folder3 minutes
Wrong URL settingsEdit wp-config.php2 minutes
modsecurityContact host10–30 minutes
CDN/cachingPause CDN or rename plugin5 minutes
Hosting firewallContact host10–30 minutes

How to Prevent the 403 Forbidden Error in the Future

Prevention is simpler than recovery. Stick to these habits:

Once your site is healthy again, focus on growing it. nativeWP helps you publish SEO-optimized content on autopilot — connect your own OpenRouter API key and bulk-generate articles directly into WordPress. Learn more about nativeWP.

Frequently Asked Questions

What is the difference between a 403 Forbidden error and a 404 error?

A 404 error means the page doesn't exist on the server. A 403 error means the server found the page but refuses to serve it — usually due to permission settings.

Can a 403 error be caused by a plugin?

Yes, security and caching plugins are common triggers. They can block your IP, restrict file access, or cache a 403 response. Deactivating plugins via FTP is the fastest way to test.

Do I need to edit my .htaccess file to fix a 403 error?

Not always. The easiest fix is to reset .htaccess by saving permalinks. If that doesn't work, you can manually edit or replace the file with a clean WordPress .htaccess.

What file permissions should my WordPress folders have?

Directories should be set to 755 (or 750 on some hosts), and files to 644 (or 640). The wp-config.php file should be 600 or 640 for security.

Should I contact my hosting provider for a 403 error?

If you've tried all the fixes above and the error persists, yes. Hosting-level blocks, modsecurity rules, or server firewall configurations can only be changed by your host.