403 forbidden error solution in wordpress – caused by 3 main reasons
What is 403 forbidden error WordPress:
I’m writing this post based on my personal experience where I was facing 403 forbidden error in one of my website pages.
Below is the screenshot of 403 forbidden error from my Contact page.
Why is it:
There are mainly 3 reason for 403 forbidden error.
- Caused by WordPress Plugins
- Corrupted .htaccess file
- Incorrect File Permission
How to:
403 forbidden error solution caused by Wordpess Plugin
In my case error was appearing only in the Contact page. I thought it could be because of any plugin I use only in that particular page. I logged into the WordPress Admin Page and deactivated the Contact Form Plugin and again went back to the Contact page and refreshed it, Thats it!! 403 forbidden error was no longer appearing.
After few seconds I reactivated the Plugin and refreshed the page, surprisingly Issue was resolved for me after a Deactivation and Reactivation of the Plugin.
If in case you are not aware of which plugin causes the issue then I would suggest you to follow the below steps:
- Go to WordPress Admin » Plugin » Installed Plugins » select all plugins and Deactivate
- Refresh the webpage, if 403 forbidden error is not appearing then confirmed that the issue is with one of the plugins.
- Activate each plugin one by one to identify which plugin causes the issue.
Unlike in my case it is not mandatory that the issue should get resolved once the plugin is reactivated, if issue is not getting resolved after reactivation then you should contact the plugin developers or install an alternative plugin for the same purpose.
403 forbidden error solution caused by Corrupted .htaccess file
This is another reason for 403 forbidden error, follow the below steps to resolve this issue.
- Login to FTP and download the .htaccess file to local system (just in case as a backup)
- Delete the .htaccess file from FTP
Pin
- Refresh the webpage, if 403 forbidden error is not appearing then confirmed issue is with the .htaccess file
- Create a fresh .htaccess file: Go to WordPress Admin area Settings » Permalinks » Save Changes
403 forbidden error solution caused by Incorrect File Permission
This is not a common case but however we can not ignore discussing about it. Below should be the standard file permission for the files and folders in the WordPress site.
All folders should have the standard file permission of 744 or 755
All files should have the standard file permission of 644 or 640
If the permission number is set to be different then you could face the 403 forbidden error.
You can correct it by yourself logging into your website FTP but I would strongly suggest you to contact your hosting provider and correct it for you, else hire an expert to do it.
Pin
Pin
Please let me know if this was helpful, also you can reach out to me @ ask for any help.