Title: Empty css and javascript files
Last modified: January 15, 2025

---

# Empty css and javascript files

 *  Resolved [yydevelopment](https://wordpress.org/support/users/yydevelopment/)
 * (@yydevelopment)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/empty-css-and-javascript-files/)
 * Hi there,
 * It seems like you save the compressed/combined files on /wp-content/litespeed/
   css or /wp-content/litespeed/js.
 * I have noticed there are many time you save empy file and that file break the
   code.
 * I have about 40 sites so i created a cron that test and notify me if there are
   empty files there and it happen a lot.
 * Can you detect if the file is empty and you create it and if it empty recreate
   it?
 * The empty files cause problem and make the page show without design.

Viewing 14 replies - 1 through 14 (of 14 total)

 *  Plugin Support [litetim](https://wordpress.org/support/users/litetim/)
 * (@litetim)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/empty-css-and-javascript-files/#post-18244862)
 * Hello [@yydevelopment](https://wordpress.org/support/users/yydevelopment/) 
   Can
   you test if original JS/CSS files are correct?From what I see empty files would
   happen if there is a error in files.
 *  Thread Starter [yydevelopment](https://wordpress.org/support/users/yydevelopment/)
 * (@yydevelopment)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/empty-css-and-javascript-files/#post-18244875)
 * Most of the files are not empty but let say out of 10 one is empty and that mean
   there is a page that won’t load correctly.
 * There should be some kind of safe check to detect if the files are empty. At 
   the moment, as far as I know, there are no PHP errors indicating the problem,
   but it happens a lot when it’s tested on 40 websites.
 *  Plugin Support [litetim](https://wordpress.org/support/users/litetim/)
 * (@litetim)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/empty-css-and-javascript-files/#post-18244918)
 * Ok
   I will look into this issue and try to add a fix.The fix will only be added
   in next major version of plugin. This version will come soon 🙂Thank you for 
   the report and I will keep you up to date with the progress.
 *  Plugin Support [litetim](https://wordpress.org/support/users/litetim/)
 * (@litetim)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/empty-css-and-javascript-files/#post-18248720)
 * [@yydevelopment](https://wordpress.org/support/users/yydevelopment/) 
   I tested
   a few scenarios that makes sense here. Tested both with CSS minify combine, and
   both ON.Tests:– changed a css that is correct to contain an error– removed a 
   css file that is enqueued I was not able to reproduce the error.Let’s start reproducing
   the issue.Can you help me with ideeas how to test?Please share a report number?
   This can be generated from LSC => Toolbox => Reports => and click on “Send to
   Litespeed”.Thank you!
 *  Thread Starter [yydevelopment](https://wordpress.org/support/users/yydevelopment/)
 * (@yydevelopment)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/empty-css-and-javascript-files/#post-18248733)
 * Hi sure, i have one from today but the downside is that that is not lightspeed
   serverif that make any changes (but it happen a lot of litespeed server i have
   as well)?
 * The log number is:** **YVRHUYBY
 * Looking now at my logs it seems like most empty files are javascript and not 
   css. Is that something that also might cause problem or just css?
 * This is the file that was created empty:
 * [4] => Array
   ([name] => 8845a2429508153631ebd96e6260947a.css[size_in_kb] => 0[
   path] => /home/fuchs-design_co_il/htdocs/[http://www.fuchs-design.co.il/wp-content/litespeed/css//8845a2429508153631ebd96e6260947a.css](http://www.fuchs-design.co.il/wp-content/litespeed/css//8845a2429508153631ebd96e6260947a.css))
 * Hope that helps,
 *  Thread Starter [yydevelopment](https://wordpress.org/support/users/yydevelopment/)
 * (@yydevelopment)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/empty-css-and-javascript-files/#post-18248743)
 * In addition to my last message i was able to find you another on litespeed server
 * The report number was **WMKYSMEY**
 * And this is the file that was created
 * [1] => Array
   ([name] => 8845a2429508153631ebd96e6260947a.css[size_in_kb] => 0[
   path] => /home/yydevel1/my-websites/[kweb.co.il/wp-content/litespeed/css//8845a2429508153631ebd96e6260947a.css](http://kweb.co.il/wp-content/litespeed/css//8845a2429508153631ebd96e6260947a.css))
 *  Plugin Support [litetim](https://wordpress.org/support/users/litetim/)
 * (@litetim)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/empty-css-and-javascript-files/#post-18250390)
 * Tested the link: [kweb.co.il/wp-content/litespeed/css//8845a2429508153631ebd96e6260947a.css](http://kweb.co.il/wp-content/litespeed/css//8845a2429508153631ebd96e6260947a.css)
   and is not empty.
   Try turning off CSS minify and combine(in this order, each 
   one by one), clear cache and test the site.Keep me updated.
 *  Thread Starter [yydevelopment](https://wordpress.org/support/users/yydevelopment/)
 * (@yydevelopment)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/empty-css-and-javascript-files/#post-18250396)
 * I goes on random on 40 sites so it’s a bit of a problem to update all.
 * The script not empty because i have created a cron that check if there are empty
   css file and if there is it clear cache to fix the problem.
 * I thought it’s some simple that you just check the css before creating the file
   but if it’s more complex never mind let’s leave it like this i will just keep
   using my cron as it’s working for me.
    -  This reply was modified 1 year, 4 months ago by [yydevelopment](https://wordpress.org/support/users/yydevelopment/).
 *  Plugin Support [litetim](https://wordpress.org/support/users/litetim/)
 * (@litetim)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/empty-css-and-javascript-files/#post-18250408)
 * The double `/` is from your script, yes?
 *  Thread Starter [yydevelopment](https://wordpress.org/support/users/yydevelopment/)
 * (@yydevelopment)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/empty-css-and-javascript-files/#post-18250429)
 * Yes it is probably coming from my script
 *  Plugin Support [litetim](https://wordpress.org/support/users/litetim/)
 * (@litetim)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/empty-css-and-javascript-files/#post-18250440)
 * OK, I will look into a general fix. I wanted to debug the issue with you, having
   the problem on multiple servers(and different types).
 *  Plugin Support [litetim](https://wordpress.org/support/users/litetim/)
 * (@litetim)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/empty-css-and-javascript-files/#post-18250457)
 * I looked over the future version of plugin( V7 ) and we added a condition for
   empty returned content. I will come back at that time and test together.
 *  Thread Starter [yydevelopment](https://wordpress.org/support/users/yydevelopment/)
 * (@yydevelopment)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/empty-css-and-javascript-files/#post-18250485)
 * Thank you, once you push it i will be happy to test it and inform you if i kepp
   getting empty files error.
 * By the way is your fix also work for .js files? i was getting js errors as well
   for empty files and i remove the alert for js and only left it for css.
 * So if you can add the fix for the js file it would be great as well.
 *  Plugin Support [litetim](https://wordpress.org/support/users/litetim/)
 * (@litetim)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/empty-css-and-javascript-files/#post-18250501)
 * Yes, both CSS and JS

Viewing 14 replies - 1 through 14 (of 14 total)

The topic ‘Empty css and javascript files’ is closed to new replies.

 * ![](https://ps.w.org/litespeed-cache/assets/icon-256x256.png?rev=2554181)
 * [LiteSpeed Cache](https://wordpress.org/plugins/litespeed-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/litespeed-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/litespeed-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/litespeed-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/litespeed-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/litespeed-cache/reviews/)

 * 14 replies
 * 2 participants
 * Last reply from: [litetim](https://wordpress.org/support/users/litetim/)
 * Last activity: [1 year, 4 months ago](https://wordpress.org/support/topic/empty-css-and-javascript-files/#post-18250501)
 * Status: resolved