What Is the 403 Forbidden Error in WordPress?
The 403 Forbidden error code is shown when your server permissions don’t allow access to a specific page on your WordPress website.
This error is usually accompanied by the text:
- 403 Forbidden – You don’t have permission to access ‘/’ on this server.
- Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
Here’s an example of what it looks like:
There are different scenarios when you might see this error. For example:
- 403 Forbidden – Access denied on the wp-admin or WordPress login page.
- 403 Forbidden – During WordPress install.
- 403 Forbidden Error – When visiting any page on your WordPress site.
Additionally, “Access Denied” can appear in place of the complete 403 Forbidden message. Alternatively, “Access to yourdomain.com was denied” could appear in the message. It is not authorized for you to view this page.
See our list of the most frequent WordPress mistakes and how to solve them for further information on WordPress error codes.
Now that you are aware of the various 403 error types, let’s discuss their reasons.
What Causes the 403 Forbidden Error in WordPress?
When a particular website cannot be accessed by your server, the 403 Forbidden error code is displayed. This can occur due to a number of factors.
Inadequately configured security plugins are a typical source of the WordPress 403 Forbidden error. If a WordPress security plugin thinks an IP address or range of IP addresses is malicious, it can block that IP address or range.
A corrupt.htaccess file or improper file permissions on your server could be another reason.
Sometimes unintentional modifications to server configurations occur with WordPress hosting providers. A 403 Forbidden error can appear on your website as a result of this.
So let’s look at how to resolve the WordPress 403 prohibited error.
Note: Before you do anything, we recommend creating a complete WordPress backup of your website. You can check out our guide on how to back up your WordPress site.
If you are using an automatic WordPress backup plugin, then make sure that you have access to the latest backup before moving forward.
If you prefer written instructions, then just continue reading.
Method 1: Deactivate Your Plugins Temporarily
Checking to determine if one of your WordPress plugins is the source of the 403 prohibited error should be your first step. You must temporarily disable every WordPress plugin in order to accomplish this. This also applies to any security plugins you might have set up on your website.
If this fixes the issue, it indicates that one of your website’s plugins was the source of the error.
By turning on each plugin one at a time until you see the 403 Forbidden error again, you may identify which plugin was the source of the error. After that, you’ll need to uninstall the problematic plugin, search for a replacement, or get in touch with the developers for assistance.
If none of the above approaches work, just keep reading.
Method 2: Regenerate Your .htaccess File
The 403 prohibited error is frequently brought on by a faulty.htaccess file on your WordPress website. The good news is that it’s really simple to fix this file.
The first step is to use an FTP client, such as FileZilla or the File Manager program in cPanel, to connect to your website.
Next, locate the.htaccess file in your WordPress website’s root folder. If you are unable to locate the.htaccess file in your WordPress folder, refer to this guide.
To obtain a new backup of the.htaccess file, you must download it to your computer. Simply remove the file from your server after that. You can continue to use WordPress, so don’t worry.
Try visiting your website now. Should the 403 prohibited error be fixed, it indicates that there was a corruption in your.htaccess file.
By login into your WordPress admin area and visiting the Settings » Permalinks tab, you may create a new.htaccess file.
Simply click on the ‘Save Changes’ button at the bottom of the page, and WordPress will generate a new .htaccess file.
Method 3: Correct Your File Permissions
Incorrect file permissions are most likely the source of the 403 prohibited issue on your website if none of the previous fixes have worked.
Every file kept on your website is protected by file permissions. Who can access the files and folders on your WordPress website is managed by these file permissions.
One possible cause of the 403 prohibited error is incorrect file permissions. They provide the impression that you do not have authorization to view those files on your web server.
To ensure that the file permissions on your website are proper, you can request that your WordPress hosting company review them. Given their supporting nature, some hosts won’t mind and will likely take care of it for you.
Making changes to the file permissions on your own may have unfavorable effects. It’s better to ask another WordPress website owner for assistance or hire a professional if you don’t feel comfortable handling it yourself.
Here’s how to verify your file permissions if you’d like to do it yourself, though.
To access your WordPress website, just use an FTP client to connect. Select the root folder to view all of your WordPress files.
Click to select a folder, right-click it, and then select ‘File permissions’ from the menu.
Your FTP client will show you a file permissions dialog box like this:
The file permission for every folder on your WordPress website should be 744 or 755.
All of the files on your WordPress website should have 640 or 644 file permission in the meantime.
The root folder’s file permissions can be changed to 744 or 755. Additionally, you must select “apply to directories only” after checking the box next to “Recurse into subdirectories.”
Just press the “OK” button. All of the folder’s subdirectories will now have their permissions set by your FTP client.
You must repeat the procedure for each file after it is finished. Use file permissions of 644 or 640 this time, and remember to check the “Recurse into subdirectories” and “Apply to” boxes.
Click on the ‘OK’ button, and your FTP client will start setting file permissions for all the selected files.
Try accessing your website now and see if the 403 forbidden error has gone.
Method 4: Clear Your Cache and Cookies
An easy solution is sometimes the best one. The 403 prohibited issue can be fixed by clearing the cookies and cache in your browser, as well as the cache in WordPress if you’re using a caching plugin.
Your browser caches webpage data, much way your computer does to expedite loading speeds by storing temporary files. This data corruption could result in compatibility problems and the 403 error.
Similarly, the server may interpret requests incorrectly due to a damaged cache created by a plugin.
You can limit access to particular sites or user roles with the advanced settings that many caching plugins provide. Access to specific areas of your website may be inadvertently blocked if these settings are inadvertently set incorrectly.
You can use our guide on how to clear the cache in the major browsers to get instructions on how to do so for your browser.
You can review our advice on clearing WordPress cache and go to the plugin’s documentation if you’re using a caching WordPress plugin.
Method 5: Temporarily Disable CDN (Content Delivery Network)
The 403 prohibited error could be brought on by a Content Delivery Network (CDN) if you’re employing one to enhance the performance of your website.
By acting as a go-between for your website’s server and users, a content delivery network (CDN) distributes cached content from widely dispersed geographical locations to speed up page loads.
You can temporarily disable your CDN to check whether it’s the problem. After then, check to see if the problem still exists on your website.
If turning off the CDN fixes the issue, you’ll need to get in touch with the support staff of your CDN provider for additional troubleshooting.
Method 6: Check for Malware
One of the many problems that malicious software might bring about is the 403 prohibited error. It can tamper with file permissions, insert malicious code, or stop your website and server from communicating.
We advise scanning your website with a security plugin or a service provided by your WordPress hosting company to check if malware is there.
Malware-scanning features are available in many trustworthy security plugins, and these harmful files can typically be deleted with only one click.
We hope that this post was helpful in resolving the WordPress 403 prohibited issue for you. See our list of the most typical block editor issues and essential WordPress plugins to expand your website if you’d like.