Skip to Content
DeveloperWP-CLI Commands

WP-CLI Commands

All LW Plugins with CLI support register commands under the wp lw-* namespace. Commands are available when WP-CLI  is installed.


LW Disable

Manage disabled WordPress features via the command line.

wp lw-disable list

Shows a table with all features and their current status (enabled/disabled).

wp lw-disable list

wp lw-disable enable <feature>

Enable (disable the WordPress feature) a specific feature.

wp lw-disable enable emojis wp lw-disable enable comments wp lw-disable enable xmlrpc

wp lw-disable disable <feature>

Disable a feature (restores the WordPress default behavior).

wp lw-disable disable emojis wp lw-disable disable heartbeat

wp lw-disable enable-all

Enable all disable features at once.

wp lw-disable enable-all

wp lw-disable disable-all

Disable all features (restores WordPress defaults).

wp lw-disable disable-all

Available Features

FeatureDescription
commentsComments system
admin_new_user_emailNew user admin email
emojisEmoji scripts/styles
embedsoEmbed system
heartbeatHeartbeat API
block_libraryGutenberg CSS
xmlrpcXML-RPC protocol
rest_apiREST API restriction
application_passwordsApp passwords
generatorVersion meta tag
shortlinkShortlink header
rsd_linkRSD link
wlw_manifestWLW manifest
version_stringsAsset version strings
adjacent_postsAdjacent post links
feedsRSS feeds

LW Enable

Manage enabled WordPress features via the command line.

wp lw-enable list

Shows a table with all features and their current status.

wp lw-enable list

wp lw-enable enable <feature>

Enable a specific feature.

wp lw-enable enable svg

wp lw-enable disable <feature>

Disable a specific feature.

wp lw-enable disable svg

wp lw-enable enable-all

Enable all features at once.

wp lw-enable enable-all

wp lw-enable disable-all

Disable all features (restores defaults).

wp lw-enable disable-all

Available Features

FeatureDescription
svgSVG file uploads with security sanitization

Manage cookie consent settings, statistics, and logs via WP-CLI.

View all cookie consent settings.

wp lw-cookie settings list

Change a specific setting.

wp lw-cookie settings set enabled true wp lw-cookie settings set position bottom

View consent statistics (total consents, category breakdown).

wp lw-cookie stats

Export consent logs. Supports CSV and JSON formats.

wp lw-cookie export --format=csv wp lw-cookie export --format=json

Clean up old consent logs.

wp lw-cookie clear-logs --older-than=365

LW Firewall

Manage firewall settings, IP rules, geo blocking, bots, logs, and worker via WP-CLI.

wp lw-firewall status

Show firewall status overview including storage backend, rate limits, endpoint protection status, and geo blocking info.

wp lw-firewall status

wp lw-firewall ip list <type>

List IPs in the whitelist or blacklist.

wp lw-firewall ip list whitelist wp lw-firewall ip list blacklist wp lw-firewall ip list whitelist --format=json

wp lw-firewall ip add <type> <ip>

Add an IP to the whitelist or blacklist. Supports CIDR notation.

wp lw-firewall ip add whitelist 192.168.1.100 wp lw-firewall ip add blacklist 10.0.0.0/24

wp lw-firewall ip remove <type> <ip>

Remove an IP from the whitelist or blacklist.

wp lw-firewall ip remove whitelist 192.168.1.100

wp lw-firewall geo list

List blocked country codes.

wp lw-firewall geo list wp lw-firewall geo list --format=json

wp lw-firewall geo add <country_code>

Add a country to the block list.

wp lw-firewall geo add CN wp lw-firewall geo add RU

wp lw-firewall geo remove <country_code>

Remove a country from the block list.

wp lw-firewall geo remove CN

wp lw-firewall config

Manage firewall configuration settings.

wp lw-firewall bots

Manage bot blocking rules and User-Agent patterns.

wp lw-firewall logs

View and manage firewall request logs.

wp lw-firewall worker

Manage the MU-plugin worker (install, update, status).


LW LMS

wp lw-lms migrate-learndash

Migrate courses, lessons, sections, and lesson order from LearnDash to LW LMS.

# Dry run (preview only) wp lw-lms migrate-learndash --dry-run # Verbose output wp lw-lms migrate-learndash --verbose # Full migration wp lw-lms migrate-learndash
FlagDescription
--dry-runPreview the migration without making changes
--verboseShow detailed output during migration

LW Translate

Manage community translations for plugins and themes.

wp lw-translate list

List available translations with their status (installed, available, needs update).

wp lw-translate list

wp lw-translate install <slug>

Install a translation for a specific plugin or theme.

wp lw-translate install woocommerce

wp lw-translate delete <slug>

Delete an installed translation.

wp lw-translate delete woocommerce

wp lw-translate refresh

Refresh the translation cache from the remote repository.

wp lw-translate refresh

wp lw-translate settings

View or modify translation settings (locale, tone).

wp lw-translate settings

LW ZenAdmin

Manage admin interface cleanup settings, dashboard widgets, and admin menu items.

wp lw-zenadmin menu list

List all admin menu items with their visibility status.

wp lw-zenadmin menu list

wp lw-zenadmin menu show <slug>

Show a hidden menu item.

wp lw-zenadmin menu show edit.php

wp lw-zenadmin menu hide <slug>

Hide a menu item from the admin sidebar.

wp lw-zenadmin menu hide edit-comments.php

wp lw-zenadmin menu show-all

Show all hidden menu items.

wp lw-zenadmin menu show-all

wp lw-zenadmin menu hide-all

Hide all non-protected menu items.

wp lw-zenadmin menu hide-all

wp lw-zenadmin menu reset

Reset menu visibility to defaults.

wp lw-zenadmin menu reset

wp lw-zenadmin widget

Manage dashboard widget visibility.

General Commands

The base wp lw-zenadmin command provides general settings management for Notice Collector and other features.