{"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":"

\"Disk<\/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

The Problem With Randomized Strings<\/h2>\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

Finding the Random String<\/h2>\n

To find a random string that is inline in your page\u2019s HTML, here\u2019s what you need to do:<\/p>\n

    \n
  1. View the page without any optimization, in two different<\/em> incognito browsers<\/li>\n
  2. View the page source from each browser and compare them<\/li>\n
  3. The only difference you should see is the random string itself. You can use that to determine which CSS or JavaScript should be excluded from optimization<\/li>\n<\/ol>\n

    An Example<\/h2>\n

    Let\u2019s go through an example:<\/p>\n