On a busy LiteSpeed server, cached pages for hundreds of sites add up to many gigabytes. As root you decide where the cache lives, keep it from filling disks, and use LiteSpeed's command-line cache manager lscmctl to manage WordPress caches across all accounts.
MdmHost manages this on its hosting plans. This guide is for administrators of their own cPanel server with root access.
Before you start
- LiteSpeed Enterprise installed (see installing LiteSpeed).
- The cache storage path configured (see server cache settings).
Where the cache lives
LSCache stores each user's cached pages in a per-user directory under the storage path set in WebAdmin, for example /home/lscache/, or inside each user's home directory, depending on configuration. Check the size:
du -sh /home/lscache/ 2>/dev/nullKeep disk usage under control
- LiteSpeed removes expired cache files automatically through its cache cleaner.
- Put the storage path on a partition with free space, not a small root partition.
- Very large caches usually mean long TTLs combined with many URL variations (query strings, tracking parameters). Advise customers to drop tracking query strings in LiteSpeed Cache settings.
lscmctl: bulk WordPress cache management
The lscmctl tool ships with the LiteSpeed cPanel plugin, usually at /usr/local/lsws/admin/misc/lscmctl. Common commands:
/usr/local/lsws/admin/misc/lscmctl scan
/usr/local/lsws/admin/misc/lscmctl enable -m
/usr/local/lsws/admin/misc/lscmctl disable -m
/usr/local/lsws/admin/misc/lscmctl statusscanfinds WordPress installs on the server.enable -m/disable -mmass-enables or disables the LiteSpeed Cache plugin on found installs.- Run
lscmctl --helpfor flush and per-path options on your version.
Warning: Mass-enabling caching changes customer sites. Announce it first and exclude sites that opt out; some dynamic sites need custom exclusions.
WHM interface
The same actions are available in WHM → Plugins → LiteSpeed Web Server → LiteSpeed Cache Management. Users manage their own sites in cPanel (see LiteSpeed Web Cache Manager).
Flushing everything
After a server-level change that affects all sites, such as a PHP default change, you can clear all cached pages by removing the cache storage contents during a quiet period. Sites rebuild their cache on the next visits, which briefly increases PHP load.
Troubleshooting
Cache directory keeps growing
Check that the cache cleaner runs and look for one account with huge numbers of variations.
lscmctl reports errors for some installs
Those installs are flagged, often due to permissions or unusual wp-config.php locations. Users can enable the plugin manually.
Frequently asked questions
Does cached data count towards customer disk quotas?
It depends on where the cache is stored. A central storage path outside home directories does not count against users.
Is clearing the cache safe?
Yes. Cached pages are copies; the next visit regenerates them.
Can I schedule bulk scans?
Yes, a weekly cron job running lscmctl scan keeps the list of WordPress installs current.
How do I know lscmctl's path?
Run find /usr/local/lsws -name lscmctl. The location can differ slightly between plugin versions.
