WordPress CLI¶
WP-CLI is the command-line interface for WordPress. It allows you to perform many actions that would normally require visiting your WordPress Dashboard in a browser. The following commands are provided by LiteSpeed, so that you may manage your cache with the CLI.
Warning
These commands are new for v3. All previous commands have been deprecated. Please update your scripts accordingly.
Option Commands¶
Commands having to do with options all begin with litespeed-option
.
Set a Particular Option¶
- Command:
litespeed-option set
- Parameters:
<key>
: the option key to update<newvalue>
: the value to assign to the option
Example
wp litespeed-option set cache-priv false
Example
wp litespeed-option set 'cdn-mapping[url][0]' https://cdn.EXAMPLE.com
Get a Particular Option¶
- Command:
litespeed-option get
- Parameters:
<key>
: the option key to return the value of
Example
wp litespeed-option get cache-priv
Example
wp litespeed-option get 'cdn-mapping[url][0]'
Get All Options¶
Displays a list of all options and their values.
- Command:
litespeed-option all
- Parameters: none
Example
wp litespeed-option all
Export Options¶
All options are exported to CURRENTDIR/lscache_wp_options_DATE-TIME.txt
unless a new path is specified.
- Command:
litespeed-option export
- Parameters:
[--filename=<path>]
: optional different path to save export file
Example
wp litespeed-option export
Import Options¶
Import options from specified file. Options must be one per line and formatted as option_key=option_value
. A semicolon (;
) at the beginning of a line indicates a comment. Comment lines are ignored.
- Command:
litespeed-option import
- Parameters:
<file>
: options file to import
Example
wp litespeed-option import options.txt
Reset Options¶
Resets all options to factory default.
- Command:
litespeed-option reset
- Parameters: none
Example
wp litespeed-option reset
Purge Commands¶
LiteSpeed Cache Purge Interface commands begin with litespeed-purge
.
Network List¶
Lists all site domains and IDs on the network.
- Command:
litespeed-purge network_list
- Parameters: none
Example
wp litespeed-purge network_list
Purge Network¶
Purges all cache entries for every site in the network. Also works for non-networked sites, just purges that single site.
- Command:
litespeed-purge all
- Parameters: none
Example
wp litespeed-purge all
Purge Blog¶
Purges all cache entries for a particular site in the network.
- Command:
litespeed-purge blog
- Parameters:
<blogid>
: ID of the site to purge
Example
wp litespeed-purge blog 2
Purge Category¶
Purges all cache entries for a list of categories.
- Command:
litespeed-purge category
- Parameters:
<ids>
: IDs of the categories to purge
Example
wp litespeed-purge category 1 3 5
Purge Tag¶
Purges all cache entries for a list of tags.
- Command:
litespeed-purge tag
- Parameters:
<ids>
: IDs of the tags to purge
Example
wp litespeed-purge tag 1 3 5
Purge Post¶
Purges all cache entries for a list of post IDs.
- Command:
litespeed-purge post_id
- Parameters:
<ids>
: IDs of the posts to purge
Example
wp litespeed-purge post_id 1 3 5
Image Optimization Commands¶
LiteSpeed Image Optimization commands begin with litespeed-image
.
Push Images¶
Sends an image optimization request to the QUIC.cloud server.
- Command:
litespeed-image push
- Parameters: none
Example
wp litespeed-image push
Pull Images¶
Pulls optimized images from the QUIC.cloud server.
- Command:
litespeed-image pull
- Parameters: none
Example
wp litespeed-image pull
Get Status¶
Shows optimization status based on local data.
- Command:
litespeed-image status
orlitespeed-image s
- Parameters: none
Example
wp litespeed-image status
Clean Up¶
Cleans up unfinished image data on the QUIC.cloud server.
- Command:
litespeed-image clean
- Parameters: none
Example
wp litespeed-image clean
Remove Original Backups¶
Removes original image backups.
- Command:
litespeed-image rm_bkup
- Parameters: none
Example
wp litespeed-image rm_bkup
QUIC.cloud Commands¶
QUIC.cloud Online Services commands begin with litespeed-online
.
Generate API Key¶
Generates an anonymous domain API key for secure communication with QUIC.cloud.
- Command:
litespeed-online init
- Parameters: none
Example
wp litespeed-online init
Sync Data¶
Synchronizes QUIC.cloud service usage information..
- Command:
litespeed-online sync
- Parameters: none
Example
wp litespeed-online sync
List Cloud Services¶
Lists all QUIC.cloud services.
- Command:
litespeed-online services
- Parameters: none
Example
wp litespeed-online services
List Nodes in Use¶
Lists all currently active QUIC.cloud nodes.
- Command:
litespeed-online nodes
- Parameters: none
Example
wp litespeed-online nodes
Detect Closest Node¶
The closest active QUIC.cloud node for a particluar service.
- Command:
litespeed-online ping
- Parameters:
<service>
: Service you wish to find a node for
Example
wp litespeed-online ping img_optm
Debug Commands¶
LiteSpeed Debug commands begin with litespeed-debug
.
Send Report¶
Sends an Environment Report to LiteSpeed
- Command:
litespeed-debug send
- Parameters: none
Example
wp litespeed-debug send