Dealing with a 403 error in WordPress CMS can be very frustrating. Of course, this error worries most novice users. The good news is that you have several options for fixing this error. You can usually solve the problem quickly by using different methods.
This article covers the main reasons that may cause this error. Then we will introduce you to some methods to fix it. Let’s get started!
What causes a 403 error?
When you try to access a page or file on a website that you do not have permission to access, you encounter a 403 error. The web server is working – but you do not have permission to access the content, so the server responds with a 403 HTTP error code. You may also see this error as HTTP 403, Error 403, or Forbidden.
This problem is usually caused by problems with your site’s file or .htaccess file permissions. This error may also be due to a problem with the plugin you are using on WordPress sites.
Unfortunately, this problem is not always solvable, even when you encounter it on your site. But there are some simple solutions you can try.
Two ways to fix 403 error
If you encounter this error, do not worry. Here are some ways to help you. You can choose the method you want depending on whether you are a website user or owner.
Method 1- Fix the error as a website visitor
If you have encountered this error as a website user, you can try the following method. However, even if you are a site owner, you can try this method and ensure that the error is not on your part.
Step 1 – Check the basics.
The first thing you should try (if you haven’t already) is refreshing the page. Sometimes a 403 error occurs due to a minor defect, and you need to reload the page.
If this does not fix the problem, the next thing to look for in the URL. Make sure you type it correctly. In addition, the link should probably end in “.com,” “.org,” or something similar. Otherwise, you may be trying to access a site section reserved for web admins.
In addition, you may have followed a bad link. In this case, try to access the website from another source.
Step 2 – Clear your cookies and cache.
Web browsers use cookies and cache to keep data consistent. While these can help the site, they may save incorrect settings that could cause a 403 error. Therefore, clearing both of these can be a smart first step.
Here’s how to clear your cache in Google Chrome:
If you use Google Chrome, you can start by finding the three dots in the upper right corner. Select Settings from the drop-down menu. Then go to Privacy and security and click on Clear Browsing Data:
Check the Cookies and other site data boxes and Cached images and files and select Clear data. Note that this may remove you from your accounts on other websites.
Now, go back to the page. If resetting these elements is not helpful, the last thing you can try is to check if your IP address is blocked. If the website blocks your IP, you should resolve this issue, which usually involves contacting the site owner for help.
Method 2 – Fix 403 error on your site
In this section, we focus on on-site owners. If you find this error on your WordPress site, you can try the following steps to fix it.
Note that you must use the file transfer protocol or FTP to access your site.
Step 1 – Scan your plugins.
There are many quality WordPress plugins. However, it is not uncommon for these plugins to cause problems such as a 403 error on your site.
The best way to solve this problem is through trial and error. This means you have to disable all your plugins and enable them one by one to find the source of the problem.
To get started, go to Plugins> Installed Plugins. To select all plugins, click the check box above, select Deactivate from the drop-down menu and click Apply:
After disabling all plugins, if there is a problem with the plugins, you should be able to access the page. If so, you can enable plugins one by one and check for problems. The problematic plugin should cause the error to occur again.
If Error 403 prevents you from logging in, you can use an FTP client to access your WordPress files. Once connected to your site, open the main folder and go to wordpress> wp-content> plugins:
To disable plugins on your site, rename the folder to something different, such as “plugins_deactivated.” Next, try to access your site.
If successful, rename the plugins folder to “plugins.” Then open it, rename each plugin folder one by one, and check your website after each one. This will help you identify the source of the problem. If you know which plugin the problem is with, you can remove or replace it.
Step 2 – Check your .htaccess file
If your web host is using an Apache web server, the source of the problem may be your .htaccess file. This file controls the important configuration settings of your WordPress site, and any small changes or errors can damage it.
To resolve this issue, you must reset your .htaccess file. Before doing so, we recommend that you back up your site. Then open your favorite FTP client. Find your .htaccess file and delete it.
Next, go to your WordPress dashboard, then go to Settings> Permalinks:
C: \ Users \ MSA \ Downloads \ Permalink-Settings.jpg
You do not need to make any changes. All you have to do is scroll down and click Save Changes. This will automatically create a new .htaccess file for your site.
If this file caused a 403 error, it should be fixed now. If you are still having trouble, try the last step.
Step 3 – Check the file permissions.
Error 403 is often related to file permissions. WordPress has a set of default permissions that should not be a problem for the site owner. However, sometimes these settings can be changed unintentionally.
Fortunately, this is relatively easy to fix. Open your file folder using the FTP client and find the main folder that contains your WordPress site. Must include wp-admin, wp-content and wp-include. Right-click on the main folder and go to File Attributes:
Fill the numeric value with 755. Then check the Recurse into the subdirectories box and select Apply to directories only. Finally, click the OK button. In this way, the appropriate permissions are applied automatically.
Next, you need to repeat the process with the difference that this time enter 644 in numeric value and select the Apply to files only option. Then click OK.
Now, go back to your site directory and find the wp-config.php file. Right-click on it and select File Attributes:
Enter 644 in the numeric value and click the OK button if the error results from problems with WordPress file permissions. Changing all of these files should fix it.
Conclusion
There are countless errors that a WordPress website can encounter—trying to troubleshoot these errors can be frustrating, especially if, like error 403, they block access to the website. Fortunately, you can take a systematic approach to solve almost all possible causes of this problem.
In this article, we examine two main ways to resolve 403 errors:
1- Fix the error as a user by refreshing the page and clearing the cache
Troubleshooting as a website owner using an FTP client to disable plugins, recover .htaccess files, and set file permissions