How To Fix WordPress 403 Forbidden Error? [10 Easy Steps]

Written by Web Solutions Hub  »  Updated on: October 27th, 2024

The 403 Forbidden Error in WordPress is a common issue that can leave website owners frustrated and confused. This error typically means that the server is refusing to allow access to certain pages or files on your website. The error can stem from several different issues, such as incorrect file permissions, issues with security plugins, or server misconfigurations. Thankfully, there are several methods to resolve it, and this guide will walk you through each one in detail.


Here’s a look at ten ways to fix the 403 Forbidden Error on your WordPress site.


1. Check File Permissions

WordPress sites have specific permission settings that allow the server to read and write files. File permissions that are too restrictive or too open can trigger a 403 Forbidden error. To check and modify file permissions:


Connect to your site using an FTP client (like FileZilla).

Navigate to the root folder of your WordPress installation.

Set files to a permission of 644 and folders to 755.

To apply this in FileZilla, right-click the file or folder, select "File permissions," and input the correct permission values.

Properly configured permissions ensure that your files are accessible without exposing sensitive data.


2. Deactivate All Plugins

Security plugins are often designed to restrict access to your WordPress files. If there is a misconfiguration or an update that conflicts with another plugin, this can lead to a 403 error.


Access your WordPress files through FTP.

Go to the wp-content directory and locate the plugins folder.

Rename the folder temporarily to deactivate all plugins.

Check your website to see if the 403 error is resolved.

If the error disappears, then one of your plugins is causing the issue. You can rename the plugins folder back to “plugins” and activate each plugin one by one to identify the culprit.


3. Revert to the Default .htaccess File

The .htaccess file controls several aspects of how your site is accessed. Corrupt or conflicting code within this file can cause 403 errors. Reverting it back to default can help:


Log in to your server using FTP or cPanel’s File Manager.

Find the .htaccess file in the root directory of your site.

Rename it (e.g., .htaccess_old) to temporarily disable it.

Go to your WordPress dashboard, navigate to Settings > Permalinks, and save the changes without modifying anything. This will generate a new .htaccess file with the default settings.

If the 403 error is gone, you know that the old .htaccess file was the source of the issue.


4. Disable Hotlink Protection

Some hosting providers offer hotlink protection to prevent other sites from embedding your content, which can save bandwidth but occasionally block legitimate requests.


Log in to your hosting account’s cPanel.

Locate Hotlink Protection under the Security section.

Ensure that your domain is whitelisted and disable hotlink protection if necessary.

This step is particularly useful if you’ve enabled hotlink protection in the past or if it was automatically activated by your host.


5. Check IP Blocking in Security Plugins

Plugins like Wordfence, Sucuri, or iThemes Security offer IP-blocking features. However, sometimes your IP might be accidentally blocked due to suspicious activity detection.


Go to your security plugin’s settings.

Check any IP blocklists and ensure that your IP or user agent isn’t restricted.

If necessary, whitelist your IP address to prevent future blocks.

This can quickly resolve access restrictions that result in the 403 error.


6. Reset File Permissions Using cPanel

If you’re unsure about manually setting permissions, many hosting providers offer automated ways to reset file permissions to their default state.


Log in to cPanel and navigate to your hosting account’s settings.

Look for a Reset Permissions option under Files or Security sections (if available).

Confirm the reset, which will apply proper permissions to all files and directories.

This feature can save you time and prevent potential human error during manual adjustments.


7. Clear Browser Cache and Cookies

Sometimes, the 403 Forbidden Error might not be due to server or file issues but rather cached data on your browser.


Clear your browser’s cache and cookies.

Alternatively, try accessing your site in incognito mode or from a different browser.

This helps ensure that you’re not seeing an outdated or cached error page from a previous visit.


8. Check CDN Settings

If you’re using a CDN, it’s worth double-checking its settings. Sometimes, a CDN can inadvertently restrict access to your resources.


Log in to your CDN provider’s dashboard (e.g., Cloudflare).

Check for any firewall or security settings that might be causing issues.

Ensure your server IPs are correctly added to the whitelist, and temporarily pause the CDN to see if the error persists.

A misconfigured CDN can be a common culprit, particularly if the error is only affecting certain resources like images or scripts.


9. Disable Mod_Security

Mod_Security is an Apache module that acts as a firewall for your site. While beneficial for security, it can sometimes restrict legitimate access.


Log in to cPanel and look for Mod_Security under the Security section.

Disable Mod_Security temporarily and see if the error resolves.

If disabling Mod_Security fixes the issue, consider adjusting its rules to allow legitimate access without completely disabling the module.


10. Contact Your Hosting Provider

If you’ve exhausted all troubleshooting steps and the 403 error persists, it’s best to contact your hosting provider.


Many 403 errors stem from server settings or restrictions put in place by the host.

Your host’s support team may be able to identify specific settings or restrictions on your account causing the issue.

Hosting support can often help diagnose problems and may be able to offer a fix if the issue is related to your hosting configuration.


These steps should help you troubleshoot and resolve the WordPress 403 Forbidden Error. Addressing this error quickly can prevent frustration for visitors and ensure a smoother user experience. By checking file permissions, disabling plugins, reviewing .htaccess, and working with your hosting provider, you’ll increase your chances of successfully resolving this error and getting your site back to normal.


Disclaimer:

We do not claim ownership of any content, links or images featured on this post unless explicitly stated. If you believe any content or images infringes on your copyright, please contact us immediately for removal ([email protected]). Please note that content published under our account may be sponsored or contributed by guest authors. We assume no responsibility for the accuracy or originality of such content. We hold no responsibilty of content and images published as ours is a publishers platform. Mail us for any query and we will remove that content/image immediately.