TABLE OF CONTENTS
How to Manage 403 Forbidden Errors in WordPress
How to Manage 403 Forbidden Errors in WordPress guideline.
The 403 forbidden error is one of the most dreadful errors that a WordPress beginner can come across.
Not just that it turns off visitors, but some SEO experts have argued that this kind of error also has some effects on on-site rank. In this article, we will show you how to easily fix the 403 forbidden error in a WordPress website.
What is a 403 Forbidden Access Denied Error
WordPress displays different messages when an error occurs on a website.
The 403 Forbidden error code is shown when a server’s permissions don’t allow access to a specific page.
This is why the error is usually accompanied by the text: 403 Forbidden You don’t have permission to access it on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
There are different situations when you can see this error. For example:
403 Forbidden “ Access denied on wp-admin or WordPress login page.
403 Forbidden “ during WordPress install.
403 Forbidden error when visiting any page on your WordPress site.
It is also possible that you only get to see Access Denied instead of the full 403 Forbidden status.
You may also see â€˜Access to yourdomain.com was denied. You don’t have the authorization to view this page.™
Those are the different types of 403 errors, Now, we can look at what causes this error.
What Causes 403 Forbidden Error in WordPress?
In WordPress, the most common cause of the 403 Forbidden error is a poorly configured security plugin. Many WordPress security plugins can block an IP address (or a whole range of IP addresses) if they believe them to be malicious.
This is why Sucuri is recommended by us to improve the security of all WordPress sites.
Another possible cause is a corrupt .htaccess file or incorrect file permissions on your server.
Again, this type of error can be experienced when your hosting company make accidental changes to their server settings..
How to Solve 403 Forbidden Error in WordPress.
It is important to once more sound our usual warning: Before you do anything, we recommend that you create a fullÂ WordPress backup of your website.
If you were already using an automatic WordPress backup plugin, then make sure that you have access to the latest backup before you continue.
1. Fixing 403 Forbidden Error Caused by a WordPress Plugin
The first step will be to temporarily deactivate all WordPress plugins. This includes any security plugins that you may have installed on your site. If this resolves the problem, then this means one of the plugins on your website was causing this error.
You can figure out which plugin was causing the error by re-activating your plugins one at a time until you are able to identify the plugin responsible for the problem.
2. 403 Forbidden Error Caused by Corrupt .htaccess File
Sometimes, and most often, the 403 error is caused by a corrupt .htaccess file in your WordPress site. Repairing this file is quite easy.
First, you need to connect to your website using an FTP client or file manager in cPanel.
Next, locate the .htaccess file in the root folder of your WordPress site. Remember that the .htaccess file is a system file so if you are accessing through the cPanel area, you need to check the “show hidden files” option.
If you are accessing it through FTP software, you need to download the .htaccess file to your computer so that you have a fresh backup of it. After that, you need to delete the file from your server.
Try accessing your website. If the 403 forbidden error is resolved, then this means that your .htaccess file was corrupt and responsible for the problem.
You can generate a fresh.htaccess file by logging into your WordPress admin area and going to the Settings Â» Permalinks page.
Simply click on the Save Changes button at the bottom of the page and WordPress will generate a fresh.htaccess file.
3. How to Fix 403 Forbidden Error Caused by File Permissions
All files stored on your WordPress website have file permissions. These file permissions control who can access files and folders on your website.
Incorrect file permissions can cause 403 forbidden errors. It makes your web server thinks that you do not have permission to access those files.
If the above two solutions do not solve the 403 forbidden error on your site, then incorrect file permissions can be the most likely cause.
You can contact your WordPress hosting provider to check your website for correct file permissions. Some hosts are very supportive, they wouldn’t mind and will probably fix that for you.
Some may not because WordPress is a third-party application and they are not likely to give their support.
You can also do it yourself but you need to be sure of the permissions you set as it can affect the security of your website.
If you want to do it by yourself, simply connect to your WordPress site using an FTP client. Navigate to the root folder containing all your WordPress files.
Checking file permissions
Click to select a folder, right-click and then select File Permissions from the menu.
Your FTP client will show you a file permissions dialog box:
Changing file permissions using FTP
All folders on your WordPress site should have a file permission of 744 or 755.
All files on your WordPress site should have a file permission of 644 or 640.
You can set the file permission to the root folder to 744 or 755. Check the box next to â€˜Recurse into subdirectories™ and then check the option that says it applies to directories only.
Click on the OK button. Your FTP client will now start setting permissions to all subdirectories in that folder.
Once it is done, you need to repeat the process for all the files. This time you will use file permission of 644 or 640 and don’t forget to select Recurse into subdirectories™ and ˜apply to files only™. options.
Click on the OK button and your FTP client will start setting file permissions for all the selected files.
Once that is done, try accessing your website again, the 403 forbidden error should have been resolved.