Home » WordPress 403 Forbidden Access: What To Do If It Happens To You

WordPress 403 Forbidden Access: What To Do If It Happens To You

403 Forbidden error
Spread the love
5 minutes read

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.

403 Forbidden
403 Forbidden Error

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.

WordPress 403 Forbidden Access Error

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.

Deactivate Plugins in WordPress

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.

403 Forbidden error-Diactivate Plugins manualy
Rename WordPress Plugin Folder

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
403 Forbidden error-file permitions
File Permissions Example

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

or

  • 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.

403 Forbidden error-folder permitions
File Permissions in FileZilla

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

403 Forbidden error-folder permitions
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

403 Forbidden error-File permitions
For WordPress File

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.

.htaccess File

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.

.htaccessfile
.htaccess File in WordPress

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.

Create .htaccess file
Create New .htaccess File

Then click the save changes button at the bottom of the page. Now you are good to go.

If you still get the error like in your images, Javascript or CSS, deactivate your CDN temporarily. And find out your problem solve. Otherwise, sometimes Hotlink Protection Is Misconfigured.

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.


Conclusion

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.

If you want to learn more, subscribe to our WordPress video tutorials on our YouTube Channel. Also, remember to follow us on Pinterest.

Leave a Reply

Your email address will not be published.