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
.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.
Try to access your site. If you can browse around normally then you’ve found the issue. Next let’s reset the
Resetting the .htaccess file
.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:
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:
Here’s the proper file permission settings for WordPress:
- All files should be 664.
- All folders should be 775.
- wp-config.php should be 660.