How to Fix WordPress 403 error?

siddhant sugan dodrai
By -
0
Have you ever spent a lot of time online because of an annoying 403 error that stopped you in your tracks? How to Fix WordPress 403 error?
How to Fix WordPress 403 error?


Well, don’t worry, you’re in the right place, because this blog explains everything you need to know about the 403 error on your WordPress site.

When you think about a 403 forbidden error, you might think that it’s a cause for panic. But WordPress errors don’t look as bad as they are.

Let’s start by learning a bit about the 403 forbidden error and its causes. This way, you’ll be able to understand the underlying causes of the error and fix them in advance.

What is 403 Forbidden Error?

The HTTP status code is an error that occurs when you attempt to access a resource that is not allowed to be accessed. The HTTP status code indicates that a permission error has occurred. This error is often caused by indexing problems, poorly written plugins, empty site directories, or ownership problems.

What Causes the 403 Forbidden Error in WordPress?

The main reason for the 403 error on your WordPress site is the incorrect configuration that prevents you from accessing the resource you are trying to access.

There are also several other reasons for the 403 error, such as:

✅ A broken.htaccess file
✅ Poorly written plugin
✅ File permissions

You may come across 403 forbidden errors in various variants. Some examples of 403 forbidden errors include:

🔹HTTP Error 403 – Not allowed

🔹You do not have access to [directory] on the server

🔹A 403 forbidden error was encountered 🔹while handling the request using an Error Document Error 403

How to Fix WordPress 403 error?

The 403 error is caused by the server preventing your browser from loading the scripts. However, it is possible to fix the 403 error if you know how to do it.

There are several simple ways to fix the 403 forbidden on WordPress websites. In this post, I will list  simple ways to chronologically discover and fix the 403 error.

NoteBefore attempting any type of troubleshooting, we strongly recommend backing up your entire site. Because if anything goes wrong during the troubleshooting process, it will allow you to recover your website quickly and easily.

1. Clear Your Browser Cache

The easiest way to fix the 403 error is to clear your browser cache. It is always recommended to perform a hard refresh whenever you experience a WordPress error. The 403 error might be caused by your browser cache. Clearing your browser cache, cookies, or visiting your website incognito might fix your problem.

There are many web browsers, but if you are using Google Chrome, here is how to clear your cache.

How to clear Browser Cache in Chrome?

To clear the cache in Chrome, open Chrome, click on the 3 dots in the right-hand corner, select “More tools”, then “Clear browsing data”.

In the drop-down window, select “Time range” or “All time” to clear all the data.

Next, click on “Cached images & files” and select “Clear data” to remove the files.

This should fix all the caching issues in Chrome.

2. Rollback to a Running Version From Your Hosting Backup

If your hosting provider provides a backup for the application or a backup for the server, you can rollback the changes and go back to the last running version. Rolling back to the last version can help you avoid the 403 error. 

For instance, if your website ran smoothly on August 2nd but crashed on September 1st, you can go back to the previous version with just a few clicks.

Vultr provide Backup of your VPS Automatically in Cloud. Create a Account in Vultr and Launch Your WordPress Website. In Easy steps.

3. Check .htaccess File of Your WordPress

Another cause of a WordPress 403 forbidden error is a damaged.htaccess. A damaged.htaccess can be repaired in a matter of seconds using any FTP manager.

🔹First, log in to your server using an FTP client
🔹Go to the .htaccess file located in the public_html
Edit wordPress .htaccess file

🔹Right-click on the .htaccess file and download the file to remain safe
🔹Once you've downloaded the file, delete the .htaccess file.
🔹Now go to your browser and refresh your website to check if the 403 error has been resolved.

👉 Note:- Don’t forget to upload the .htaccess file you previously downloaded to your server.

If the error is resolved by removing the file, it indicates that the error is caused by a damaged.htaccess.

How to create a new.htaccess:

🔹Log in to your WordPress dashboard

🔹Go to Settings > Permalinks

🔹You'll be redirected to the permalink settings page

🔹Click the Save Changes button at the bottom of the page to generate a new .htaccess file.

🔹Open your FTP client to verify if the .htaccess file has been regenerated.

🔹 Open your FTP client to verify if the .htaccess file has been regenerated.

If the issue persists, proceed to the next step below to resolve the issue:

4. Check File Permissions

There are many files in WordPress that need access permissions. If these permissions are incorrect, then the server will give you 403 permission denied error telling you that you do not have the file you are looking for.

🔹Use an FTP client to connect to your WordPress website
🔹Go to the root of your WordPress site
🔹Right-click on public_html
Click on the file permissions
🔹Make sure the number in the Permission field is 744 (or 775)
🔹Next, select Recurse into Subdirectories
🔹Next, select Apply to Directories only
Finally, click OK
Check file permissions



🔹Repeat the same process for all the files
Set the file permission to 644 or 640
🔹Don’t forget to select Recurse into subdirectories > Apply to files only
Click OK
Once again, check if the WordPress 403 forbidden error is still present. If it is, proceed to the next step: Deactivate plugins.

5. Deactivate all wordPress plugin

Sometimes, plugins that are not well-coded can cause the 403 forbidden error in WordPress sites. So, we can disable all of our plugins and see if the problem is solved.

How to deactivate plugins?

🔹First, you need to restore access to your WordPress files. You can do this by using a FTP client such as FileZilla.

🔹Next, you need to open your WordPress files again. To do this, open your WordPress site again.

🔹Open your WordPress site by clicking on the "public_html" option in the menu bar.

🔹Go to "wp-content" > "public_html".

🔹Next, go to "plugins" > "plugins-old" and change the name of the plugins folder.

🔹Return to your browser and update

🔹If the website begins to function correctly, then the plugins are the reason for the error

🔹Replace the old plugins folder name with the new one

🔹Once you’ve changed the folder name, go to the WordPress Dashboard > Plugins > Installed Plugins

🔹All plugins are disabled by default

🔹Turn on each plugin and see if your site works after it’s turned on

🔹Find the plugin that’s causing the problem

6. HotLink Protection

Hotlink protection protects your site images from being used by other websites. You can enable hotlink protection even if you don't want Google Images or Pinterest or any other sites to use your images.

Hotlink protection also helps you manage your site's bandwidth and server resources.

In some cases, hotlink protection can cause a 403 error in your CDN / hosting if it's not set up correctly. Therefore, we strongly recommend you set up hotlink protection properly and then check your site's status.

7. Contact Your Hosting Support

If you have gone through all of the above steps and you are still getting the 403 error, then the last option is to get in touch with your hosting provider. Most managed hosting providers provide prompt help with these errors.

With Hosting provider, you can get 24/7 support via live chat and ticket support. provides cloud based WordPress hosting starting at $11/month, so you can be sure that you are in good hands with Hosting, even in a world of 404, 500, and white screen of death errors.

Check out our guides to fix 404 errors, 500 internal server errors, white screen of death and common WordPress errors.

8. Ensure proper access to the file by changing the ownership of the file .

The 403 Forbidden error is triggered when an incorrect file ownership is encountered on a Linux or virtual private server (VPS) web hosting. In such environments, files and folders can be allocated to an Owner, to a Group, or to both. To change ownership, you will need to have access to the VPS via SSH and an SSH terminal.

To verify ownership, use the following command:
ls -1 [file name]

The file ownership should be equal to the username of your hosting account. If the username is different, you can change the file ownership using the chown Linux statement.

chown [owner][:group] [file name]

If you don't feel comfortable using it, you can ask your hosting provider's support team for help.

Here is an example of changing the owner or group of a file:

Change the Owner of file 

# chown Rehman myfile
# ls -l myfile
-rw-r--r-- 1 Anil users 112640 Aug 2 07:10 myfile
Using the chown command, we can change the owner of the file "myfile" to the user "Anil". After running the command, we will update the file's permissions and ownership, and the new owner of the file will be shown as "Anil" and the group "users".

The file is now owned by "Anil", and the date of modification is August 2 at 7:10 p.m.

9. Check Your A Record for DNS Configuration

Another possible cause of 403 Forbidden is a misconfigured domain name that points to an incorrect IP address. This means that if your domain does not point to the correct IP address, then you do not have access to the content of the site.

Migrating to a different web host and forgetting to update the nameservers may cause your domain to point to the old host. In this case, the old host may end your account.

You can check your DNS records for your domain by using the “nslookup” command in your terminal. This command works on different operating systems, such as Windows, Linux and macOS.

Conclusion

I hope you have found this guide useful and were able to resolve the “ 403 Forbidden Error” using the shared fixes. Have you found the correct ways to resolve this issue?

Please let us know in the comments below which 403 forbidden fix you would like to use for people who are facing similar problems.







Post a Comment

0Comments

Post a Comment (0)

#buttons=(Ok, Go it!) #days=(20)

Our website uses cookies to enhance your experience. Learn more
Ok, Go it!