As a beginner in WordPress, sometimes, when you try to log in to WordPress admin, you may face an error in WordPress 403 Forbidden. This is the worst day most the WordPress beginners will get.
But this is an error that can easily get fixed after you read this article. Sometimes, depending on your hosting plan, you have to get help from them.
This post will show you what WordPress 403 Forbidden Access is, What causes it, and How to fix WordPress 403 Forbidden Access.
What is WordPress 403 Forbidden Access?
What is WordPress 403 Forbidden Access? This is also a common error in WordPress. 403 Forbidden access is an HTTP status code or message about an error that occurs on the WordPress website.
WordPress 403 Forbidden error look like this in the browser,
“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.”
There are various situations when you can see 403 Forbidden in WordPress
- When you install WordPress
- When you try to access the WordPress admin page,
- And also visiting some pages on your website.
Sometimes you may get an error like “Access to yourdomain.com was denied. You don’t have authorization to view this page.” Or only ‘Access Denied’. Those are also kind of 403 errors.
What causes WordPress 403 Forbidden Access?
This error happened because of a few potential reasons. The most probable one is faulty plugins or the bad configuration of your security plugins. Some security plugins think the range of IP addresses will be malicious, and it forces them to block. That’s why you should use some proper plugins for security, like Sucuri.
Not only that, problem with your .htaccess file. And also incorrect file permissions on the server. So how to fix this error?
How to fix WordPress 403 Forbidden Access?
Let’s find out a few ways to fix this error in WordPress. As usual, you should make a backup of your website. It is safe. If something goes wrong, you can restore your site.
Our recommended plugin for this is UpdraftPlus Backup/Restore. If you want to know how to do backup please read How to Backup Your WordPress Website? Updraft Installation.
Deactivate Your Plugins
The most probable one is faulty plugins or the loosly configuration of your security plugins. So to find out the faulty plugin, you should deactivate all of your plugins and activate them one by one.
If you can access your WordPress dashboard, go to the plugin area and temporarily deactivate all the plugins. If this solves the WordPress 403 Forbidden error, that means a problem with one of your plugins.
To find out which plugin is causing the problem, activate your plugins one by one until you get the 403 Forbidden error.
But in some cases, you cannot access the WordPress dashboard either. So, go to your file manager in cPannel or use an FTP program like FileZilla to connect your server.
Go to the “wp-content” folder in the “root” folder. Open the “wp-content” folder and rename the “plugins” folder to any name. Example “Plugins_old”. Once you have done that, check whether your error is gone or not.
If that fixes the 403 Forbidden error, find out the glitchy plugin.
To find out which one it is, go to the “wp-content” folder and rename the “Plugins_old” folder back to “plugins”. Then go to the WordPress dashboard and activate plugins one by one. Once you identify a glitch plugin, either remove it or contact plugin support.
incorrect file permissions
File permissions mean who can read, write or execute files and folders in your WordPress server. These indicate by 3 digit numbers as sow in the below picture.
- 0 – No access
- 1 – Execute
- 2 – Write
- 4 – Read
Recommended permission in WordPress site as follows
- wp-admin: 755
- wp-content: 755
- wp-content/themes: 755
- wp-content/plugins: 755
- wp-content/uploads: 755
- Files – 644 or 640
- Directories – 755 or 750
Note: wp-config.php file should be 440 or 400.
To change you should go to your file manager in cPannel or use an FTP program like FileZilla to connect your server. If you want to see file or folder permissions, just right-click on it.
But doing manually one by one is a headache. So we can do it automatically by right click on the folder containing the WordPress site. Click on File Attributes.
File permissions for WordPress directories
In the Numeric value box, enter 750 or 755. Tick on Recurse into subdirectories and select the check box in Apply to directories only.
File permissions for WordPress files
In the Numeric value box, enter 640 or 644. Tick on Recurse into subdirectories and select the check box in Apply to files only
Note: wp-config.php file should be 440 or 400, and you have to do it manually.
If this does not solve the WordPress 403 Forbidden error, follow the next step.
If your host uses Apache web server most of the time, 403 Forbidden error happened because of your .htaccess file. This is the file used Apache server to store basic configuration. So most of the time, what we do is regenerate a new clean .htaccess file rather than change or edit the .htaccess file.
You can find out .htaccess file in your root folder. Before starting to do anything, just backup your .htaccess file to a local folder. Next, delete your .htaccess file and try to access your WordPress site. If the .htaccess file was the issue, now you don’t get the WordPress 403 Forbidden error.
Let’s go and create a new .htaccess file. To do that in your WordPress dashboard, go to Settings → Permalinks.
Then click the save changes button at the bottom of the page. Now you are good to go.
None of the above answers not helpful for you and, if you are still getting WordPress 403 Forbidden error, we recommend contacting your hosting provider for further assistance.
That’s it, we hope you learned everything about the WordPress 403 Forbidden Access. Also, you know how to solve this problem on your own.