How to flush cache for my virtual host?

#1
I am running Open Litespeed 1.7.16 with 6 web sites, all of them are Wordpress. How can I flush the cache for all sites?? or better flush them one by one. thanks for your help.
 

Cold-Egg

Administrator
#2
You should let LSCWP control the cache purge, any reason why you want to purge the cache for all sites? You can manually delete the cache files under the cache folder if you want.
 

LiteCache

Active Member
#3
I am running Open Litespeed 1.7.16 with 6 web sites, all of them are Wordpress. How can I flush the cache for all sites?? or better flush them one by one. thanks for your help.
If you don't want to call up every LSCWP installation to purge the cache, there is also a quick and native solution for this. Note, however, that the following solution, like deleting the cache via LSCWP, does not delete the cache files.

Empty /lscache dir
Code:
rm -Rf /lscache
Purge cache by account
1. Create an empty php file with name of your choice and place it in the root of WP
2. Copy the code from bellow in this PHP file

PHP:
<?php
$tag = __DIR__ . '/wp-content/plugins/litespeed-cache/';
$tag = substr(md5($tag), -3) . '_';

if (isset($_GET['action']) && ($_GET['action'] == $tag)) {
    header("X-LiteSpeed-Purge:" . $tag);
}else{
    exit;
}
Run it in browser like:
Code:
https://www.domain.com/purge.php?action=[$tag]
That's it.

FYI: This method is faster than method of LSCWP.
 
#4
@bayardo.rivas remember:
- purge only set cache like expired, not delete cache files
- if you want flush (clear/delete all cache files) then you must manually delete cache files from lscache folders

lscache delete expired cache files only after expiration time sets in settings
 
#5
You should let LSCWP control the cache purge, any reason why you want to purge the cache for all sites? You can manually delete the cache files under the cache folder if you want.
Thanks for your time. Some of the sites are into a development process and clear cache is needed to see inmediatly if changes are applied. For that reason I also said that it's better if I can clear cache one site by site. I dont have access to WordPress admin so I was trying to find a way to do it from ssh terminal.

I think wp-cli is doing the job with this commands:

wp cache flush
wp litespeed-purge all
 
Top