Do you get a 403 Forbidden error when using WordPress?
When users get a 403 Forbidden error, they often become panicked since it appears to be a serious problem. These inaccuracies, however, should not cause as much concern as they usually do. I’ll go over how to fix the 403 Forbidden WordPress problem quickly.
But first, let’s figure out what it is and why it occurs. This will help you understand why this occurs, making it much easier to resolve the 403 Forbidden problem.
What is the 403 Forbidden Error, and Why Does It Occur?
When you try to access a resource that is blocked for whatever reason, this HTTP status code is returned. This is frequently due to incorrect configuration, which might result in access to the requested resource being denied.
Various variants of the 403 Forbidden error can be seen from time to time, including:
- 403 Forbidden
- HTTP Error 403 – Forbidden
- Forbidden: You don’t have permission to access [directory] on this server
- Error 403
These differences can be apparent in a variety of settings, including:
- A corrupt .htaccess file.
- A poorly coded plugin.
- Incorrect file permissions.
Fix 403 Forbidden WordPress Error
Because your browser is unable to load the scripts due to the server’s refusal, the problem can be difficult to repair. If you have a WordPress website, however, you can use this method to fix the 403 prohibited issue.
Follow the instructions below to resolve the WordPress 403 prohibited error.
- Make a backup of your data
It is highly recommended that you take a backup of the complete website before proceeding with the troubleshooting options. Because if something goes wrong during troubleshooting, it will assist you in quickly restoring your website. If you want to understand how to back up a WordPress site, we’ve put up a comprehensive guide to assist you.
- Revert to a previous working version using your hosting backup
You can undo the modifications and roll back to the previous running version if your hosting provider offers an application or server level backup. For example, on March 4th, your website was OK, but not on March 5th. In that situation, you can use a few clicks to return to the previous version of the site and try to resolve the problem.
- Examine the.htaccess file
A corrupted.htaccess file is one of the causes of the 403 prohibited WordPress error. Any FTP manager can repair a corrupt.htaccess file in a matter of seconds. To begin, connect to your server through FTP and retrieve the.htaccess file from the public html folder
After that, right-click on the .htaccess file and click download on your computer for the safe side. Once you downloaded it, you can now delete the .htaccess file from your server to check either error resolved or not.
Now refresh your website in your browser to see whether the WordPress 403 problem has been resolved. If the WordPress 403 forbidden error remains, proceed to the following troubleshooting procedure (check file permission), and don’t forget to submit your previously downloaded.htaccess file to your server.
If the 403 problem is addressed by deleting the.htaccess file, then your.htaccess file is corrupted and was the source of the 403 error.
To create a new.htaccess file, log into your WordPress admin panel.
Go to the Permalinks page under Settings > Permalinks.
Simply click the Save Changes button at the bottom of the page after that. It will create a new.htaccess file for you.
- Verify the File Permissions
Access permissions are required for several files in WordPress. The server, on the other hand, will display a 403 prohibited error if the permissions are improper. It indicates that you do not have the specific file that you requested.
- You need to connect your WordPress website using an FTP.
- Navigate to the root folder.
- Now click on the right click option and find out the file permissions option
You can see the file permission dialog box and make sure the numeric value in the Permission box of your WordPress website is set to 744 or 755 and check the box next to ‘Recurse into subdirectories’ and then check the option that says ‘apply to directories only.‘
Done with this process, you need to repeat the same process for all the files. Now, you will be setting the file permission to 644 or 640, and don’t forget to select Recurse into subdirectories > apply to files only.
Now check your website again if the 403 forbidden WordPress error is resolved or not. If it still persists then you need to perform the next step.
- Turn off all plugins
On WordPress sites, this 403 prohibited error is sometimes caused by a badly designed plugin. As a result, we’re going to turn off all of our plugins and see if the problem has been rectified.
You’ll need to access your WordPress files using an FTP programme like FileZilla to deactivate your plugins this time. Change the name of the plugins folder to something like plugins-old in public html > wp-content
Now go back to your browser and check your website. If the website starts working fine, then obviously the error is in the plugin. Now, you need to change your plugins-old folder name to plugins.
Once you changed the folder name, then go to WordPress Dashboard > Plugins > Installed Plugins. You will see that all plugins are deactivated by default so you need to activate each plugin one by one and check out your website after each activation.
The malfunctioning plugin will be discovered as soon as possible.
It’s as simple as that. You may also read How To Fix 404 Error Page On WordPress in your spare time.
I hope you find this tutorial to be useful in resolving your “WordPress 403 error” issue. Have you come up with any alternative solutions to this problem? Please let us know what you came up with in the comments area below. I am confident that it will be useful to those who are dealing with similar challenges.