How to Fix the 403 Forbidden Error (2 Methods That Work)

Chưa được phân loại

Operating your own website can be tricky, especially when you have to deal with technical issues like the 403 Forbidden error. The lack of context that comes with this error makes it particularly frustrating. This also applies to users on the front end who may be unable to access a specific site.

Fortunately, you have a few options available to you for troubleshooting the 403 Forbidden error. By methodically applying these different solutions in turn, you can usually resolve the issue quickly.

In this article, we’ll cover the main reasons you might be seeing a 403 Forbidden error message. Then we’ll take you through a few different methods for fixing it. Let’s get started!

📚 Table of contents:

What causes the 403 Forbidden error?

In a nutshell, you see the 403 Forbidden error when you try to access a page or file on a website that you don’t have permission to access. The website’s server is functioning – there’s just some type of permissions issue getting in the way of you seeing the content, which is why the server responds with the 403 HTTP error code. You might also see this error displayed as an HTTP 403, Error 403, or simply Forbidden

This problem typically results from issues with file permissions or your site’s .htaccess file. On WordPress sites, the error also might result from an issue with a plugin that you’re using.

Unfortunately, this isn’t always a problem you can resolve, even when you’re encountering the error on your own site. However, there are a few easy solutions you can try. Alternatively, you can reach out to your hosting provider for assistance.

How to fix the 403 Forbidden error (two methods)

If you’re encountering this error now, don’t panic just yet. Let’s go through a couple of methods that may help you fix it. You can choose the one that fits your current situation: that of a web user or a website owner.

Method 1: Fixing the error as a website visitor

If you’re accessing a website as a user from the front end, you’ll want to start here. However, you might also want to try the following steps even if you’re a site owner, to ensure that the error isn’t on your end.

Step 1: Check the basics

We’ll start with a few basics. The first thing to try (if you haven’t already) is refreshing the page. Sometimes a 403 Forbidden error is caused by a minor glitch, and the page simply needs to be reloaded.

If that doesn’t work, the next thing to look at is the URL. Make sure that you’ve typed it in correctly. Furthermore, the link should probably end in.com“, “.org“, or something similar. If not, you may be trying to access an area of the site that is reserved for administrators.

Alternatively, you may have followed a bad link. In that case, try to access the website from a different source. You could also reach out to the publisher of the link and see if they meant to use a different URL.

Step 2: Clear your cookies and your cache

Web browsers use cookies and a cache to retain static information. While this can help a site run quickly, it might also save incorrect settings that can cause a 403 Forbidden error. Therefore, clearing both of these items can be a smart first step.

We’ll show you how to clear the cache in Google Chrome below, but we also have an entire post on how to clear the browser cache in all popular browsers.

If you’re using Google Chrome, you can start by finding the three small dots in the upper-right corner. Select Settings from the drop-down menu. Then scroll down to the Privacy and security section and click on Clear Browsing Data:

How to clear your cache and cookies in Google Chrome

Check the boxes next to Cookies and other site data as well as Cached images and files, and select Clear data. Note that this may log you out of your accounts on other websites.

Now, try accessing the page again. If resetting these elements didn’t do the trick, one last thing you can try is checking to see if your IP address has been blocked. If your IP made it onto the website’s blacklist, you’ll need to resolve that issue first, which generally involves contacting the site’s owner for help.

Method 2: Fixing the 404 Forbidden error on your own site

In this section, we’ll focus on site owners. If you’re seeing this error on your own WordPress site, you can try a few of the following steps to fix it.

Note that you’ll need to use a File Transfer Protocol (FTP) client to access your site. You can check out our beginners guide to FTP for more information.

Step 1: Scan for faulty plugins

There are plenty of high-quality WordPress plugins. However, it’s not unusual for a plugin to cause issues on your site, such as the 403 Forbidden error.

The best way to tackle this issue is through trial and error. That means deactivating all of your plugins, and re-activating them one by one until you find the culprit.

To get started, navigate to Plugins > Installed Plugins. Click the top checkbox to select all plugins, choose Deactivate from the drop-down menu, and click on Apply:

Deactivating your plugins to fix the 403 Forbidden error.

Once they’re all deactivated, you should be able to access the page if a plugin was causing the issue. Afterward, you can reactivate the plugins individually and refresh the 403 Forbidden error page after each one. Adding the faulty plugin back should cause the error to reoccur.

If the 403 error is preventing you from logging into your admin area, you can use an FTP client to access your WordPress files. Once you’ve connected to your site, open your root folder and navigate to wordpress > wp-content > plugins:

Fixing the 403 Forbidden error by deactivating the plugins via an FTP client

To deactivate the plugins on your site, all you have to do is rename the plugins folder to something different, such as “plugins_deactivated”. Next, try accessing your site.

If you’re successful, rename the plugins folder back to “plugins”. Then open it up and change each plugin folder’s name one at a time, checking your website after each one. Again, this will help you identify the specified culprit. Once you know which plugin is at fault, you can remove or replace it (or contact the developer for help).

Step 2: Ensure that your .htaccess file isn’t corrupt

If your hosting provider uses an Apache web server, your .htaccess file might be causing the 403 Forbidden error. This file controls important configuration settings for your WordPress site, and a small change or error can damage it.

To fix this, you’ll need to reset your .htaccess file. Before you proceed, we highly recommend making a backup of your site. Once you’re ready, open your FTP client of choice. Then, locate your .htaccess file and delete it.

Next, go to your WordPress dashboard and navigate to Settings > Permalinks:

Accessing the permalinks settings to restore the .htaccess file.

You don’t have to make any changes here. All you have to do is scroll down and click on Save Changes. This will automatically generate a new .htaccess file for your site.

If this was causing your 403 Forbidden error, it should now be resolved. If you’re still running into the issue, continue on to our final step.

Step 3: Set the correct file permissions

A 403 Forbidden error is often related to file permissions. WordPress comes with a set of default permissions that shouldn’t cause any issues for the site owner. However, sometimes these settings can get inadvertently changed.

Fortunately, this is relatively easy to fix. Open up your file directory using your FTP client, and find the root folder that contains your WordPress site. It should contain wp-admin, wp-content, and wp-includes. Right-click on the parent folder and navigate to File Attributes:

Changing file permissions to fix the 403 Forbidden error.

Fill in the numeric value field with 755. Then check the box labeled Recurse into subdirectories and select Apply to directories only. Finally, click on the OK button. This will automatically apply the right permissions.

Next, you’ll need to repeat the process. However, this time you’ll enter 644 into the numeric field and select Apply to files only. Click on OK when you’re ready.

Now, go back to your site’s directory and find your wp-config.php file. Right-click on it and select File Attributes:

Changing the file permissions of the wp-config.php file.

Enter 644 into the numeric field and click on the OK button. Changing all of these files should resolve the Forbidden 403 error if the error was the result of issues with WordPress file permissions.

Conclusion

There are an endless amount of errors that a WordPress website can encounter. Trying to troubleshoot them can be frustrating, especially if they prevent access to a website like the 403 Forbidden error does. Fortunately, you can apply a systematic approach to address almost every possible cause of this problem.

In this article, we covered two main methods of resolving a 403 Forbidden error:

  1. Addressing it as a user on the front end by refreshing the page and clearing your cache
  2. Addressing it as site owner on the back end by using an FTP client to deactivate your plugins, restore the .htaccess file, and adjust your file permissions

If you want to improve your WordPress troubleshooting skills, we also have lots of other guides on fixing common WordPress errors:

Do you have any questions about fixing the 403 Forbidden error? Let us know in the comments section below!

Free guide

5 Essential Tips to Speed Up
Your WordPress Site

Reduce your loading time by even 50-80%
just by following simple tips.

Bài viết liên quan

Trả lời

Email của bạn sẽ không được hiển thị công khai.