Wordpress LScache Plugin: Change Combined CSS Filename to Break Browser Cache
Last Updated on: Wed, 15 Apr 2026 00:00:02 I have made updates to the CSS of my theme. As my site is set to cache the CSS in the browser for a long time, I need some sort of cache breaker to ensure my users get the update. However, I have been unable to get lscache to update the CSS filename for the combined CSS. Ive updated the template version number, which would change the querystring in the default WordPress CSS filename, but this seems to have no effect on the litespeed combined file. I cleared the litespeed cache, which did update the CSS file contents, but the name is the same, so it wont override the browsers cached copy. For now, I turned off the CSS combine option to get around it. (Though I did make a minor CSS change after that, so some users may have the same issue with the minified-but-not-combined version.) How can I get litespeed to update the filename or otherwise override the cached copy of the file in the users browser? Thanks! The page I need help with: https://www.bradbrownmagic.com Query string will be stripped when generating combined CSS name. Please try to rename your css filename in this case. wrong answer , removed? Doesnt WordPress require my main template CSS file be named style.css? Im probably missing something, but it sounds like youre telling I have to either never update my existing themes CSS, or not use Litespeed with WordPress. That doesnt sound ideal. When you are still tweaking the GUI of your site, it is not a good idea to keep Browser Cache option ON. In previous versions v2.4-, we do include query string when generating the minified file. However, that makes css cache folder grown rapidly when you have lots of plugins because the updates of each plugin will change the combined filename. This is the reason we dropped query string. Please consider only use CSS optimization options after you finalized the custom css. So you really are telling me that since my live site has used your CSS optimizations and follows best-practices of using far future expire times for static content, that I can never ever at any time for any reason make a fix to my CSS ever again without causing issues for existing users. Thats not a compromise Im wiling to make. I guess Ill have to stop using your css/js optimization tools entirely. Not the answer I wanted, but thanks for the information and prompt replies. We got couple reports about the issue that the CSS cache folder is too large. One of them got 43GB in couple days. After debug we found its because their themes/plugins generated a timestamp query string like .css?v=timestamp_number and increased that timestamp number very often. We can record the timestamp when you do a purge css/purge all, and later use that timestamp to generate the CSS filename. This way the file name can be changed and wont trigger the issue I mentioned above. Thanks. Its done in https://github.com/litespeedtech/lscache_wp/commit/e516af910d29b0f0bb1d9d6030f95d020cead1de Will be included in next release. If you have any concerns please let us know. Thanks.
LiteCache Rush: Speed comes from using less, not from doing it faster
Reference