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/01/30 17:07] Michael Alegre [Command-Line Interface - LiteSpeed Cache For WordPress Management] |
litespeed_wiki:cpanel:cli-lscwp-management [2019/07/01 18:07] Michael Alegre |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Command-Line Interface - LiteSpeed Cache For WordPress Management ====== | ====== Command-Line Interface - LiteSpeed Cache For WordPress Management ====== | ||
- | As of LiteSpeed Enterprise 5.1.14, in addition to the plugin features above, a command-line interface script also exists under ''/usr/local/lsws/admin/misc/lscmctl'' for executing basic cache management actions through the terminal or in a cron job. The help page for this script is included below. | + | This page covers the various cache management options available through our lsmctl cli script. Most of these options are also available through our [[litespeed_wiki:cpanel:whm-plugin-lscwp-management|WHM plugin for cPanel]]. |
+ | |||
+ | 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. | ||
[[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.]] | ||
+ | |||
+ | **Supported Control Panel Environments:** cPanel/WHM and Plesk | ||
**Note:** You must have a license with LSCache enabled to use these features. **[[litespeed_wiki:licenses:add-lscache|How To Get LSCache]]** | **Note:** You must have a license with LSCache enabled to use these features. **[[litespeed_wiki:licenses:add-lscache|How To Get LSCache]]** | ||
<code> | <code> | ||
- | LiteSpeed Cache Manager CLI Tool v1.3 | + | LiteSpeed Cache Manager CLI Tool v1.4 |
Line 23: | Line 27: | ||
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 | ||
Line 36: | Line 40: | ||
installations after scanning is complete. | installations after scanning is complete. | ||
- | enable -m | <wp path> | + | enable {-m | <wp path>} |
Enables LSWCP for all discovered WordPress installations with the -m | Enables LSWCP for all discovered WordPress installations with the -m | ||
- | parameter or a single installtion by providing the path to the WordPress | + | parameter or a single installation by providing the path to the WordPress |
installation directory. | installation directory. | ||
- | disable -m | <wp path> | + | disable {-m | <wp path>} |
Disables LSWCP for all discovered WordPress installations with the -m | Disables LSWCP for all discovered WordPress installations with the -m | ||
- | parameter or a single installtion by providing the path to the WordPress | + | parameter or a single installation by providing the path to the WordPress |
installation directory. | installation directory. | ||
- | upgrade -m | <wp path> | + | upgrade {-m | <wp path>} |
Upgrade LSWCP for all discovered WordPress installations to the current | Upgrade LSWCP for all discovered WordPress installations to the current | ||
- | active version with the -m parameter or a single installtion by providing the | + | active version with the -m parameter or a single installation by providing the |
path to the WordPress installation directory. | path to the WordPress installation directory. | ||
Line 62: | Line 66: | ||
Get the most up to date LSC-WP status for the provided WordPress | Get the most up to date LSC-WP status for the provided WordPress | ||
installation. | installation. | ||
+ | |||
+ | dashnotify {-m | -wppath <wp path>} [-plugin <plugin slug>] {-msgfile <message file path> | -msg <message>} | ||
+ | Notify all discovered WordPress installations with the provided message | ||
+ | (plain text or HTML) using the Dash Notifier WordPress plugin with the -m | ||
+ | parameter or a single installation by providing the path to the WordPress | ||
+ | installation directory. A plugin slug can be included to have an | ||
+ | install/activate button for that plugin added to the message as well. | ||
+ | Installations containing a '.dash_notifier_bypass' file will not be notfiied. | ||
+ | |||
+ | dashnotifyremove {-m | <wp path>} | ||
+ | Remove Dash Notifier plugin (and notification messages) from all discovered | ||
+ | WordPress installations with the -m parameter or a single installation by | ||
+ | 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 98: | Line 120: | ||
Get LSC-WP status for a single installation: | Get LSC-WP status for a single installation: | ||
./lscmctl status /home/user/public_html/wp | ./lscmctl status /home/user/public_html/wp | ||
- | </code> | ||
+ | Send a simple dashboard message to a single discovered WordPress installation: | ||
+ | ./lscmctl dashnotify -wppath /path/to/wp/install -msg "Hello World!" | ||
+ | |||
+ | Broadcast a dashboard message recommending the LiteSpeed Cache for WordPress plugin to all discovered WordPress installations: | ||
+ | ./lscmctl dashnotify -m -plugin litespeed-cache -msgfile /path/to/msg/file | ||
+ | |||
+ | Remove dashboard notifications (and Dash Notifier plugin) from all discovered WordPress installations: | ||
+ | ./lscmctl dashnotifyremove -m | ||
+ | |||
+ | [cPanel/WHM Environment Only] Install the LiteSpeed user-end plugin for cPanel for all cPanel accounts: | ||
+ | ./lscmctl cpanelplugin --install | ||
+ | </code> | ||
===== Scan And Enable Using A CronJob ===== | ===== Scan And Enable Using A CronJob ===== | ||