Support CSS @import




Wordpress LScache Plugin: Support CSS @import

Last Updated on: Wed, 15 Apr 2026 00:00:02
Hello, Im maintaining CSS files on another domain. Usually, I do @import in the themes style.css. However, LSC does not bypass and merge it into one file. Most other caching plugins do this. If I enqueue the styles via PHP it is also not being merged. Its being served from the other domain. Is there a workaround for this? Now I have to copy/paste the CSS files to each domain every time when I make changes. Looking forward to your reply. Hi @alusion, Please try the following steps: 1) Go to LiteSpeed Cache > Settings > CDN 2) Turn [ON] Enable CDN, add your original URL to CDN Mapping and turn off Include Images, Include CSS, Include JS if you are not using the CDN function. 3) Put all of your domain to Original URLs 4) Save Changes and Purge all cache, then you can see those minify/combine js/css. Thank you for the fast reply. However, it did not work. I wrote a workaround doing a filemtime() comparison, and if the file is newer it will be copied with copy(). Would be neat if LSC supports CSS @import though. Thank you! May I confirm @import is mean adding a row like @import: url(http://fonts.googleapis.com/css?family=Varela) on your themes style.css to use external CSS file, and you want to bypass and NOT merge it into one file when enable CSS minify/combine function on LiteSpeed Cache plugin? Sorry, I do want them to be merged. The situation is as follows: Domain 1: https://domain1.com/css/stylesheet1.css Domain 1: https://domain1.com/css/stylesheet2.css Domain 1: https://domain1.com/css/stylesheet3.css ? On domain 2 I use @import in the theme style.css. Domain2: @import url( https://domain1.com/css/stylesheet1.css&#8221 ) Domain2: @import url( https://domain1.com/css/stylesheet2.css&#8221 ) Domain2: @import url( https://domain1.com/css/stylesheet3.css&#8221 ) ? This way the CSS is not being imported, merged nor combined. The same goes for if I register & enqueue the CSS from domain 1 in domain 2 functions.php. Hopefully this is clearer, I should have explained it better. Thanks for the explanation and suggestion, currently we do not have this feature but we will add to our todo list, no ETA at this moment. Thanks for the clarification. Topic solved.



LiteCache Rush: Speed comes from using less, not from doing it faster



Reference