PHPMatters Help You Better Hosting Your PHP-based Sites
Beginner's Guide on the 403 Forbidden Error in WordPress

Beginner’s Guide on the 403 Forbidden Error in WordPress

No matter you are an experienced WordPress user or just a newcomer, there must be a lot of errors you are bound to encounter. Among these errors, the 403 forbidden error is surely the commonly happened and the most frustrating one for any WordPress powered website.

Some of you might be confused about it or do not know how to deal with this issue. In this case, we have made this beginner’s guide on the 403 forbidden error in WordPress, introducing what it is and the right resolutions.

Brief Explanation of the 403 Forbidden Error

To explain it using some simple words, the 403 forbidden error is the HTTP status error, indicating that the web server is already reached and can understand the requests sent by people for the webpages or the resources, but refuse to respond with the further actions.

Generally, this error may happen for the typical GET request of a webpage. This way, if people send the request to retrieve the data of your page for the proper display on their own browser window, they can see nothing but the below error message.

403 Forbidden Error

In addition, if your website is WordPress powered, this error may also happen during the installation process of this script, templates, plugins and widgets, as well as the login page or the admin panel of your website back-end.

Besides, it is possible that you fail to get the full error message, but only a few simple words such as “Access Denied”. In this case, once you have checked the message that essentially indicates “Just go away and never come back again”, it means the 403 forbidden error happens on your site.

What Causes the 403 Forbidden Error

In fact, there are a lot of reasons that may cause this dreadful error. For instance, an Apache server machine may return the 403 error message when the listing for all the filesystem directories is disabled, or, when the Directory Index directive is not available that can specify the existing files to be responded to a browser.

In addition, some of the plugins or extensions utilized by the webmasters may block such requests, and this may also result in the 403 error.

How to Deal With the 403 Forbidden Error in WordPress

To be frank, the reasons are various, but we have listed all the common resolutions to deal with this issue in the following.

Backup Your Site Firstly

Before addressing the 403 error, you firstly need to backup your WordPress site. This practice can eliminate your headache at the point of website breaking. After all, to deal with this HTTP error, you might be required to work with your core files, folders, plugins and many more in a deep manner.

Check and Modify the File Permissions

It is a common sense that all the WordPress files and folders have the access permissions to control who have the right to check the content. In this case, if your file permissions are set to the wrong value, the 403 error can happen, for the web server may think that you do not have the access freedom so as to refuse the requests.

To figure out this part, you need to leverage an FTP manager that can connect to your WordPress site. After accessing it using your exclusive login credential, you should go over the installation folder of WordPress by double clicking the public_html folder. This way, you can find all the essential files and folders.

Now, you just need to select them, right click your mouse and click the File Permissions button.

public_html Folder

Next, you can see a pop-up window that allows you to change the file permission. Here, to resolve the 403 error, you need to make sure that the permission value of all the folders is 755 or 744, while that of all the files is 640 or 644.

Change File Permissions

Before clicking the “OK” button, you need to tick the checkbox that applies the changes to all the sub-directories.

Fix the Corrupted .htaccess File

To be frank, once your .htaccess file is corrupted, there might be a lot of issues happened on your site, and the 403 error is one of them. However, the good news is that the process of fixing such a corrupted file is quite simple that only takes you a few minutes.

To check whether this file is wrong or not, you can firstly locate it from the WordPress root folder using either the FTP client or the File Manager tool available from the cPanel control panel. After that, you need to download this file to your local computer, and then, delete from your web server.

Fix the Corrupted .htaccess File

Now, you can go back to your site to figure out whether this error is removed. If so, it means your .htaccess file is in the wrong situation. In this case, you’d better generate a new one.

To create a fresh copy, you simply need to jump into the Settings page of your dashboard and click the Permalinks option. If there is nothing you want to change, you can directly click the Save Changes button. After that, a new .htaccess file is created and uploaded to your site server automatically.

Clear Cache and Cookies

Sometimes, you have already fixed this 403 error. However, the error may still exist due to the browser cookies and cache data. In this case, you need to clear them to make sure that your method truly takes effects.

In addition, if your website is powered by a cache plugin for the performance improvement, you’d better delete all the cached pages and turn off the caching function for a while.

Deactivate Your Plugins and Themes

Here, you need to know that some compatibility issues and the faulty settings of your plugins and themes may also cause the 403 error. In this case, you should deactivate all of them to figure out whether this error lays on this aspect. If the 403 error disappears, you can start the boring task of picking up the real trouble maker.

Here, to deactivate your plugins and themes altogether, you simply need to locate your plugin folder and theme folder using the File Manager or the FTP. After that, you can change their names to anything you like. This way, WordPress cannot find your plugins and templates so as to result in the deactivation.

Deactivate Your Plugins and Themes

Some Other Resolutions for the 403 Forbidden Error

The above mentioned practices are the top priorities you’d better carry out once you have encountered this 403 error. However, if the issue still cannot be fixed, you can also consider the below tips that are gathered from many other WordPress users.

  • Contact your web hosting provider. Sometimes, this error might be caused by some wrong server configurations and security settings determined by your web host. In this case, you’d better contact your hosting company to check if there is something wrong.
  • Fix the index.php file. Many webmasters claim that they fix this issue simply by deleting the old index.php file from the root directory and uploading a totally new one.
  • Install a new copy of WordPress. This can be your last choice if you have tried a large number of methods but none of them bring your WordPress site to the normal condition.
  • Check the IP deny rules. It is possible that you are blocking your IP in the web server. If so, you’d better unblock it using your control panel.
  • Modify the Index Manager. You need to make sure that you have not changed the settings of Index Manager to the No Indexing option.