How-to-Fix-403-Forbidden-Error-in-WordPress-CMS

How to Fix 403 Forbidden Error in WordPress CMS

You’re not alone if you’ve struggled with an annoying 403 forbidden error when trying to access your WordPress website. Even though these errors can make an online experience unbearable, this blog post can help. It’ll break down everything that you need to know about How to fix 403 forbidden error in WordPress.

If you receive a 403 forbidden error, it can look pretty bad. But WordPress errors aren’t as scary as they might seem.

However, before I get started fixing the error, let’s take a closer look at it so you’ll understand what caused it and ways to stop this from happening in the future.

The 403 Forbidden Error

This HTTP status code appears when a user tries to access a forbidden resource. This error code indicates permission errors and can be caused by poorly coded plugins or an empty site directory.

Causes of the 403 Forbidden Error

A common cause for the 403 forbidden error is that it’s usually caused by improper configuration of a resource in the system which denies access.

A few specific reasons:

  • A broken .htaccess file.
  • The file permission that’s not correct.
  • Plugin with poor coding.

There are a few versions of 403 forbidden errors

You may encounter 403 forbidden errors with different names, some of these are the following:

  • HTTP error 403 – forbidden
  • 403 forbidden
  • Error: 403
  • 403 forbidden error was encountered while trying to use an ErrorDocument to handle the request
  • You don’t have permission to access [directory] on this server: Forbidden

Reading Suggestion – WordPress Website Maintenance Cost Guide – The Secrets You Were Never Told About

How to Fix 403 Forbidden Error in WordPress (7 Easy fixes)

The 403 error can be tricky to correct because the server doesn’t allow your browser to load the scripts. However, there are several ways to resolve the error in WordPress websites. Let’s discuss them!

The below section has quick fixes that can help you find the error and fix it, so please follow them in chronological order.

By Clearing Your Browser Cache

Clearing your browser’s cache is the easiest solution to the 403 forbidden error, and a hard refresh of your browser is always recommended for WordPress errors.

You might be experiencing a 403 error because you’re using outdated cache settings. It might be worthwhile to clear your browser cache and cookies or to visit your website in incognito mode to see if that fixes the issue.

Rollback WordPress to a Running Version Using The Backup

If you have access to an application or server-level backup, you should revert the changes and go back to the last running version. This can help bypass the 403 error that is preventing your website from loading.

For example, your website may have been working fine on October 31, but by November 1st it stopped working for some reason. In that case, you can revert back to an earlier version of the site by restoring the backup.

You can restore your data using the built-in backup function, or use the backup feature if you have configured the plugin.

.htaccess file check

One of the most common reasons that a 403 forbidden error in WordPress may occur is due to a corrupted .htaccess file. You could fix it in a matter of seconds by using any FTP manager, no matter what operating system you’re using.

  • First, open FileZilla and connect the FTP client.
  • Make your way to the Public_HTML folder and find the .htaccess file.
    Find-htaccess-file
  • Once you found the file, Right-Click on it and download it as a backup for the safe side.
    Htaccess-Download
  • After the backup now please delete the .htaccess
  • Now open your website on the Incognito browser window and check if the 403 Forbidden error has been resolved.

If deleting the .htaccess file resolves the error, then it confirms that the error was caused by a corrupt file.

Now it’s time to generate a new and clean .htaccess file, Using the below steps you can create it easily.

  • Now please login to your WordPress website admin.
  • After logging in Go to Settings > Permalinks, You will be redirected to the setting page of permalinks.
    WordPress-Permalinks
  • At the bottom of the page, you can see the Save Changes button, Click on the button to generate a new .htaccess file.
    Save-Permalinks
  • Now please open your FileZilla or FTP client to check if the .htaccess file has been generated.

Try the below-mentioned troubleshooting steps if the error persists.

Reading Suggestion – The Secret Guide of WordPress Website Development (Everything You Need To Know)

Check The File Permission

Many files in WordPress need access permissions, but if those permissions are incorrect the server will give a 403 error, indicating you don’t have access to the file.

To check file and folder permissions, Follow the below steps.

  • Connect to your WordPress website server via an FTP client.
  • After the connection, navigate to the root folder of a website.
  • Find the public_html folder and Right-click on it, Now click on File Permissions.
    WordPress-File-Permision
  • Make sure that the numeric value in the Permission box is set to 744, 755 or 775
  • Please click the checkbox next to ‘Recurse into subdirectories‘
  • Don’t forget to check the option that says ‘Apply to directories only‘
  • Finally, Click on OK
    WordPress-Directory-Permission

Please repeat the same process for all the files as well and set permission 644 or 640, Never forgot to select an option: Recurse into subdirectories > Apply to files only

WordPress-File-Permission

Check your Website again to see if the 403 forbidden WordPress error has been resolved. If you still get the same error, then you’ll need to perform the next steps, which are deactivating plugins.

Reading Suggestion – How to Scale Your WordPress Website for High-Traffic

Deactivate All Plugins and Reactive Them One by One

Sometimes poorly coded plugins can cause a 403 forbidden error in WordPress website. This is often the problem when a plugin isn’t fully compatible with your site’s specific setup. To get to the bottom of this, we recommend deactivating all plugins and then checking for errors.

Let’s deactivate all the plugins:

  • Access your WordPress website service by connecting FTP client (FileZilla)
  • Go to the public_html folder and double-click on wp-content.
  • You will find the plugins folder, Now please rename the folder as plugins-OLD.
    Rename-Plugin-Folder
  • Now go to your browser and refresh the webpage.
  • If your website is loading properly it means the plugin was causing the error.
  • Now please change the plugin-OLD folder name to plugins.
    Restore-Plugin-folder-name
  • After changing the folder name, Log in to your website, and Go to the WordPress Dashboard > Plugins > Installed Plugins.
  • You can see that all the plugins are deactivated.
  • Now it’s time to find the culprit, Active each plugin and check whether your website is loading fine or gives errors, and at the end, you will find the problematic plugin.

Check with HotLink Protection

Hotlink protection prevents other websites from using your images. If you don’t want Google Images or Pinterest to use your photos, then you can turn on hotlink protection. Hotlink protection is also a good way to help conserve bandwidth and server resources.

Enabling hotlink protection on your CDN/hosting is highly recommended, but it can trigger 403 forbidden errors if not set up properly. For that reason, it’s best to carefully configure it and then check the website’s status to make sure there are no errors.

Contact Hosting Support

If you’ve tried all the steps above and are still seeing the 403 forbidden error, it’s time to contact your hosting provider. Many managed hosting providers have quick response times for these issues.

If you’re experiencing technical issues, they can probably identify the problem and get you back up and running.

Reading Suggestion – How to Fix 502 Bad Gateway Error in WordPress – Top 10 Methods

Summary

The 403 Forbidden error tells you that your server is working, but for some reason, you no longer have permission to look at all or some of your sites.

There are many possible causes for the 403 Forbidden error, including that you are experiencing misconfiguration in hotlink protection. Maybe you’ve also come across one of the more common causes, issues with file permissions on your WordPress site or .htaccess file.

With this guide, I hope you found a way to fix your WordPress 403 error. If you follow the steps in this guide, you should be able to get your website running smoothly in no time.

WP Small Fix is your around-the-clock WordPress support agency for monitoring and maintaining WordPress website of yours. They’re there when you need them, 24/7. Our experts are standing by to help with an emergency they provide the peace of mind needed when unexpected technical issues come up on your site.

Our team specializes in managed WordPress speed-up services for WordPress sites of all sizes and types.

WordPress Error
You must be logged in to post a comment.