How to Fix the 403 Forbidden Error in WordPress

403 Forbidden Error is typically indicative of server permissions that are improperly configured, denying you access to the requested resource, hence the message “403 forbidden access is denied.”

What is the 403 forbidden error in WordPress?

When you see the WordPress 403 forbidden error, it means that your server understands the request you’ve made, but for some reason, it’s refusing to fulfill it. The error can be quite frustrating, particularly when it prevents access to the WordPress admin dashboard, as this hampers your ability to manage your website effectively.

In such a scenario, you would encounter the 403 forbidden WordPress admin error message. This means that while the server acknowledges your request to access the WordPress admin panel, it’s denying you the necessary permissions to do so. This can occur due to numerous reasons such as incorrect file permissions, faulty plugins or themes, or server configuration issues.

In essence, the WordPress Admin 403 Forbidden error is a signal that there’s a communication breakdown between the server and your WordPress website, barring you from accessing and managing your site. The good news is that, while it can be annoying, this error is usually fixable by identifying and addressing the underlying issues causing it.

What Causes the 403 Forbidden Error?

 

An example of 403 Forbidden error

Here are potential causes that can trigger the 403 Forbidden error:

  • Misconfigured file and folder permission settings ‒ users don’t have the necessary permissions to access sensitive files or certain parts of a website.
  • Corrupt .htaccess file ‒ misconfiguration and malware can break the .htaccess code.
  • Missing index page ‒ the index.html or index.php file, which serves as the default homepage template, isn’t available in the website’s directory.
  • Incompatible WordPress plugin ‒ a WordPress plugin might be conflicting with another plugin, or it was incorrectly configured.
  • Incorrect IP address ‒ the domain name points to an inaccurate IP address whose website blocks your access.
  • Malware scan ‒ your website’s security measures can limit access to specific resources to prevent malicious attacks.
  • New web page link ‒ the webpage link was recently updated, making it different from the cached version.
  • Empty website directory ‒ the URL is trying to access your website’s directory instead of a file.

File Permissions

The files and folders stored on your website each have their own permissions. Permissions can control who can access and view the files or folders on your website. The 403 Forbidden error could mean your file has incorrect or bad permissions.

A string of 3 numbers denotes the permissions. File and folder permissions should show the following:

  • WordPress site files must be 644 or 640.
  • Directories and WordPress folders must be 755.
  • Executable scripts within the cgi-bin folder must be 755.
  • Images, media, and text files like HTML should be 755 or 644.

How to Fix the 403 Forbidden Error

If you discover pages returning a 403 Forbidden error, either through using a simply noticing it, there’s no need to panic. Below sharing the steps to address this issue,

To resolve a 403 Forbidden error caused by permissions:

  1. Log in to cPanel.
  2. Navigate to the Files section, then click on the File Manager icon.cPanel - File Manager
  3. Locate and click your website’s directory (also known as the document root) from the list. For this example, we will use public_html.
  4. Once you see your website’s files and folders, click the Settings button at the top-right menu.File Manager - Settings button
  5. In the pop-up window, select Show Hidden Files (dotfiles), then click Save.File Manager - Show Hidden Files
  6. Once all files are displayed, check the Permissions column on the right. Scroll down and see if they follow the correct permissions for files and folders as stated above.File Manager - Permissions column
  7. If any of the files or folders seem to have different permission, you may go ahead and change them to default by double-clicking the set of numbers. Click Save once done making the update.File Manager - Change Permissions

You may also like...