Although you can run into many different WordPress errors, the most frustrating ones stop you from accessing your site. For example, you may encounter the 403 Forbidden error when you’re trying to log in to the WordPress dashboardIn WordPress, the Dashboard is a central hub for managing a website’s content and settings. It is the first sc… More.
Fortunately, there are plenty of ways to fix the 403 Forbidden error in WordPress. For instance, you may just need to deactivate your plugins, adjust file permissions, or disable your CDN.
In this postA post is a type of content in WordPress, a popular open-source content management system used for creating an… More, we’ll take a closer look at the 403 Forbidden error. Then, we’ll show you five ways to fix it in WordPress. Let’s get started!
An Introduction to the 403 Forbidden Error in WordPress
The 403 Forbidden error is a common WordPress issue that mainly occurs when you try to log in to the admin dashboard. However, you may also see the error when visiting a web pageIn WordPress, a page is a content type that is used to create non-dynamic pages on a website. Pages are typica… More online or installing WordPress:
This error message means your server doesn’t think you have the required permissions to view the page or access a resource. Additionally, while you might see the full 403 Forbidden error message, the screen may also simply read, “You’re not authorized to view this page” or “Access denied”.
Here are the most common causes of the 403 Forbidden error in WordPress:
- Incorrect file permissions on your server. File permissions tell the server who can read, run, and edit files on your site. If these aren’t correct, you might be unable to log in to WordPress, create new files, or upload images.
- A faulty pluginA plugin is a software component that adds specific features and functionality to your WordPress website. Esse… More. One of your plugins may be poorly coded and conflict with other software on your site.
- A poorly-configured security plugin. If you haven’t properly set up your security plugin’s settings, it can trigger errors on your site.
- A corrupted
.htaccess
file. This file tells the server how to interact with your WordPress website. Therefore, if the file is corrupted, you may encounter server errors. - Accidental server changes. Your web host may have made an accidental change to your server configuration.
The exact cause of this error may not be apparent at first. Fortunately, we’re going to walk you through how to troubleshoot it and regain access to your WordPress site.
How to Fix the 403 Forbidden Error in WordPress (5 Ways)
Now that you know a bit more about the 403 Forbidden error in WordPress, let’s take a look at five ways to fix it!
1. Check Your File Permissions
All files and folders on your site have file permissions. These enable your server to determine who can access or edit files on your site. Since incorrect file permissions can cause the 403 Forbidden error, it’s important to verify that they’re configured correctly.
If you’re not comfortable doing this yourself, you can ask your web host to do this for you. However, if you have some technical knowledge, you can connect to your site files through File Manager or a File Transfer Protocol (FTP) client such as FileZilla.
Whichever method you choose, you’ll need to locate the root folder of your site. This is usually called public_html
. Then, select wp-admin
.
Now, right-click on the folder and select File Permissions
:
You should be presented with a dialog box:
Folders should have a Numeric value
of 755
.
Now, check the boxes that say Recurse into subdirectories
and Apply to directories only
:
Finally, click on OK
to update your file permissions.
Now, repeat the process for your files, using 644
(static content) or 700
(dynamic content) in the Numeric value
field and Apply to files only
under Recurse into subdirectories
. Hit OK
, and try logging back in to your WordPress site.
2. Deactivate Your Plugins
If the error is caused by a faulty plugin, you probably won’t know which one it is (unless you’ve just activated a new tool). Therefore, it’s best to deactivate all of your plugins and reactivate them one by one to find out which is causing the 403 Forbidden error in WordPress.
Since you don’t have access to your site, you can deactivate plugins through File Manager or connect to your site via FTP. Once you’ve established the connection, click on public_html
and open your wp-content
folder. Then, select plugins
:
Now, right-click on the plugins folder to rename it, and call it something like “plugins_old”. This tricks WordPress into thinking that your plugins no longer exist, so it will deactivate all of them.
Then, try to access your site. If you’re able to log in to WordPress, you know that one of your plugins is causing the error. So, you need to find the culprit.
To do this, go to Plugins > Installed Plugins
:
Click on Activate
and refresh the page between each plugin’s activation. If activating one of these tools triggers the 403 Forbidden error, you’ll know it’s the cause behind it. Then, you can either delete the plugin and find an alternative tool, or contact the developer to alert them to the issue.
3. Remove Your .htaccess File
Your .htaccess
file tells the server how to interact with your WordPress site. However, in the event of a cyber attack, this file may become corrupted. In this instance, you’ll need to delete the file and restore it to clear the 403 Forbidden error in WordPress.
To find and edit your .htaccess file, head to the root directory of your site. You should see the file listed here:
At this point, we recommend making a backup of your site or downloading a copy of the file to your computer. This way, if the file doesn’t turn out to be the problem, you can easily restore it. Then, right-click on the .htaccess
file and select Delete
.
Now, try to access your site again. If you’re able to log into WordPress, you know the .htaccess
file was the problem. Therefore, you’ll need to create a new one.
To do this, navigate to Settings
within your dashboard. Then, click on Permalinks
and scroll down to the bottom of the page:
All you have to do is click on Save Changes
to generate a new .htaccess
file. This is also an opportunity to make sure that you’re using the best permalink structure for your website.
4. Disable Your CDN
Since the 403 Forbidden error indicates a problem with your server, your Content Delivery Network (CDN) may be to blame. CDNs are networks of servers that can reduce latency and speed up your website. You may have signed up for a third-party service, or your hosting provider might provide access to a CDN.
To see if your CDN is causing the 403 Forbidden error, you’ll need to disable it. If the service is provided by your host, you’ll have to log in to your hosting dashboard or ask your host for assistance.
Alternatively, if you use a an image optimization plugin with a CDN, you can often disable its CDN within the plugin’s settings. However, without access to your dashboard, you’ll need to deactivate the plugin manually via File Manager or FTP. You can check out section 2 of this tutorial to find out how to do this.
If the 403 Forbidden error clears, then you know the CDN was at fault. In this case, you can delete the plugin or contact the CDN provider to discuss the issue.
5. Check Your Hotlink Protection
Hotlinking is when a user links to a media file on your server from their own website. Essentially, it’s theft because the user is stealing resources from you. However, it’s a common bandwidth-saving practice that reduces strain on the other person’s server.
You might get access to hotlink protection with your hosting package or through your CDN provider. However, if it isn’t configured correctly, it can cause the 403 Forbidden error in WordPress.
If you’ve tried other troubleshooting methods in this post and you’re still seeing the error, your hotlink protection may be misconfigured. Therefore, we recommend contacting your host or CDN provider for further assistance.
Conclusion
The 403 Forbidden error is a frustrating problem that can deny you access to your website. Fortunately, by following a few troubleshooting methods, you should be able to clear the error message and get your site back up and running.
To recap, here are five ways to fix the 403 Forbidden Error in WordPress:
- Check your file permissions.
- Deactivate your plugins.
- Restore your
.htaccess
file. - Disable your CDN.
- Check your hotlink protection.
Do you have any questions about fixing the 403 Forbidden Error in WordPress? Let us know in the commentsComments are a feature of WordPress that allow users to engage in discussions about the content of a website. … More section below!