403 Forbidden error is one of the most horrible errors that a WordPress users can come across. In this article, we will show couple ways how to fix the 403 forbidden error in WordPress.
403 Forbidden error code is shown when your server permissions don’t allow access to a specific page.
What Causes 403 Forbidden Error in WordPress?
Many WordPress security plugins can block an IP address if they believe them to be malicious. Another possible cause could be a corrupted .htaccess file or incorrect file permissions on your server.
How to fix 403 Forbidden Error in WordPress?
Before start do anything, we recommend create a WordPress backup of your website
Step 1. Check .htaccess File for errors
It is possible for your .htaccess file to become corrupted, which in turn can cause a 403 Forbidden access error to appear on your WordPress site. You can fix it by using FTP manager. Locate the .htaccess file in the root folder of your WordPress site. Make copy of .htaccess for back up. Once you have a copy , proceed to delete the .htaccess file from your server.
When you have successfully deleted the file, try to access your site again. If you see error again , we can discard the.htaccess file as the source of the problem and we can restore copy of .htaccess to server.
In case, if deleting the file does solve your issue, it was most likely corrupted – so, we have to generate a new copy:
Access your dashboard
Go to Settings, and select the Permalinks option.
Click on Save Changes button at the bottom of the page and WordPress will generate a fresh .htaccess file.
Step 2.Fixing 403 Forbidden Error Caused by a WordPress Plugin
First thing you need to do is to temporarily deactivate all WordPress plugins.
Connect to your website using FTP client, or File Manager in cPanel.
navigate to the /inc/ folder
Inside inc folder, you will see a folder called plugins.
Rename it for some thing else. for example plugin.temp
If this resolves your problem, then this means one of the plugins on your website was causing this error. Once you do that, go back to your /inc/ folder and rename “plugins.temp” back to plugins. Now you can activate one plugin at a time until your site breaks again. At which point, you will know exactly which plugin caused the issue.
Step 3. Fix 403 Forbidden Error Caused by File Permissions in WordPress
Incorrect file permissions can cause 403 forbidden error. It makes your web server thinks that you do not have permission to access those files. You can ask your WordPress hosting provider to check your website for correct file permissions. If you want to do it yourself, then here is how you would check your file permissions. Connect to your WordPress site using an FTP client. Navigate to the root folder containing all your WordPress files. Right click on folder and then select File Permissions or Properties from the menu.
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.
And don’t forget: WordPress is not easy, it’s a user friendly