Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
litespeed_wiki:cpanel:cli-lscwp-management [2019/04/19 20:15] Michael Alegre [Command-Line Interface - LiteSpeed Cache For WordPress Management] |
litespeed_wiki:cpanel:cli-lscwp-management [2019/07/01 18:07] Michael Alegre |
||
---|---|---|---|
Line 3: | Line 3: | ||
As of LiteSpeed Enterprise 5.1.14, a command-line interface script was added under ''/usr/local/lsws/admin/misc/lscmctl'' for executing basic cache management actions through the terminal or in a cron job. As of versions 1.4 of the script, the ability to recommend a plugin or broadcast a message to all discovered WordPress installations is also available. The help page for this script is included below. | As of LiteSpeed Enterprise 5.1.14, a command-line interface script was added under ''/usr/local/lsws/admin/misc/lscmctl'' for executing basic cache management actions through the terminal or in a cron job. As of versions 1.4 of the script, the ability to recommend a plugin or broadcast a message to all discovered WordPress installations is also available. The help page for this script is included below. | ||
+ | |||
+ | **Supported Control Panel Environments:** cPanel/WHM and Plesk | ||
[[https://blog.litespeedtech.com/2017/06/28/wpw-autodiscovery-lscache-and-the-command-line/|Learn more about the CLI script on our blog.]] | [[https://blog.litespeedtech.com/2017/06/28/wpw-autodiscovery-lscache-and-the-command-line/|Learn more about the CLI script on our blog.]] | ||
Line 9: | Line 11: | ||
<code> | <code> | ||
- | LiteSpeed Cache Manager CLI Tool v1.4 | + | LiteSpeed Cache Manager CLI Tool v1.4 |
- | | + | |
- | | + | |
- | Usage: ./lscmctl [-php path/to/php] command [flag/parameter] | + | Usage: ./lscmctl [-php path/to/php] command [flag/parameter] |
- | | + | |
- | | + | |
- | Possible Commands: | + | Possible Commands: |
- | | + | |
- | setcacheroot [-svr <cache root>] [-vh <cache root>] | + | setcacheroot [-svr <cache root>] [-vh <cache root>] |
- | List/Set server and/or virtual host cache roots. This command will list the | + | List/Set server and/or virtual host cache roots. This command will list the |
- | current server and virtual host cache roots when no additional input is given. | + | current server and virtual host cache roots when no additional input is given. |
- | Use -svr and -vh to set those cache roots. The '$' character is not allowed | + | Use -svr and -vh to set those cache roots. The '$' character is not allowed |
- | when setting virtual host cache root. Virtual host cache root values starting | + | when setting virtual host cache root. Virtual host cache root values starting |
- | with a '/' will automatically have '/$vh_user' appended to the end (this format | + | with a '/' will automatically have '/$vh_user' appended to the end (this format |
- | was chosen to maintain compatibility with CageFS). | + | was chosen to maintain compatibility with CageFS). |
- | | + | |
- | setversion [{--list | --latest | <version>}] | + | setversion [{--list | --latest | <version>}] |
- | List/Set active LSCWP version. This command will list the currently active | + | List/Set active LSCWP version. This command will list the currently active |
- | version when no additional input is given. Use --list to show available | + | version when no additional input is given. Use --list to show available |
- | versions or --latest to switch to the latest available version. A valid version | + | versions or --latest to switch to the latest available version. A valid version |
- | number can also be provided to switch to that version specifically. This must | + | number can also be provided to switch to that version specifically. This must |
- | be set before performing other lscmctl operations. | + | be set before performing other lscmctl operations. |
- | | + | |
- | scan [-n] [-e] | + | scan [-n] [-e] |
Scan for all WordPress installations. This command will create an lscm.data | Scan for all WordPress installations. This command will create an lscm.data | ||
file under the "lsws/admin/lscdata" directory. Add the -n flag to only discover | file under the "lsws/admin/lscdata" directory. Add the -n flag to only discover | ||
Line 77: | Line 79: | ||
WordPress installations with the -m parameter or a single installation by | WordPress installations with the -m parameter or a single installation by | ||
providing the path to the WordPress installation directory. | providing the path to the WordPress installation directory. | ||
+ | |||
+ | cpanelplugin {--install | --uninstall} | ||
+ | [cPanel/WHM Environment Only] Install or uninstall the LiteSpeed user-end | ||
+ | plugin for cPanel for all cPanel accounts. The plugin will appear as "LiteSpeed | ||
+ | Web Cache Manager" under 'Advanced' in the user's cPanel dashboard. | ||
Line 122: | Line 129: | ||
Remove dashboard notifications (and Dash Notifier plugin) from all discovered WordPress installations: | Remove dashboard notifications (and Dash Notifier plugin) from all discovered WordPress installations: | ||
./lscmctl dashnotifyremove -m | ./lscmctl dashnotifyremove -m | ||
+ | |||
+ | [cPanel/WHM Environment Only] Install the LiteSpeed user-end plugin for cPanel for all cPanel accounts: | ||
+ | ./lscmctl cpanelplugin --install | ||
</code> | </code> | ||
===== Scan And Enable Using A CronJob ===== | ===== Scan And Enable Using A CronJob ===== |