banner_bg
Blogs , Uncategorized , Tutorials ,

How to Fix WP 403 Forbidden Error with Ease?

By admin > No Comments
23
Aug
wp-403-forbidden

How to Fix WP 403 Forbidden Error with Ease?

Introduction : 

Are you experiencing the  WP 403 forbidden error quite often? Well, it's very understandable how irritating it could get. This can occur when the user requests any banned page. Well, worry not! It's not a big deal. Here, in this blog post, you will find quick fixes to help you remove the error when visiting any page. We will uncover some easy methods to resolve this issue and its causes. While I go over all of the possible 403 prohibited solutions let us first learn what this problem and how to repair it. Let's dive into the guide to quickly resolve the 403 forbidden error, allowing you to restore full access to your site promptly and efficiently. 

What is WP 403 Forbidden Error? 

Whenever you access a website, a dialogue box containing an HTTP status code indicating a permission error will pop up if you request a forbidden resource or page. However, this may not always happen. It is one of the most common WordPress errors that occurs. It is mainly caused by indexing issues, improperly coded plugins, an empty site directory, or ownership issues.

The 403 forbidden error occurs in WordPress when the server does not allow access to one of your pages or other resources; this most likely happens because of incorrect file permissions or corrupted .htaccess files. 

Why Does the WP 403 Forbidden Error Occur? 

  • Poor configuration of security plugins followed by ill-natured content
  • Incorrect file and folder permissions 
  • An incorrect IP address pointed to the domain can be one of the cause
  • Its not necessary that the  updated page would be same as the cached page data. 
  • The primary reason is improper configuration denying access to the requested resource.
  • A corrupt .htaccess file.
  • It's a poorly coded plugin.
  • Issues that block access to a specific page or resource on your WordPress site. 
  • Overly strict security plugin settings  
  • Restrictions imposed by your hosting provider
  • An IP address is blocked

Resolving WP 403 Forbidden Error 

The WP 403 error is difficult to overcome because the server prohibits the browser from loading scripts. It is usually caused by server permission issues or security settings, which can be handled by balancing several areas such as files, plugins, and security protocols. Additionally, using professional WordPress themes can minimize such issues, as they are well-coded and come with built-in security features that help prevent errors like these. Investing in high-quality themes not only enhances your website's performance but also ensures better protection against common WordPress errors.

Note: Getting a backup of the website is highly recommended.

Given below are the nine easy fixes that can help you detect and fix the error : 

1. Clear Your Browsing Cache 

The simplest solution to the WP 403 forbidden error is clearing your browser's cache. Refreshing is recommended when one encounters an error in WordPress.Therefore, try cleaning up the cache and cookies; it might resolve the problem.

Let's see how it works! 

  • If we talk about the Google Chrome browser, you must click the three-dot icon at the top right of your browser window to clear its cache. Then, proceed to More Tools > Clear browsing data.
  • Alternatively, you can use the hotkey combination CTRL + SHIFT + DEL.
 
  • Next, choose "Cached images and files," and enter your time period let’s say, the last 24 hours in the Time Range area.
  • Click "Clear data."
  • Click the advanced tab in the Clear browsing data window for more advanced data extraction. Here, you can select the deletion of passwords, autofill form data, site settings, and hosted app data. Click on "Clear Data" when done.
  • More options to open the clear browsing data window can be found in Chrome settings > Privacy and security, or one can go directly by clicking Clear browsing data. You can configure cookies by entering Third Party Cookies settings.
  • Note how you can clear cookies and site data when you close all windows through which you can automate clearing the cache. 
  • You can also clear single cache items directly using "See All Cookies and Site Data." You can then allow/block/clear cookies for particular sites.

2. Step-Down to Operational Version from Your Web Hosting Backup

    If your provider has an application or server-level backup, you can directly roll back the changes to a running version. You could revert to the last known working version, which may help bypass the WP 403 forbidden error. Just follow these steps : 

    • Log in to the hosting platform
    • Select your application 
    • Go to Backup and Restore 
    • Select the date from the menu to proceed to the most recent version.
    • And you are done.

      3. Check .htaccess File

        Another reason is a corrupted .htaccess file. Any FTP manager can fix an improper .htaccess file in seconds.

        Check out the following steps:

        • First, log in to your server using an FTP client
        • Go to the .htaccess file located in the public_html
        • To ensure safety, click right on the.htaccess file to download it.
        • Once you have downloaded the file, you can further delete the .htaccess file
        • Lastly, you can go to your browser and refresh your website to check if the WP 403 forbidden error has been resolved.
        • Ensure to successfully upload the initially obtained file to your server.
        • If the issue is resolved by deleting the file, it confirms that the error was due to a corrupted .htaccess file.

        To create a clean.htaccess file, follow the steps listed below:

        • First, log in to your WordPress dashboard.
        • Go to Settings > Permalinks
        • You'll be redirected to the permalink settings page.
        • Next, click the save changes button at the bottom to generate a new .htaccess file.
        • You can open and check your FTP client to verify if the .htaccess file has been regenerated. 
        • If the error continues, proceed to the following method, which is detailed below.

        4. Check File Permissions

          Many files in WordPress require access permissions. If those permissions are incorrect, the server will give a 403 permission denied error, indicating you don't have the requested file.

          • Firstly, you need to connect to your WordPress website using an FTP client 
          • Navigate to the root
          • Right-click public_html and click the file permissions
          • Set the numeric value in the Permission box to 744 or 775 
          • Check the box to 'Recurse into subdirectories.' 
          • Check the option 'Apply to directories only.'
          • Click OK
          • Next, repeat the process for all files 
          • A file permission of 644 or 640 should be set.
          • Choose to dive deeper into subdirectories. Use exclusively with files.
          • Click OK
          • Verify if the WP 403 prohibited issue has been fixed by checking again.
          • If it persists, look for the next step.
          • Deactivate the plugins

          5. Deactivate All Plugins

            Sometimes, poorly coded plugins can cause a WP 403 forbidden error on WordPress sites. Therefore, we should deactivate all our plugins and check whether the issue is resolved.

            To deactivate your plugins:

            • Go to WordPress Dashboard, and click on plugins section
            • Select Installed Plugins. Here you get the list of plugins installed in your website.
            • Click on deactivate and disable all the plugins.

              6. HotLink Protection

                It prevents other websites from using the site images. It can be used to avoid allowing Google Images or Pinterest to display your pictures on any other site. Not just that, but it helps you with site bandwidth and server resource consumption.

                Enabling hotlink protection on your CDN/hosting can sometimes trigger a 403 error if it is not set up correctly, so it's necessary to configure it carefully and then check the site's status.

                7. Contact Your Hosting Support

                  If you have performed all the above steps but still face a WP 403 forbidden error, the last resort is to contact your hosting provider. Numerous managed hosting providers offer prompt help.

                  Cloudways offers 24/7 live chat and cloud-based WordPress hosting starting from $11 per month. So, with a host like Cloudways, you're in good hands, even with scary errors like 403.

                  You can also check our guides to fix other errors, such as the 404 error, white screen of death, and more. 

                  8. Modify ownership of file system to resolve configuration accessing

                    It simply refers to changing the ownership settings of a file so that the appropriate user or group has the necessary permissions to access, modify, or manage the file. 

                    The process is required when : 

                    • Access Issues: If someone needs to work with a file that is owned by the wrong user or group, the file may be denied access, causing disruptions.
                    • Security: It ensures the correct ownership, which reduces the risk of unauthorized access.
                    • System Compatibility: Certain files in some systems must be owned by specific users  to function correctly.

                    9. Identify the DNS configuration of your A record.

                      Another cause is an incorrect domain name, pointing to the wrong IP address and not the right one; you may face no permission to access the site's content. It can occur when you have migrated to a new web host but forgot to update your nameservers, resulting in your domain pointing to the previous host. In such cases, the last host may terminate your account, activating the 403 error status code. To verify and resolve this, you can check your domain's DNS records using the nslookup command in the terminal. The command is compatible with various operating system. 

                      Let's understand this by using the example of checking the A record for the domain 'xyz.com', open a console window, and execute the following code (replace 'xyz.com' with your website's address).

                      nslookup -type=A xyz.com

                      This will show you the DNS records associated with your domain and help you identify any misconfigurations.

                      Conclusion 

                      In conclusion, we have clarified the WP 403 forbidden error in WordPress and its causes and helped you find ways to fix it. Fixing the 403 forbidden error involves systematically resolving key areas such as file permissions, plugin conflicts, and server settings.By following the instructions provided in the above article, you can effectively fix the problem and get back access to your WordPress website while preserving its functionality and security. 

                      For those looking to avoid similar issues and enhance their website's performance, consider using premium WordPress themes. The WordPress Bundle offers a wide range of high-quality themes that are optimized for security, reducing the likelihood of encountering such errors while giving your site a professional touch. Take advantage of these themes and enjoy a smoother WordPress experience.

                      Back to blog