3 Ways to Fix the 403 Forbidden Error on your WordPress Site
- June 9, 2016
- Leave a comment
Whenever an error occurs on a WordPress site, it display codes or error messages in return. The 403 Forbidden error code is specifically shown when server doesn’t allow access to a certain page. This is why the error is usually accompanied by the following text:
403 Forbidden – You don’t have the permission to access ‘/https:www.sample.com’ on this server.
A 403 Forbidden error can also occur while trying to use an ErrorDocument to handle the request. Following can be the scenarios when such an error occurs:
- 403 Forbidden – Access denied on wp-admin or WordPress Login page
- 403 Forbidden – during WordPress installation
- 403 Forbidden error – while visiting any page on your WordPress site
It is also possible that you only see ‘Access Denied’ or ‘Access to your domain.com was denied. You don’t have authorization to view this page’ text instead of 403 Forbidden statuses.
Here are the 3 most common reasons due to which your WP site may display the 403 Forbidden Error and their fixes.
The most common cause for the 403 Forbidden error in WordPress is poorly configured security plugins. Many WordPress security plugins can block an IP address (or a whole range of IP addresses) if they believe them to be malicious.
You need to deactivate all WordPress plugins including security plugins that are installed on the site temporarily. If this resolves the problem then it means one of the installed plugins was causing this error. Additionally, you can figure out which plugin was causing the error by activating all the installed plugins one at a time until the 403 forbidden error appears.
Corrupt .HTACCESS File
Another possible cause could be a corrupt .htaccess file or incorrect file permissions on your server. WordPress hosting sites sometimes make accidental changes to their server settings. This may result in a 403 Forbidden error on your website. Before taking any step to resolve this issue, it is recommended to create a complete WordPress backup of your website.
You can repair the file easily by using the following steps:
- Connect to the website using an FTP client or File Manager in cPanel
- Locate the .htaccess file in the root folder of WordPress site
- Download the .htaccess file to your computer so that you have a fresh backup of it
- To delete the file from your server, generate a fresh .htaccess file by logging into your WordPress Admin Dashboard. Now go to Settings » Permalinks page. Click on Save Changes button located at the bottom of Permalinks page. WordPress will then generate a fresh .htaccess file.
Incorrect file permissions can cause a 403 forbidden error. It also makes the web server think that you don’t have the permission to access those files. If the above two solutions don’t solve the 403 forbidden error on your website then incorrect file permissions can be the most likely cause.
In order to resolve this issue, connect to your WordPress site using an FTP client. Navigate to the root folder containing all WordPress files. Make sure that all the folders on your WordPress site should have a permission of 744 or 755 while all the files should have a file permission of 644 or 640. After implementing this solution, the 403 forbidden error should be gone.