How to fix a 403 Forbidden Error in WordPress

Are you seeing a 403 error when you try to access your site? It’s one of the most frustrating errors a site owner can see when it comes unexpectedly. In this article we’ll go over the 403 forbidden error and how to fix it for WordPress.


What is the 403 Forbidden Error?

A 403 Forbidden error is shown in your browser when server can connect but doesn’t allow access to the specific page you are on. This is usually caused by server permissions being incorrect or configured incorrectly, often by a security plugin. A corrupt or misconfigured .htaccess file could also be the culprit.

Fixing the 403 Forbidden Error in WordPress

Any time you make changes to your site or server configurations, you should first take a backup. Hopefully you’ve already established a back-up schedule, but if not, be sure to back up the entire site before beginning.

Fix 403 error caused by a corrupt .htaccess file

If the .htaccess file on your site is mis-configured or corrupt, it can cause many issues including the 403 error. Thankfully, repairing this file is easy.

First, connect to your site using an FTP client or file manager in your hosting account.

Next, locate the .htaccess file in the root directory of your site. Download a copy of it for backup and restore purposes. Then go ahead and delete the file from the server.

Screenshot showing .htaccess deleted from server
Bye bye .htaccess file. Shown using Transmit FTP

Try to access your site. If you can browse around normally then you’ve found the issue. Next let’s reset the .htaccess file.

Resetting the .htaccess file

The .htaccess file is used by WordPress to manage, among other things, permalinks. To reset the file and generate a fresh copy, log into your WordPress dashboard and go to Settings > Permalinks. Double check the permalink settings are correct, and click Save Changes.

Fix 403 error caused by a problematic WordPress Plugin

Plugins can often cause issues in WordPress, either being poorly coded, or in conflict with another plugin or your theme. If a plugin is causing the 403 error, start by temporarily deactivating all WordPress plugins. Log into the WordPress dashboard and go to Plugins > Installed Plugins. Check the box above all and click Bulk Edit > Deactivate:

Screenshot showing bulk deactivating all plugins
Bulk edit is a quick way to deactivate all plugins

Check your site. If you can now access normally, then one of the plugins on your site was causing the error.

You can pinpoint which plugin was causing the issue by re-activating your plugins one at a time. When you can reproduce the 403 error you’ve found the problematic plugin.

Fix 403 error caused by incorrect file permissions

Files and folders on your website have file permissions. These permissions are settings that control who can access the files, as well as who can write to files and folders.

If the permissions to certain files or folders are incorrect, a 403 forbidden error can occur as the server thinks you don’t have permission.

Changing file permissions is an advanced technique, so if you don’t have the technical expertise to do this yourself, it’s better to consult an expert. Start a chat with us now and we can take a look.

If you have the confidence to update file permissions, log into your server with FTP or SFTP, preferably the latter. Depending on the FTP Client you are using, access the file permission dialog box for a file or folder. Here’s what that looks like in Transmit:

Screenshot of Transmit CHMOD file permissions dialog
Here’s the proper file permission settings for WordPress:
  1. All files should be 664.
  2. All folders should be 775.
  3. wp-config.php should be 660.

Leave a Reply

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

See if Cinch is right for you.

Ask us anything. Seriously. Like, what is the air speed velocity of an unladen swallow?

Start a chat right now

Or go ahead and Sign up now