• Resolved Graeme

    (@imgraeme)


    When the “Lock and Protect System Folders” setting is enabled, it appears to cause an error loading a file from the LiteSpeed Cache plugin folder.

    The error:
    /wp-content/plugins/litespeed-cache/guest.vary.php 403 (Forbidden)

    Disabling the settings sees the error go away. Could possibly happen if the settings alter the directory path to these folders or similar maybe? What exactly is the setting modifying?

    I did also notice with the setting turned on, the mobile site header has display issues. I haven’t looked into that; could be related to the caching maybe. Not the topic of this post so I’ll leave that for now.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support kuzmanstoyanov

    (@kuzmanstoyanov)

    Hello @imgraeme,

    “Lock and Protect System Folders” is protecting the site against unauthorized executions to PHP scripts inside wp-includes/ and wp-content/ folders.

    If this feature is interfering with the functionality of a plugin, you can use exclusion filters to whitelist a script. Here’s how you can do this in your specific case:

    1. Disable “Lock and Protect System Folders”
    2. Add the following filter in the functions.php file of your active theme:
    add_filter( 'sgs_whitelist_wp_content' , 'whitelist_file_in_wp_content' );
    function whitelist_file_in_wp_content( $whitelist ) {
    
    $whitelist[] = 'guest.vary.php';
    
    return $whitelist;
    }
    1. Enable “Lock and Protect System Folders”

    Please note that it’s important to disable and then re-enable the feature in order to apply the whitelisting rule effectively.

    Best Regards,
    Kuzman Stoyanov

    Thread Starter Graeme

    (@imgraeme)

    Thanks Kuzman. I wondered if there was documentation somewhere!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Protect System Folders causing LiteSpeed browser error’ is closed to new replies.