Support » Plugin: Autoptimize » Failed to load resource 403 error

  • Resolved taisa1984

    (@taisa1984)


    Hi!

    From some time ago, around the WordPress 5.4 update, I am having problems in one of my sites. The css doesn’t load at all, it gives a “Failed to load resource: the server responded with a status of 403” error on the console.

    Here the errors:
    https://imgur.com/30dYWKv

    Here how the website sees whith Css and Js optimization and minimization (no other checks on cs or js): https://imgur.com/wfD43sF

    I also have cloudflare. But I use it also on other sites without problem.

    I have all themes and plugins updated.

    I hope that you can help me so I can activate those options again to optimize my site.

    Thanks!

    Taisa

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    a 403 error is “forbidden”, meaning your webserver is configured not to allow files in wp-content/cache/autoptimize being accessed from the outside Taisa. You’ll have to check directory permission in wp-content/cache (and deeper) to allow the webserver access to those directories & files. If need be raise a ticket at your host to check/ set the permissions for you.

    hope this helps,
    frank

    Hi!

    I had now the time to look into this.

    I reviewed with Filezilla the permissions on “wp-conten/cache” folder and applied 775 for folders, and 664 for files, recursively, as stated on the WordPress guide: https://wordpress.org/support/article/changing-file-permissions/

    And it stays the same.

    I looked too for the file that returns the error, and it isn’t there.

    Here the file not found on the console error:
    https://imgur.com/U6csCPM
    Here the folder at Ftp:
    https://imgur.com/a/aaTx5Sn

    I also have a staging site, but the problem doesn’t appear there.

    What else should I check?

    Thanks

    Taisa

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    Maybe simply try removing wp-content/cache/autoptimize in Filezilla, which will allow Autoptimize to re-create it?

    I just tried, and no, it didn’t solve the problem. I checked and the plugin created the folder again.

    I also verified, and the files indeed are on the folder, and with the same name. The permissions seem ok too both for folders and files.

    Here the screenshots: https://imgur.com/a/QsEZvzb

    I don’t know if it can be caused by other plugin or what. For now, I changed this site to use other minification plugin and it worked. It is strange because I use the same plugins on other sites and I have no problems.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    aha, just noticed you have “serve as static files” unticked, can you (re-)activate that Taisa ?

    I will take a look again when I have the time. Thanks.

    Boom! Thanks Frank, this worked for me – I had this exact same problem last night carrying through today and couldn’t work out what the hell was going on. My performance score increased though since there was zero styling being applied 😉

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    always happy to help Michael 😉

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.