LiteSpeed

Manage LSCache storage and bulk cache actions with lscmctl (root guide)

Root guide to LiteSpeed cache storage on cPanel: where LSCache lives, cleaning disk usage, and using lscmctl to scan, enable, disable and flush WordPress caches in bulk.

AdvancedcPanel server with LiteSpeed (root)2 min read

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

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/null

Keep 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 status
  • scan finds WordPress installs on the server.
  • enable -m / disable -m mass-enables or disables the LiteSpeed Cache plugin on found installs.
  • Run lscmctl --help for 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.

Was this guide helpful?

Still stuck?

Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.