How to fix 403 forbidden error in WordPress?
There are several reasons which can create 403 forbidden error. By this error, user cannot access to login to its WordPress account and other users cannot see any content on website.
There might be following reasons which can create 403 Forbidden Error on your website:
- .htaccess
- File Permissions
- Bug in plugin
- Hotlink Protection Misconfigured
- Change location of your server
How to fix 403 forbidden error in WordPress?
To solve the error you have to check the reasons which created the error. There are following ways to troubleshoot 403 Forbidden Error.
1. Delete htaccess file
Go to your cPanel of your hosting and open file manager. Open Public_html folder and delete .htaccess file.
This will fix error on your website and you can create new .htaccess file from WordPress Dashboard. Go to Settings>Permalinks>Click on Save. This will make htaccess file on your hosting.
2. Check and correct file and folders permissions
Go to File manager from your hosting and check permissions. Permission for file must be 644. and permissions for folders must be 755. Change file permissions to 644 and 755. This will solve error from your website.
3. Deactivate plugins from WordPress to fix 403 forbidden error
403 error might be occur by a bug in your plugin. Disable all plugins and check if error is fixed. To disable plugins, Go to hosting and Click on Plugins on WordPress section. Disable plugins one by one.
4. Check Hotlink Protection
Check is hotlink protection is misconfigured. Go to cPanel and Click on HotLink Protection on Others tab. Block direct access to extensions and then check if error is solved.
5. Temporary Disable CDN to Fix 403 forbidden error
Content Delivery Network(CDN) can cause 403 forbidden error on your websites. If a small error occurs in your network it’ll cause problem. Try to disable CDN for sometime. It will lift error.
6. Change IP address of your DNS
If you have recently changed your server location, this process also change IP address of your server. Change ftp and domain IP address of your website. To change this Go to cPanel and copy IP address of your server. Go to CloudFlare dashboard or Domain DNS settings and change IP address.
If none of these methods work, contact your hosting server provider.