I was going to post this in the WP cache plugin forum, but I don't think it belongs there. This seems like a web server issue. We just spun up a new DirectAdmin/CloudLinux/Litespeed server and migrated a new Wordpress site over to it. Enabled the LS cache plugin on the site and everything works great. The ONLY issue we're having is that the CSS/JS files for the LS Cache Plugin are returning a 404. It's the weirdest thing. Other plugins in wp-content have CSS files and are loading without issue, but the LS Cache plugin CSS files are not. I have checked the server and the files are definitely there and should be accessible (Correct ownership/permissions)
Any thoughts?
Example CSS file that loads: https://rxbiolabs.com/wp-content/plugins/woo-gutenberg-products-block/build/style.css?ver=2.5.15
Example CSS that does not: https://rxbiolabs.com/wp-content/plugins/litespeed-cache/js/litespeed-cache-admin.js?ver=2.9.9.2
.htaccess
The LS Cache plugin CSS/JS files do not load, REGARDLESS of whether the plugin is enabled or not, so I don't think it's a rewrite rule causing the issue.
It's something specifically to do with the 'litespeed-cache' directory. If I create a new empty CSS file in wp-content/plugins, it loads fine in the browser. If I then move it into the litespeed-cache directory, it DOES NOT load.
I don't even know where to begin troubleshooting this.
Any thoughts?
Example CSS file that loads: https://rxbiolabs.com/wp-content/plugins/woo-gutenberg-products-block/build/style.css?ver=2.5.15
Example CSS that does not: https://rxbiolabs.com/wp-content/plugins/litespeed-cache/js/litespeed-cache-admin.js?ver=2.9.9.2
.htaccess
Code:
# BEGIN LSCACHE
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
<IfModule LiteSpeed>
RewriteEngine on
CacheLookup on
RewriteRule .* - [E=Cache-Control:no-autoflush]
RewriteRule ^min/\w+\.(css|js) - [E=cache-control:no-vary]
### marker CACHE RESOURCE start ###
RewriteRule wp-content/.*/[^/]*(responsive|css|js|dynamic|loader|fonts)\.php - [E=cache-control:max-age=3600]
### marker CACHE RESOURCE end ###
### marker FAVICON start ###
RewriteRule favicon\.ico$ - [E=cache-control:max-age=86400]
### marker FAVICON end ###
</IfModule>
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
# END LSCACHE
# BEGIN NON_LSCACHE
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
### marker BROWSER CACHE start ###
<IfModule mod_expires.c>
ExpiresActive on
ExpiresByType application/pdf A2592000
ExpiresByType image/x-icon A2592000
ExpiresByType image/vnd.microsoft.icon A2592000
ExpiresByType image/svg+xml A2592000
ExpiresByType image/jpg A2592000
ExpiresByType image/jpeg A2592000
ExpiresByType image/png A2592000
ExpiresByType image/gif A2592000
ExpiresByType image/webp A2592000
ExpiresByType video/ogg A2592000
ExpiresByType audio/ogg A2592000
ExpiresByType video/mp4 A2592000
ExpiresByType video/webm A2592000
ExpiresByType text/css A2592000
ExpiresByType text/javascript A2592000
ExpiresByType application/javascript A2592000
ExpiresByType application/x-javascript A2592000
ExpiresByType application/x-font-ttf A2592000
ExpiresByType application/x-font-woff A2592000
ExpiresByType application/font-woff A2592000
ExpiresByType application/font-woff2 A2592000
ExpiresByType application/vnd.ms-fontobject A2592000
ExpiresByType font/ttf A2592000
ExpiresByType font/woff A2592000
ExpiresByType font/woff2 A2592000
</IfModule>
### marker BROWSER CACHE end ###
### marker MINIFY start ###
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} ^(.*)/min/(\w+)\.(css|js)$
RewriteCond %1/wp-content/cache/$2/$1.$2 -f
RewriteRule min/(\w+)\.(css|js) wp-content/cache/$2/$1.$2 [L]
</IfModule>
### marker MINIFY end ###
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
# END NON_LSCACHE
# BEGIN WordPress
# The directives (lines) between `BEGIN WordPress` and `END WordPress` are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
It's something specifically to do with the 'litespeed-cache' directory. If I create a new empty CSS file in wp-content/plugins, it loads fine in the browser. If I then move it into the litespeed-cache directory, it DOES NOT load.
I don't even know where to begin troubleshooting this.