Just wait 3 second

0 %
Md Golam Abir
Web Designer
Wordpress Expert
  • Residence:
    Bangladesh
  • City:
    Dhaka
  • Age:
    25
Bangla
English
Hindi
html
CSS
WordPress
  • Elementor, Elementor pro.
  • Cpanel, Whm, CyberPanel
  • Linux Server Management

How to Fix the 403 Forbidden Error in WordPress

June 15, 2024

Encountering a 403 Forbidden Error on your WordPress site can be frustrating and bewildering. This error signifies that your server understands the request but refuses to authorize it. If you manage your WordPress site through cPanel, you’re in luck! cPanel provides several tools that make troubleshooting and resolving this issue straightforward. In this blog, we’ll walk you through the steps to fix the 403 Forbidden Error using cPanel.

Common Causes of the 403 Forbidden Error

Before diving into the fixes, it’s useful to understand the common causes of this error:

  1. Incorrect File Permissions: Permissions control who can read, write, and execute files and directories. Incorrect settings can deny access.
  2. Corrupt .htaccess File: This configuration file can become corrupted and cause access issues.
  3. Plugin Conflicts: Sometimes, plugins can interfere with your site’s functionality.
  4. IP Denied in .htaccess: Your IP might be blocked accidentally.
  5. Hotlink Protection: If not configured properly, it can block access to resources.

Steps to Fix the 403 Forbidden Error Using cPanel

1. Check File Permissions

Incorrect file permissions are a common culprit. Here’s how to correct them using cPanel:

  • Log in to cPanel: Access your cPanel account through your hosting provider.
  • File Manager: In the Files section, click on File Manager.
  • Navigate to Your WordPress Directory: Typically, this is the public_html directory.
  • Check Permissions: Select the folders and files, then click on the Permissions button at the top. Ensure directories are set to 755 and files to 644.
  • Apply Permissions: Make sure to apply the changes recursively to include all subdirectories and files.

2. Fix the .htaccess File

A corrupt .htaccess file can cause a 403 error. Here’s how to fix it:

  • File Manager: In cPanel, go to File Manager.
  • Locate .htaccess: Find the .htaccess file in the root directory of your WordPress installation.
  • Backup .htaccess: Right-click the .htaccess file and select Download to back it up.
  • Delete .htaccess: After backing up, delete the .htaccess file.
  • Regenerate .htaccess: Log in to your WordPress dashboard, go to Settings > Permalinks, and click Save Changes to create a new .htaccess file with default rules.
  • Replace .htaccess: If you can’t access WordPress dashboard , you can replace old .htaccess code with default .htaccess code. Click Here to get default .htaccess code.

3. Deactivate All Plugins

Plugins can sometimes conflict and cause a 403 error. Here’s how to deactivate them:

  • File Manager: In cPanel, go to File Manager and navigate to the wp-content directory.
  • Rename Plugins Folder: Rename the plugins folder to something like plugins_backup. This deactivates all plugins.
  • Check Your Site: Visit your site to see if the error is resolved. If it is, one of your plugins is the culprit.
  • Reactivate Plugins One by One: Rename the folder back to plugins, then reactivate each plugin one by one from the WordPress dashboard to identify the problematic plugin.

4. Remove IP Block from .htaccess

If your IP is blocked, you need to remove the block:

  • File Manager: In cPanel, navigate to the .htaccess file and open it for editing.
  • Remove IP Deny Rules: Look for any lines that contain deny from [your IP address] and delete them.
  • Save Changes: Save and close the file.

5. Disable Hotlink Protection

Hotlink protection might be blocking legitimate access. Here’s how to disable it:

  • Security Section in cPanel: Look for Hotlink Protection under the Security section.
  • Disable Hotlink Protection: Follow the prompts to disable this feature, ensuring it’s not blocking legitimate requests.

Final Thoughts

The 403 Forbidden Error can be a significant obstacle, but with cPanel’s user-friendly tools, you can troubleshoot and resolve the issue efficiently. By checking file permissions, fixing the .htaccess file, deactivating plugins, removing IP blocks, and disabling hotlink protection, you can restore your site’s functionality.

If these steps don’t resolve the issue, consider reaching out to your hosting provider. They can help diagnose server-side problems that might be causing the error. Regular maintenance, including backups and updates, can help prevent such issues from occurring in the future, ensuring a smooth WordPress experience.

Posted in WordPressTags: