• Resolved menathor

    (@menathor)


    Hi guys

    I remember reading that we can set Litespeed Cache’s settings by defining constants in wp-config.php. Is that correct? And if so, do you have a link to the list of constants we can use?

    Thanks

Viewing 1 replies (of 1 total)
  • Plugin Support qtwrk

    (@qtwrk)

    Hi,

    list : https://github.com/litespeedtech/lscache_wp/blob/master/data/const.default.ini

    how to :

    
    if (strpos($_SERVER['REQUEST_URI'], "my-special-page") !== false)
    define( 'LITESPEED_CONF', true );
    define( 'LITESPEED_CONF__OPTM__CSS_MIN', false );
    }
    

    explanation:

    if (strpos($_SERVER['REQUEST_URI'], "my-special-page") !== false) you can do some condition check to make it only apply to check page pages or certain condition, in this case , it happens when page URI contains string my-special-page

    define( 'LITESPEED_CONF', true ); this one must be added

    define( 'LITESPEED_CONF__OPTM__CSS_MIN', false ); -> false means disable , so this set will disable CSS minify when conditional is meet

    here is the tricky part , in the .ini page , it comes optm-css_min = false

    you need to change a bit from optm-css_min to OPTM__CSS_MIN , where - changes to __ , and all comes to capital letter

    Best regards,

Viewing 1 replies (of 1 total)
  • The topic ‘Define settings in wp-config.php’ is closed to new replies.