The 403 forbidden error is one of the most annoying errors you can come across when working with WordPress.
This error code is usually shown when server permissions restrict access to a specific page.
What is the 403 Forbidden error?
You’ll most likely see a warning that looks something like this:
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.
This error pops up in a couple of different scenarios:
- You can’t access /wp-admin/ or WordPress login page
- You see this error during a fresh installation of WordPress
- You see this error while visiting a page on your website
Most often, this error is caused by a poorly configured security plugin, as many of these plugins block IP ranges if they think they’re malicious.
We’ll go through a couple of different methods to solve the 403 error.
Solutions
Plugin
The first step would be to disable all active plugins on your WordPress website temporarily, including security plugins.
If this fixes the issue – it means that one of your plugins is causing the problem. Activate one plugin at a time to see which one exactly triggers the error.
.htaccess file
Sometimes, a 403 error can be caused by a corrupt .htaccess file. To fix this, log in to your cPanel control panel.
Then launch the File Manager feature under the Files section.
Double-click the public_html folder to enter it, and remove the old .htaccess file (you can back it up locally just in case if you want).
If this fixed the issue and your website is accessible – it means that the corrupt .htaccess file caused the problem.
Next, log in to your WordPress dashboard, and head to Settings section > Permalinks option, and click the Save Changes button.
This action will force WordPress to regenerate .htaccess file with default rewrite rules.
Permissions
All files and folders on your website have specific permissions, and if those aren’t correct – it can cause this type of error. Your best bet would be to contact your hosting provider to check permissions for you, but you can try doing this yourself if you feel up to it, it’s pretty easy to do.
Launch your File Manager. Double-click the public_html folder to enter it. Select any file or folder in the main window, and click the Permissions option in the top menu:
For files, you need to make sure they are readable and writeable by the User, readable by Group, and readable by World:
Click the Change Permissions button to save changes.
For folders, you need to make sure that the User has all permissions enabled, and Group and World are set to Read and Execute:
Click the Change Permissions button to save changes.