Troubleshoot the 403 Forbidden WordPress Efficiently
403 Forbidden WordPress Error
It certainly feels annoying when you try to access your site only to find a message telling you that you cannot access a particular thing on your site. Well, you have run into the 403 Forbidden WordPress. Seeing this error can feel quite annoying. In this way don’t panic and think that there’s nothing you can do about it. There are indeed lots of ways to fix this error message on WordPress. In this post, you’ll understand the Forbidden error in greater detail and the various fixes you can use to get rid of it.
What Do You Mean by the 403 Forbidden WordPress
The 403 Forbidden error WordPress means that the server has understood the request but is not authorizing it. This error is an HTTP status code that a web server utilizes to communicate properly with your browser. The error implies that the server understands your browser’s request, but it will not meet it. Basically, it means that your server knows what you desire to do but doesn’t allow you to do it as you don’t possess the right permissions for a specific reason.
There are two most significant causes of the Forbidden error. These include:
- Corrupt .htaccess file
- Faulty file permissions
How to resolve the 403 Forbidden WordPress Error
Before implementing the techniques below, it’s highly suggested that you make a full backup of your website. Follow the different methods below to get rid of this error.
Resolve the Forbidden error caused by a plugin in WordPress
If this error results from a WordPress plugin, you must temporarily deactivate every WordPress plugin. It includes all security plugins that your site currently has. It is easy to determine the plugin that was causing the issue. You can deactivate every plugin followed by reactivating them till you find the problematic one.
Fix the problem caused by corrupt .htaccess file
The .htaccess file is utilized by the Apache webserver. It’s a basic configuration file you can use to restrict access to some or all of your websites. You can also use to set up redirects. Even a little error in it can lead to the 403 Forbidden error WordPress. An easy solution to troubleshoot the corrupt .htaccess file is to force WordPress to produce another clean .htaccess file. Follow these steps below.
- Link to your server through FTP.
- Locate the .htaccess file. Its in the Root folder.
- Download this file’s copy to your system.
- When you have a backup copy, delete the .htaccess file from your server.
You will now be able to access your WP site. To force WordPress to produce another clean .htaccess file, go through these steps.
- Navigate to ‘Settings,’ and from there go to ‘Permalinks.’
- Tap ‘Save Changes.’
Modify the file permissions
Every WordPress file has specific permissions. They regulate who can access and change its content. If they have incorrect permissions, your web server will prevent you from accessing them. To view and change the file permissions, you will have to link via FTP/SFTP. After getting connected to your server, you can find the file permissions by right-tapping on it. The ideal permissions for WordPress are:
- Files – 640, or 644
- Directories – 750 or 755
Follow these points to set these permissions.
- Right-tap on the folder having your WordPress site. After selecting ‘File Attributes.’
- Input 750 or 755 in the ‘Numeric Value Box.’ After that, select ‘Recurse into subdirectories‘ and ‘Apply to directories only.’
- After applying the right permissions for directories, do the entire process again for files. It is important to take note of the following.
- In the ‘Numeric Value Box‘ input 640 or 644
- Select ‘Recurse into subdirectories.’
- Select ‘Apply to files only.’
- Now manually change the permissions for the wp-config.php file. Make them 400 or 440.
Check whether there is a misconfigured Hotlink protection.
Hotlinking refers to when a person puts an image to their website, It is the hosted link points to another person’s site. For preventing this, you can set up Hotlink protection with your CDN provider or WordPress host. When you enable Hotlink protection, it will return a 403 Forbidden error WordPress. Don’t worry. It’s only normal. if you view this error on something that you should not, ensure that you have configured the Hotlink protection correctly.
Follow these effective methods and get rid of the 403 Forbidden WordPress error. Now that you know its causes and how to resolve them, you won’t feel frustrated when encountering them. If you still find this error message on your screen, it’s best to seek the assistance of professional WordPress support services.