• Resolved Trelis

    (@ronantrelis)


    I’m getting a 403 error loading my style file:
    https://stagingpage.shop.mysite.com/wp-content/plugins/micropaymentsPaywall/assets/css/paywall-style.min.css?ver=6.2.2 403

    My folder structure is as follows:
    /micropaymentsPaywall
    |-- /assets
    | |-- /css
    | |-- paywall-style.css
    |-- micropaymentsPaywall.php


    and here is my code:

    function trelismpw_enqueue_styles() {
        wp_enqueue_style( 'paywall-style', esc_url(plugin_dir_url(__FILE__) . 'assets/css/paywall-style.css') );
    }
    
    add_action( 'wp_enqueue_scripts', 'trelismpw_enqueue_styles' );
Viewing 4 replies - 1 through 4 (of 4 total)
  • Please check that the correct file permissions were set for all the plugin files.

    Thread Starter Trelis

    (@ronantrelis)

    Thanks @metamezzo , yes I checked the permissions of the assets folder, the css folder and the individual css files and they are correct.

    The css files have: -rw-r–r– permission

    The folders have drwxr-xr-x permissions

    Moderator bcworkz

    (@bcworkz)

    If your file permissions appear to be correct, check any .htaccess files in the path for any directives that could result in a 403 response.

    Another possible reason for a 403 response is your server’s modSecurity configuration needs adjustment. You’ll likely need your host’s assistance with modSecurity configuration.

    Thread Starter Trelis

    (@ronantrelis)

    My .htcaccess file doesn’t have anything that would cause 403.

    I was testing on a staging site on Siteground though, and so I re-tested on production and didn’t have the issue, so it must have had something to do with that.

    I’ve reached out to siteground, thanks for the help, appreciated it. @bcworkz

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘403 error loading stylesheet’ is closed to new replies.