Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
litespeed_wiki:cpanel:cli-lscwp-management [2019/02/08 17:34]
Michael Alegre Added mention of our WHM plugin to first paragraph.
litespeed_wiki:cpanel:cli-lscwp-management [2019/04/19 20:05]
Michael Alegre [Command-Line Interface - LiteSpeed Cache For WordPress Management]
Line 9: Line 9:
  
 <​code>​ <​code>​
-LiteSpeed Cache Manager CLI Tool v1.3 +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 38: Line 38:
 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 64: Line 64:
     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.
  
  
Line 100: Line 113:
   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
 +</​code>​
 ===== Scan And Enable Using A CronJob ===== ===== Scan And Enable Using A CronJob =====
  
  • Admin
  • Last modified: 2020/01/03 19:33
  • by Michael Alegre