Question

Getting a "Forbidden You don't have permission to access this resource" after installing a plugin.

I installed a plugin on my website yesterday and it was working fine yesterday but today I’m getting a following error whenever I try to access that plugin on the WordPress dashboard. I tried restarting my Apache server but it was of no help. I also checked file permission for that specific file and it was 755, so not sure what exactly went wrong. I checked other plugins and as well as the front end but everything else is working fine. If you guys have any solutions then please do help me? Thanks!

# Forbidden

You don't have permission to access this resource.

---

Apache/2.4.29 (Ubuntu) Server at website.com Port 80

Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

KFSys
Site Moderator
Site Moderator badge
September 25, 2023

Heya,

A Forbidden error, usually a 403 error, indicates that the server understands the request, but it refuses to authorize it. Here are several steps you can take to troubleshoot and potentially resolve the issue:

1. Check Error Logs

Review the Apache and PHP error logs for any additional information about why the request is being forbidden. You can typically find Apache error logs at /var/log/apache2/error.log and PHP error logs in a location specified in your php.ini file.

sudo cat /var/log/apache2/error.log

2. Review .htaccess File

Inspect the .htaccess file located in the root directory of your WordPress installation for any incorrect or conflicting configurations, such as improper rewrite rules or incorrect Deny/Allow directives.

3. Deactivate the Plugin

Try deactivating the plugin causing the issue and then reactivating it. This can sometimes resolve conflicts between plugins.

4. Plugin File Permissions

You mentioned you checked the file permissions, but also check the ownership of the plugin’s directory and files. They should be owned by the web server user, typically www-data for Apache on Ubuntu.

sudo chown -R www-data:www-data /path/to/plugin-directory

5. Disable Security Plugins

If you have any security plugins active, try disabling them temporarily to see if they are blocking access to the plugin. Sometimes, security plugins can block access to certain resources due to false positives.

6. Check Plugin’s Configuration

Some plugins have their configuration settings, which might restrict access to certain user roles or IP addresses. Review the plugin’s settings to ensure there aren’t any configurations causing the Forbidden error.

7. Plugin Conflict

Deactivate all other plugins and try accessing the problematic plugin. If it works, reactivate the other plugins one by one to identify if there is a conflict with another plugin.

8. Update WordPress Core and Plugins

Ensure that WordPress, as well as all other plugins and themes, are updated to their latest versions.

9. Reinstall the Plugin

Uninstall and then reinstall the plugin. There might be a corrupted file causing the issue.

10. Firewall or Security Modules

Check if any firewall or security modules like mod_security on your server are blocking the request and configure them accordingly.

11. Contact Plugin Developer

If the above steps do not resolve the issue, get in touch with the plugin developer and provide them with all the details, including any relevant error logs, to get assistance.

Hi there,

What is the name of the plugin that you installed yesterday?

The error you’re seeing is an HTTP 403 error, which indicates a permissions or deny rules issue.

What I could suggest here is:

  1. Check your .htaccess rules:

    The .htaccess file (located in the root directory of your WordPress installation) can contain directives that might block access to certain resources. Check its contents and ensure there’s nothing blocking access to the plugin or any of its resources.

    If you’re unsure about the rules, you can temporarily rename the .htaccess file to something like .htaccess_backup and see if the issue persists. Remember to change it back after testing.

  2. Plugin Conflicts:

    Sometimes, other plugins can interfere with the operation of a newly installed plugin. Try deactivating other plugins one by one and see if the issue resolves. This will help you identify if there’s a conflict.

  3. Check Error Logs:

    Both Apache and WordPress can provide logs that might give more detailed information about the nature of the error.

    • For Apache: The error log location might vary based on your configuration, but a common location on Ubuntu is /var/log/apache2/error.log.

    • For WordPress: Check the debug.log file if debugging is enabled. If not, add these lines to the wp-config.php file to enable logging:

      define( 'WP_DEBUG', true );
      define( 'WP_DEBUG_LOG', true );
      define( 'WP_DEBUG_DISPLAY', false );
      
  4. Reinstall the Plugin:

    As a last resort, you can try deactivating and deleting the plugin, and then reinstalling it. This might clear any corrupted configurations or files.

Let me know how it goes!

Best,

Bobby

alexdo
Site Moderator
Site Moderator badge
September 24, 2023

Hello @mohitpandeyshark

The error message you’re encountering, “Forbidden - You don’t have permission to access this resource,” typically indicates that there’s an issue with file or directory permissions on your server, or there may be a configuration problem with your Apache server. Since the plugin was working fine yesterday, it’s possible that a recent change or update caused this issue.

Here are some steps to troubleshoot and resolve the problem:

  • If you suspect that the issue is related to the specific plugin you installed, try disabling it. You can do this by accessing your WordPress database via phpMyAdmin or using the WP-CLI tool if you have command-line access to your server. Disable the plugin by changing its status in the wp_options table. Set the active_plugins option to an empty array to disable all plugins temporarily. You can also rename the plugin folder in the wp-content/plugins directory, this should also do the trick and disable the plugin for you. After disabling the plugins, check if the issue is resolved. If it is, you can try enabling your plugins one by one to identify which one is causing the problem.

  • Ensure that the file and directory permissions are set correctly. You mentioned that the file had permissions of 755, which is generally fine for files, but directories should typically be set to 755, and files to 644.

  • Check the Apache error logs (usually located in /var/log/apache2/error.log) for more detailed information about the issue. The logs may provide clues as to why you’re encountering a “Forbidden” error.

  • Plugin Updates: Ensure that the plugin is up to date. Outdated plugins can sometimes cause compatibility issues with newer versions of WordPress or other plugins.

  • Security Plugins: If you have a security plugin installed, it might be blocking access. Double-check the settings of any security plugins you have installed to see if they are blocking the plugin.

Hope that this helps!

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel