by Ngoc
January 1, 2022

403 forbidden error in WordPress: What is it and how to fix it with some easy steps

Have you recently tried to enter your WordPress site with a warning stating something like “Forbidden” or that you need authority to do so? If that’s the case, you’ve probably seen the 403 Forbidden error on WordPress. Seeing an error on your WordPress site can be stressful and frustrating. For that reason, in this article, ArrowTheme bring to you this comprehensive guide to help you fix the 403 Forbidden Error and get your site back up and running as soon as possible.

What is the 403 forbidden error in WordPress?

According to the Internet Engineering Task Force (IETF) The error 403 Forbidden means:

The 403 (Forbidden) status code shows that the server understands the request but refuses to allow it. If a server wants to know the reason for the request’s refusal publicly, it can do so in the response payload (if any).

The 403 Forbidden error, like many other common WordPress problems, is an HTTP status code which a web server uses to communicate with your web browser.

Anytime you use your browser to connect to a website, the web server responds with an HTTP header. It often happens behind the scenes since everything is fine (the status code is 200, if you are curious).

Anytime you use your browser to connect to a website, the web server responds with an HTTP header. It often happens behind the scenes since everything is fine (the status code is 200, if you are curious).

However, the server will respond with a different numerical HTTP status code when something goes wrong. While these numbers are inconvenient to encounter, they are critical for you to analyze exactly what is wrong with your website.

The 403 Forbidden error indicates that your web server recognizes the client’s (i.e., your browser’s) request but refuses to fulfill it. Consider the following example:

  • Access to the wp-admin or WordPress login pages is denied with a 403 Forbidden error.
  • During the WordPress installation, a 403 Forbidden error occurs.
  • When browsing any page on your WordPress site, you can get a 403 Forbidden error.
  • It’s also possible that you’ll merely get ‘Access Denied’ rather than the full 403 Forbidden message.
  • ‘Access to yourdomain.com was denied’ may also appear. This page is not accessible to you because you do not have permission to read it.’

Other HTTP status codes have various meanings. Fixing 404 not found errors, 500 internal server errors, 502 bad gateway errors, and 504 gateway timeout errors are all covered in our guides.

>>> Related: 

How to fix the http error 500 on your WordPress website

What causes 403 Forbidden Error in WordPress?

The following are the two most common reasons of the 403 Forbidden Error in WordPress:

  • Corrupt .htaccess file
  • Incorrect file permissions
Related:  Why WordPress password protected page not working?

It’s also likely that the error is caused by a problem with a plugin you’re using on your site. ArrowTheme will tell you how to fix all of these issues in this article.

403 Forbidden Error on WordPress Variations

Here are some examples of common variants you might faced:

  • “Forbidden: You do not have permission to access / on this server
  • “403: Access Denied- Forbidden
  • “Error 403: Access Denied
  • “403 – Forbidden Error: You are not permitted to visit this website
  • 403 Forbidden – nginx”
  • “HTTP Error 403 – Forbidden: You don’t have permission to view the document or program you requested
  • “403 Forbidden: Access to this server resource is denied
  • “403. That’s an error. Your client doesn’t have permission to get URL / from this server”
  • “You are not authorized to view this page”
  • “It appears you don’t have permission to access this page.”

How to fix 403 Forbidden Error on WordPress?

Fixing 403 Forbidden Error in WordPress caused by File Permissions.

File permissions apply to all files on your website. These file permissions determine who has access to your website’s files and folders.

The incorrect file permissions leads to 403 Forbidden Error in WordPress. Your web server will believe you don’t have permission to view those files.

You can require your WordPress hosting provider to check the file permissions on your website. Some hosts are really flexible, and they will most likely assist you.

Furthermore, changing file permissions on your own can have terrible effects. In case you are unsure about doing it yourself. So you should get the help of a friend or hire an expert. However, if you want to do it yourself, here’s how you’d go about checking your file permissions.

Using an FTP client, connect to your WordPress site. Go to the root folder, which contains all of your WordPress files.

Select a folder with a click, then right-click and choose File Permissions from the menu.

A file permissions dialog box will appear in your FTP client, similar to this:

The file permissions on all folders on your WordPress site should be 744 or 755.

The file permissions on your WordPress site should be 644 or 640 for all files.

Moreover, you also can change the file permissions for the root folder to 744 or 755. Check the box next to Recurse into subdirectories and then the Apply to directories only option.

Select the OK button. All subdirectories in that folder will now have permissions determined by your FTP client.

Related:  How To Add Pre Order in WooCommerce for Your Ecommerce Website

After that, you must repeat the procedure for all of the files. You’ll need file permissions of 644 or 640 this time. Moreover, don’t forget to check the Recurse into subdirectories and Apply to files only boxes.

When you click the OK button, your FTP client will begin setting file permissions for all of the files you’ve selected.

Fix 403 Forbidden Error in WordPress caused by Corrupt .htaccess File

A corrupt.htaccess file on your WordPress site is commonly the source of the 403 error. It’s simple to fix this file.

Firstly, you should use an FTP client or cPanel’s file manager. Therefore, you can connect to your website.

Then, in the root folder of your WordPress site, look for the.htaccess file. In case you can’t find the.htaccess file in your WordPress folder. So you should follow this guide.

You must save the.htaccess file to your computer. As a result, you will have a new backup. Following that, you must remove the file from your server.

Try going to your website. In case the 403 forbidden error is no longer there. So your.htaccess file was corrupt.

By login into your WordPress admin area and visiting the Settings » Permalinks tab, you may create a new.htaccess file.

Simply choose the Save Changes at the bottom of the page. So you will have WordPress create a new.htaccess file for you.

Fixing 403 Forbidden Error caused by a WordPress Plugin

If your site’s file permissions and.htaccess file aren’t the issue, your plugins are the next area to check. It could be a plugin bug or a compatibility problem with other plugins.

Whatever the problem is, a little trial and error is the best method to locate the faulty plugin. Therefore, you have to deactivate all of your plugins and then reactivate them one by one until you identify the source of the problem.

If you still have access to your WordPress dashboard, you can do this from the standard Plugins section.

In case you can’t get into your WordPress dashboard. So you have to connect to your WordPress site’s server through FTP/SFTP.

Once you’ve established an FTP connection to your server, follow these steps:

1. Go to the wp-content folder.

2. Browse to the plugins folder within the wp-content folder.

3. Right-click the plugins folder and select Rename .

4. Modify the folder’s title. You can call it whatever you like. However, ArrowTheme recommend plugins-disabled to make it easier to remember.

You can basically disable all the plugins on your site by renaming the folder.

Now go back to your website and try again. If your site works, one of your plugins is to blame for the 403 Forbidden error.

Related:  Step by step to customize theme in Wordpress safely and efficiently

Reactivate your plugins until you figure out which one is causing the problem.

When you go to your site’s Plugins after modifying the file name of the plugins folder, you will deal with a lot of errors. They show that the plugin file does not exist.

To resolve this issue and recover control over your plugins, you should change the folder’s name back to plugins using your FTP program. In case you renamed it to plugins-disabled, you just simply rename it to plugins.

After that, you’ll be able to see the entire list of all your plugins once more. Only now will they all be deactivated:

Reactivate them one by one using the Activate button.

After you identified the plugin that’s creating the problem, you can either contact the plugin’s developer for assistance or look for a similar plugin 

Deactivate CDN temporarily

It is a problem with your content delivery network (CDN) if you’re getting 403 forbidden warnings on your images, JavaScript, and CSS. We suggest temporarily disabling your CDN in this case. And then you should check your site to see whether it works.

Double-check to see if Hotlink Protection set incorrectly.

When adding an image to their site, the hosted link still points to someone else’s site. It is hotlinking. Some people will set up “hotlink protection” with their WordPress server or CDN provider to avoid this.

When hotlink protection enabled, a 403 prohibited error usually returns. This is very normal. So in case you’re getting a 403 forbidden error on something you shouldn’t be. You should check to ensure if hotlink protection is configured properly.

Conclusion

ArrowTheme hope this information was helpful in resolving the 403 Forbidden Error in WordPress. You are interested in our expert advice and tricks for securing your WordPress admin area. So let’s read more of our useful blogs HERE. If you want to explore our awesome services, you just need to leave your information into this CONTACT FORM. And our dedicated experts will respond to you within the shortest time. Not only that, with our WordPress Website Packages – the full solution, your WordPress Ecommerce Website will become more effectively. It comes in two options: Standard and Advance. Our Advance package is a more advanced version of our Standard package. You simply need to select one of the two packages mentioned, and our dedicated experts will assist you with the rest of the building Ecommerce Website Process. Do you want to know more about it? As a result, make certain that you do not overlook them.

Related Posts