{"id":12969,"date":"2024-11-06T06:00:21","date_gmt":"2024-11-06T11:00:21","guid":{"rendered":"https:\/\/blog.litespeedtech.com\/?p=12969"},"modified":"2025-02-18T15:19:20","modified_gmt":"2025-02-18T20:19:20","slug":"disk-space-filling-up-fast-with-lscwp","status":"publish","type":"post","link":"https:\/\/blog.litespeedtech.com\/2024\/11\/06\/disk-space-filling-up-fast-with-lscwp\/","title":{"rendered":"Disk Space Filling up Fast with LSCWP"},"content":{"rendered":"
<\/p>\n
LiteSpeed Cache for WordPress provides a number of optimization tools, like CSS Combine<\/strong>, or JavaScript Combine<\/strong>. When you use these tools, the goal is to make your pages load faster. Sometimes, though, these tools cause your disk space to grow very quickly, and that can be a problem. If this is happening to you, the reason is probably a randomized string in your CSS or JavaScript code.<\/p>\n Why are random strings a problem? The presence of random strings causes a new combined file to be created for each page on your site. And if you\u2019ve got a separate mobile view, then there will be two<\/em> combined files created for each page in the site. For each additional cache vary on your site, another<\/em> set of combined files will be created.<\/p>\n As you can imagine, this is not ideal, and it has the potential to fill up your server\u2019s disk space very quickly.<\/p>\n To stop this behavior, you must exclude the randomized CSS or JavaScript from being combined. But first, you have to figure out where the random string is coming from.<\/p>\n To find a random string that is inline in your page\u2019s HTML, here\u2019s what you need to do:<\/p>\n Let\u2019s go through an example:<\/p>\n Finally, hover over the LiteSpeed icon on the WordPress Admin Bar and click Purge All<\/strong> in the drop down menu. This will clear the CSS and JavaScript page optimization files in the Prefer to see this topic in video form? Your wish is our command.<\/p>\nThe Problem With Randomized Strings<\/h2>\n
Finding the Random String<\/h2>\n
\n
An Example<\/h2>\n
\n
?LSCWP_CTRL=before_optm<\/code> string to the end of the URL. Like this:
https:\/\/example.com\/?LSCWP_CTRL=before_optm<\/code><\/li>\n
https:\/\/example.com\/<\/code><\/li>\n
abc_12345<\/code> and
abc_67890<\/code>, the common part is
abc_<\/code>) It will be something different for your own page, but it should be fairly easy to spot.<\/li>\n
wp-content\/litespeed<\/code> folder. After a short while the page optimization process will re-generate the files. Without any of the random strings, many fewer files will be generated, and you will see that it doesn\u2019t take up much disk space at all.<\/p>\n
Video<\/h2>\n