One of the most irritating things on the internet is the inability to access your WordPress site, particularly when you don’t have any clue what causes this issue. Basically, 403 Forbidden error is one type of HTTP error that occurs when you can’t access a particular page on your website. Let’s see how you can fix this HTTP error in WordPress.
What is a 403 Forbidden Error in WordPress?
When your WordPress site is facing an HTTP error, your website will display the HTTP status codes and messages explaining the issue.
403 Forbidden Error is one such type of HTTP status code when you don’t have the necessary permissions to access a specific page.
Usually, this 403 HTTP error is followed by a text;
- You are not authorized to view this page
- 403 Forbidden : Access to this resource on the server denied
- It appears you don’t have permission to access this page
- Forbidden : You don’t have permission to access [folder/directory name] on this server
- Additionally, a 403 Forbidden error was encountered while trying to use an ErroDocument to handle the request.
Now, let’s see the various possible scenarios that cause this 403 Forbidden error;
- When you migrate your website to a local host server from the server offered by your hosting provider
- Just after you installed WordPress
- Opened a page of your website
- Mistakes while updating your old article
Meanwhile, you can read our article on the most common WordPress errors and how to fix them.
What Causes the 403 Forbidden Error in WordPress?
The cause of the 403 Forbidden error in WordPress isn’t limited to just one reason, there can be numerous reasons for it to occur.
One such reason is that the WordPress security plugin you installed isn’t properly configured. You might be facing this issue because your IP address was blocked by the security plugin.
Besides misconfigured security plugin, some other reasons why you see this error are;
- .htaccess file got corrupted
- file permission issues
- server settings changed by your web hosting provider
How to Fix 403 Forbidden Error in WordPress?
Before you start the error fixing process, we recommend that you take a comprehensive backup of your WordPress website.
There are two ways to backup your WordPress website:
- Manual WordPress website backup
- WordPress website backup using plugins
Temporarily Deactivate Your WordPress Plugin
As we discussed above the security plugin might be conflicting with your server.
The first and foremost thing you need to do is temporarily deactivate all of your WordPress plugins.
Now, check if you are getting the Forbidden error, if not then, you can confirm that this issue is caused by some installed plugin.
Next, enable the plugins one by one, every time check if the issue is present or not.
Check If The .htaccess File is Corrupted
Another reason why you are seeing the Forbidden error is because of corruption of the .htaccess file. The .htaccess file is a crucial file of your website, even small errors while making changes can break your website.
So, it’s recommended that you only for experts. Else you can contact your web hosting provider to do the changes for you.
Before we start, connect your site with the help of an FTP client or cPanel’s file manager.
Now, let’s see how to fix the .htacces file corruption issue.
The first and foremost step is to search for the .htaccess file (usually in the root folder),
Download that .htaccess file (Backup file), delete that .htaccess file from your server.
Now, check if the 403 Forbidden error got fixed, if there are signs of error, it means that something was wrong with that .htaccess file.
The next thing you need to do is to generate a new .htaccess file. To do so, you need to navigate to the Settings>> Permalinks page.
Scroll to the bottom of the page and click on the Save changes button to store any changes you made on that page.
Check File Permissions of Your Website
Last but not the least, you need to check if the file permissions aren’t the root cause of this issue.
Connect your WordPress website with any FTP client.
Now, go to your root directory where all your website files are used.
Apply the value of 744 or 755 to all the directories of your website and files should have the value 644 or 640.
Conclusion
We hope this article helped you fix the 403 Forbidden error in WordPress.
Additionally, if you are looking for a WordPress hosting plan, you can check out 10GB Hosting’s Cheap WordPress Hosting plans that offer top-notch security and best-in-class website performance.