Mass enable LScache

Hedloff

Well-Known Member
#1
Hello,

I just tried mass enable lscache trough WHM (LiteSpeed Admin).
It seem to work just fine, but noticed that the .htaccess file (backup) had the same content as the new .htaccess file:

/home/ttesting/public_html/wptest# cat .htaccess
<IfModule Litespeed>
CacheLookup public on
</IfModule>

<IfModule LiteSpeed>
RewriteEngine on
###LSCACHE START RESOURCE###
RewriteRule wp-content/.*/(loader|fonts)\.php - [E=cache-control:max-age=3600]
###LSCACHE END RESOURCE###
###LSCACHE START FAVICON###
RewriteRule favicon\.ico$ - [E=cache-control:max-age=86400]
###LSCACHE END FAVICON###
</IfModule>


# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wptest/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wptest/index.php [L]
</IfModule>

# END WordPress

root@\:/home/ttesting/public_html/wptest# cat .htaccess_lscachebak
<IfModule LiteSpeed>
RewriteEngine on
###LSCACHE START RESOURCE###
RewriteRule wp-content/.*/(loader|fonts)\.php - [E=cache-control:max-age=3600]
###LSCACHE END RESOURCE###
###LSCACHE START FAVICON###
RewriteRule favicon\.ico$ - [E=cache-control:max-age=86400]
###LSCACHE END FAVICON###
</IfModule>


# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wptest/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wptest/index.php [L]
</IfModule>

# END WordPress

Why? Bug?
 

Michael A

Administrator
Staff member
#2
Hello Hedloff,

Thanks for bringing this to our attention. We've changed how backups are created in both our WHM & WordPress cache plugins to avoid this, should be fixed in the next releases of both plugins.

Thanks,
-Michael
 

Hedloff

Well-Known Member
#3
Thanks :)

I tried removing the plugin from WHM aswell and that did remove the folders under wp-content and .htaccess files were updated but I suggest you remove everything and leave it as it was with only WordPress rewrite rules.

Here is the files after it was removed:


/home/ttesting/public_html/wptest# cat .htaccess
<IfModule Litespeed>
CacheLookup public off
</IfModule>

<IfModule LiteSpeed>
RewriteEngine on
</IfModule>


# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wptest/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wptest/index.php [L]
</IfModule>

# END WordPress

/home/ttesting/public_html/wptest# cat .htaccess_lscachebak
<IfModule Litespeed>
CacheLookup public on
</IfModule>

<IfModule LiteSpeed>
RewriteEngine on
</IfModule>


# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wptest/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wptest/index.php [L]
</IfModule>

I suggest you remove ifmodule litespeed. No need to have it in their file as the customers will ask questions about those 2 in the top?
 

Hedloff

Well-Known Member
#5
without "IfModule LiteSpeed", when server switch to apache, apache will complain.
it's for compatible with apache only.
There is no need for those lines if someone changes to Apache. I guess that there's not many who uses LS that often changes to Apache?
And then there would be issues with other scripts aswell.

CacheLookup public off could be an idea, but only for those server that has this standard "on". And I guess that there's no many just hosting WordPress on the same server and all using your cache plugin.
 

Hedloff

Well-Known Member
#6
Got more bugs for you!

I removed the plugin via WHM. After that I tried to enable it again, but it is failing with information:
/home/ttesting/public_html/wptest - LSCWP could not be enabled

I put a standard wordpress .htaccess file, but that didn't help either.
So I checked wp-content folder and there was created a file there with root perm:
-rw-r--r-- 1 root root 672 Aug 19 12:25 advanced-cache.php

But there was no plugin installed.
 

Hedloff

Well-Known Member
#7
Is it possible to get "domains" in a own table where we can manage lscache?
Today it's just the path:
Discovered WordPress Installations LSCWP Status Flag Actions
/home/ttesting/public_html/wptest

I would really like it if we could get it integrated into our customer pages. Maybee some API or something?
 

KevinFwu

Administrator
Staff member
#8
Got more bugs for you!

I removed the plugin via WHM. After that I tried to enable it again, but it is failing with information:
/home/ttesting/public_html/wptest - LSCWP could not be enabled

I put a standard wordpress .htaccess file, but that didn't help either.
So I checked wp-content folder and there was created a file there with root perm:
-rw-r--r-- 1 root root 672 Aug 19 12:25 advanced-cache.php

But there was no plugin installed.
Hi Hedloff,

Regarding this issue - is this reproduceable? We are unable to reproduce this problem internally, so there may be some weird things going on with this specific set up.

Could you send us the server error log and the cpanel vhost error log (if it exists)? Just send it to me via pm.
 

Hedloff

Well-Known Member
#9
Hi Hedloff,

Regarding this issue - is this reproduceable? We are unable to reproduce this problem internally, so there may be some weird things going on with this specific set up.

Could you send us the server error log and the cpanel vhost error log (if it exists)? Just send it to me via pm.
Yes, it should be.
I also tested installing on a new customer with a standard .htaccess file from WordPress, but got the same error message there.
I will see if I got the time to get you some information on this....
 

KevinFwu

Administrator
Staff member
#10
What does your set up look like?

We believe the default configurations are:

Doc root: /home/username/public_html/
WordPress Root: /home/username/public_html/wordpress/
.htaccess location: /home/username/public_html/wordpress/.htaccess
accessed via example.com/wordpress/

Is this correct?
 
Top