Here’s a comprehensive guide on LiteSpeed LSCache Management via lscmctl
for managing LSCache across cPanel/WHM or general LiteSpeed server environments:
LiteSpeed provides a powerful command-line tool called lscmctl
(LSCache Manager Control) to detect, enable, disable, and manage LSCache support across various web applications (WordPress, Joomla, Magento, etc).
The tool is located at:
/usr/local/lsws/admin/misc/lscmctl
🔍 Scan for Installations
1. Scan All Known Installations
/usr/local/lsws/admin/misc/lscmctl scan
- Performs a full scan to detect all CMS installations (new and existing).
2. Scan for New Installations Only
/usr/local/lsws/admin/misc/lscmctl scan -n
- Scans for only new CMS installations not previously detected.
3. Scan for New Installations and Enable LSCache
/usr/local/lsws/admin/misc/lscmctl scan -n -e
- Detects new installations and enables LSCache automatically for them.
✅ Enable or Disable LSCache
4. Enable LSCache for All Detected Installations
/usr/local/lsws/admin/misc/lscmctl enable -m
- Enables LSCache (where supported) for all previously discovered CMS installations.
5. Disable LSCache for All Installations
/usr/local/lsws/admin/misc/lscmctl disable -m
- Disables LSCache for all CMS platforms detected.
⚐ Flag or Unflag Installations
6. Flag All Detected Installations
/usr/local/lsws/admin/misc/lscmctl flag
- Marks all installations as reviewed (can be used for internal tracking).
7. Unflag All Installations
/usr/local/lsws/admin/misc/lscmctl unflag
- Removes the “flagged” state from all installations.
📊 View LSCache Status
8. Check Status of LSCache
/usr/local/lsws/admin/misc/lscmctl status
- Shows current LSCache status for each CMS installation.
🔄 Update LSCache Manager
9. Set to Use the Latest Version
/usr/local/lsws/admin/misc/lscmctl setversion --latest
10. Upgrade LSCache Manager to Latest
/usr/local/lsws/admin/misc/lscmctl upgrade --latest
⏲️ Set Up Automatic Scan via Cron
To scan for new installations daily and enable LSCache on them automatically, you can add the following line to root’s crontab:
00 03 * * * /usr/local/lsws/admin/misc/lscmctl scan -n -e
- Runs every day at 3:00 AM
💡 Example Use Cases
Discover all installations:
/usr/local/lsws/admin/misc/lscmctl scan
Discover new installations only:
/usr/local/lsws/admin/misc/lscmctl scan -n
Discover new installations and enable LSCache:
/usr/local/lsws/admin/misc/lscmctl scan -n -e