instagram rss arrow-down

Given the complexity of the Internet, it is no surprise that things do go wrong. Since WordPress powers a significant portion of the Internet, the number of errors that pop up at WordPress websites is pretty high.

A pretty common error that users encounter, particularly on WordPress websites, is 403 Forbidden. To understand this error, it is important you should have a bird’s eye view of how it all works. Next, in this article, I will explore the possible causes and the options to fix this errors for WordPress websites.

The Client-Server Model

The most popular model of communication over the Internet is client-server model in which (typically) server responses to the requests sent by multiple clients. Every server response has a HTTP status code that indicates success or failure of the request-response cycle. Developers use these status codes to understand what’s going on and create processes that handle a specific situation.

What is 403 Forbidden

The 403 Forbidden error is a HTTP status code that is sent back by the server when the client (user) who initiated the request does not have permission to access a specific page or resource.

What Causes the 403 Forbidden Error in WordPress

Several scenarios can trigger this error at a WordPress site. Going through the causes sequentially is a great way of debugging the error.

Note: Before going further, it is a good idea to take the backup of the entire website.

The following are the common causes of 403 Forbidden error:

  • Corrupt .htaccess file.
  • Incompatible or faulty plugins.
  • File permission issues

Corrupt .htaccess file

The .htaccess file determines how Apache servers process clients’ requests. There are times when users explicitly modify this file to achieve certain functionality. However, changing the contents of the files could result in conditions that could cause access related issues.

Solution

Fixing this issue is easy. Just access the root directory of the website through FTP and delete it. Once the file is removed, log into your WordPress Admin and under Settings, select Permalinks. A new .htaccess file is created as soon as you hit the Save Changes button.

Try to access the website in a new tab. If you are successful, you could then start adding the changes to the file. Take care to test the access to the website to ensure that things are working properly.

Incompatible or Faulty Plugins

Plugins are essential components of a WordPress website. However, given the huge number of WordPress plugins in the market today, it is very easy to install a faulty or incompatible plugin on your WordPress website, with predictable results. The plugins can break your site and cause access related issues.

Solution

The easiest fix is to simply deactivate or completely remove the offending plugin(s).

To do so, simply deactivate all the installed plugins and check if the site is back on. If yes, then start activating them one by one until you see the error again. At that point mark that plugin and either replace it with an alternate plugin or look for its developer’s support. It is possible that even after deactivating all the plugins you would still be looking at the error; this shows that the problem is not caused by your plugins and further troubleshooting is required.

File Permission Issues

If the above two fixes don’t work, chances are that the problem is incorrect file permission. WordPress folders and files are inaccessible if the permissions are set incorrectly.

Solution

To rectify this issues, access the website through FTP manager.

Folders’ permission at any WordPress site should be set to 744 or 755. Similarly, file permission should be either 644 or 640.

In the FTP manager, right click on the folder name and select File permissions tab to open a new window.

Now simply put the proper numeric value in the field:

To apply these changes to all subdirectories inside that folder; click on Recurse into subdirectories and click OK button. Repeat the process for files. However, this time use either 644 or 640. Once the process is completed, try accessing your WordPress site in a new tab, and hopefully, you will not see the 403 Forbidden error anymore.

The post How To Fix 403 Forbidden Error in WordPress appeared first on WPblog.

Source link

Support New Articles with a Sweet Tee

Leave a Reply
Your email address will not be published. Required fields are marked *

*

*