Subcommands398 subcommands
wp cache
Adds, removes, fetches, and flushes the WP Object Cache object
wp cache add
Adds a value to the object cache
wp cache decr
Decrements a value in the object cache
wp cache delete
Removes a value from the object cache
wp cache flush
Flushes the object cache
wp cache get
Gets a value from the object cache
wp cache incr
Increments a value in the object cache
wp cache replace
Replaces a value in the object cache, if the value already exists
wp cache set
Sets a value to the object cache, regardless of whether it already exists
wp cache type
Attempts to determine which object cache is being used
wp cap
Adds, removes, and lists capabilities of a user role
wp cap add
Adds a value to the object cache
wp cap list
Lists capabilities for a given role
wp cap remove
Removes capabilities from a given role
wp cli
Reviews current WP-CLI info, checks for updates, or views defined aliases
wp cli alias
Retrieves, sets and updates aliases for WordPress Installations
wp cli alias add
Creates an alias
wp cli alias delete
Deletes an alias
wp cli alias get
Gets the value for an alias
wp cli alias list
Lists available WP-CLI aliases
wp cli alias update
Updates an alias
wp cli cache
Manages the internal WP-CLI cache,
wp cli cache clear
Clears the internal cache
wp cli cache prune
Prunes the internal cache
wp cli check-update
Checks to see if there is a newer version of WP-CLI available
wp cli cmd-dump
Dumps the list of installed commands, as JSON
wp cli completions
Generates tab completion strings
wp cli has-command
Detects if a command exists
wp cli info
Prints various details about the WP-CLI environment
wp cli param-dump
Dumps the list of global parameters, as JSON or in var_export format
wp cli update
Updates WP-CLI to the latest release
wp cli version
Prints WP-CLI version
wp comment
Creates, updates, deletes, and moderates comments
wp comment approve
Approves a comment
wp comment count
Counts comments, on whole blog or on a given post
wp comment create
Creates a new comment
wp comment delete
Deletes a comment
wp comment exists
Verifies whether a comment exists
wp comment generate
Generates some number of new dummy comments
wp comment get
Gets the data of a single comment
wp comment list
Gets a list of comments
wp comment meta
Adds, updates, deletes, and lists comment custom fields
wp comment meta add
Add a meta field
wp comment meta delete
Delete a meta field
wp comment meta get
Get meta field value
wp comment meta list
List all metadata associated with an object
wp comment meta patch
Update a nested value for a meta field
wp comment meta pluck
Get a nested value from a meta field
wp comment meta update
Update a meta field
wp comment recount
Recalculates the comment_count value for one or more posts
wp comment spam
Marks a comment as spam
wp comment status
Gets the status of a comment
wp comment trash
Trashes a comment
wp comment unapprove
Unapproves a comment
wp comment unspam
Unmarks a comment as spam
wp comment untrash
Untrashes a comment
wp comment update
Updates one or more comments
wp config
Generates and reads the wp-config.php file
wp config create
Generates a wp-config.php file
wp config delete
Deletes a specific constant or variable from the wp-config.php file
wp config edit
Launches system editor to edit the wp-config.php file
wp config get
Gets the value of a specific constant or variable defined in wp-config.php file
wp config has
Checks whether a specific constant or variable exists in the wp-config.php file
wp config list
Lists variables, constants, and file includes defined in wp-config.php file
wp config path
Gets the path to wp-config.php file
wp config set
Sets the value of a specific constant or variable defined in wp-config.php file
wp config shuffle-salts
Refreshes the salts defined in the wp-config.php file
wp core
Downloads, installs, updates, and manages a WordPress installation
wp core check-update
Checks for WordPress updates via Version Check API
wp core download
Downloads core WordPress files
wp core install
Runs the standard WordPress installation process
wp core is-installed
Checks if WordPress is installed
wp core multisite-convert
Transforms an existing single-site installation into a multisite installation
wp core multisite-install
Installs WordPress multisite from scratch
wp core update
Updates WordPress to a newer version
wp core update-db
Runs the WordPress database update procedure
wp core verify-checksums
Verifies WordPress files against WordPress.org’s checksums
wp core version
Displays the WordPress version
wp cron
Tests, runs, and deletes WP-Cron events; manages WP-Cron schedules
wp cron event
Schedules, runs, and deletes WP-Cron events
wp cron event delete
Deletes all scheduled cron events for the given hook
wp cron event list
Lists scheduled cron events
wp cron event run
Runs the next scheduled cron event for the given hook
wp cron event schedule
Schedules a new cron event
wp cron event unschedule
Unschedules all cron events for a given hook
wp cron schedule
Gets WP-Cron schedules
wp cron schedule list
List available cron schedules
wp cron test
Tests the WP Cron spawning system and reports back its status
wp db
Performs basic database operations using credentials stored in wp-config.php
wp db check
Checks the current status of the database
wp db clean
Removes all tables with `$table_prefix` from the database
wp db cli
Opens a MySQL console using credentials from wp-config.php
wp db columns
Displays information about a given table
wp db create
Creates a new database
wp db drop
Deletes the existing database
wp db export
Exports the database to a file or to STDOUT
wp db import
Imports a database from a file or from STDIN
wp db optimize
Optimizes the database
wp db prefix
Displays the database table prefix
wp db query
Executes a SQL query against the database
wp db repair
Repairs the database
wp db reset
Removes all tables from the database
wp db search
Finds a string in the database
wp db size
Displays the database name and size
wp db tables
Lists the database tables
wp dist-archive
Create a distribution archive based on a project’s .distignore file
wp embed
Inspects oEmbed providers, clears embed cache, and more
wp embed cache
Finds, triggers, and deletes oEmbed caches
wp embed cache clear
Deletes all oEmbed caches for a given post
wp embed cache find
Finds an oEmbed cache post ID for a given URL
wp embed cache trigger
Triggers the caching of all oEmbed results for a given post
wp embed fetch
Attempts to convert a URL into embed HTML
wp embed handler
Retrieves embed handlers
wp embed handler list
Lists all available embed handlers
wp embed provider
Retrieves oEmbed providers
wp embed provider list
Lists all available oEmbed providers
wp embed provider match
Gets the matching provider for a given URL
wp eval
Executes arbitrary PHP code
wp eval-file
Loads and executes a PHP file
wp export
Exports WordPress content to a WXR file
wp find
Find WordPress installations on the filesystem
wp help
Gets help on WP-CLI, or on a specific command
wp i18n
Provides internationalization tools for WordPress projects
wp i18n make-json
Extract JavaScript strings from PO files and add them to individual JSON files
wp i18n make-mo
Create MO files from PO files
wp i18n make-pot
Create a POT file for a WordPress project
wp import
Imports content from a given WXR file
wp language
Installs, activates, and manages language packs
wp language core
Installs, activates, and manages core language packs
wp language core activate
Activates a given language
wp language core install
Installs a given language
wp language core is-installed
Checks if a given language is installed
wp language core list
Lists all available languages
wp language core uninstall
Uninstalls a given language
wp language core update
Updates installed languages for core
wp language plugin
Installs, activates, and manages plugin language packs
wp language plugin install
Installs a given language for a plugin
wp language plugin is-installed
Checks if a given language is installed
wp language plugin list
Lists all available languages for one or more plugins
wp language plugin uninstall
Uninstalls a given language for a plugin
wp language plugin update
Updates installed languages for one or more plugins
wp language theme
Installs, activates, and manages theme language packs
wp language theme install
Installs a given language for a theme
wp language theme is-installed
Checks if a given language is installed
wp language theme list
Lists all available languages for one or more themes
wp language theme uninstall
Uninstalls a given language for a theme
wp language theme update
Updates installed languages for one or more themes
wp maintenance-mode
Activates, deactivates or checks the status of the maintenance mode of a site
wp maintenance-mode activate
Activates maintenance mode
wp maintenance-mode deactivate
Deactivates maintenance mode
wp maintenance-mode is-active
Detects maintenance mode status
wp maintenance-mode status
Displays maintenance mode status
wp media
Imports files as attachments, regenerates thumbnails, or lists registered image sizes
wp media fix-orientation
Fix image orientation for one or more attachments
wp media image-size
Lists image sizes registered with WordPress
wp media import
Creates attachments from local files or URLs
wp media regenerate
Regenerates thumbnails for one or more attachments
wp menu
Lists, creates, assigns, and deletes the active theme’s navigation menus
wp menu create
Creates a new menu
wp menu delete
Deletes one or more menus
wp menu item
List, add, and delete items associated with a menu
wp menu item add-custom
Adds a custom menu item
wp menu item add-post
Adds a post as a menu item
wp menu item add-term
Adds a taxonomy term as a menu item
wp menu item delete
Deletes one or more items from a menu
wp menu item list
Gets a list of items associated with a menu
wp menu item update
Updates a menu item
wp menu list
Gets a list of menus
wp menu location
Assigns, removes, and lists a menu’s locations
wp menu location assign
Assigns a location to a menu
wp menu location list
Lists locations for the current theme
wp menu location remove
Removes a location from a menu
wp network
Perform network-wide operations
wp network meta
Gets, adds, updates, deletes, and lists network custom fields
wp network meta add
Add a meta field
wp network meta delete
Delete a meta field
wp network meta get
Get meta field value
wp network meta list
List all metadata associated with an object
wp network meta patch
Update a nested value for a meta field
wp network meta pluck
Get a nested value from a meta field
wp network meta update
Update a meta field
wp option
Retrieves and sets site options, including plugin and WordPress settings
wp option add
Adds a new option value
wp option delete
Deletes an option
wp option get
Gets the value for an option
wp option list
Lists options and their values
wp option patch
Updates a nested value in an option
wp option pluck
Gets a nested value from an option
wp option update
Updates an option value
wp package
Lists, installs, and removes WP-CLI packages
wp package browse
Browses WP-CLI packages available for installation
wp package install
Installs a WP-CLI package
wp package list
Lists installed WP-CLI packages
wp package path
Gets the path to an installed WP-CLI package, or the package directory
wp package uninstall
Uninstalls a WP-CLI package
wp package update
Updates all installed WP-CLI packages to their latest version
wp plugin
Manages plugins, including installs, activations, and updates
wp plugin activate
Activates one or more plugins
wp plugin auto-updates
Manages plugin auto-updates
wp plugin auto-updates disable
Disables the auto-updates for a plugin
wp plugin auto-updates enable
Enables the auto-updates for a plugin
wp plugin auto-updates status
Shows the status of auto-updates for a plugin
wp plugin deactivate
Deactivates one or more plugins
wp plugin delete
Deletes plugin files without deactivating or uninstalling
wp plugin get
Gets details about an installed plugin
wp plugin install
Installs one or more plugins
wp plugin is-active
Checks if a given plugin is active
wp plugin is-installed
Checks if a given plugin is installed
wp plugin list
Gets a list of plugins
wp plugin path
Gets the path to a plugin or to the plugin directory
wp plugin search
Searches the WordPress.org plugin directory
wp plugin status
Reveals the status of one or all plugins
wp plugin toggle
Toggles a plugin’s activation state
wp plugin uninstall
Uninstalls one or more plugins
wp plugin update
Updates one or more plugins
wp plugin verify-checksums
Verifies plugin files against WordPress.org’s checksums
wp post
Manages posts, content, and meta
wp post create
Creates a new post
wp post delete
Deletes an existing post
wp post edit
Launches system editor to edit post content
wp post exists
Verifies whether a post exists
wp post generate
Generates some posts
wp post get
Gets details about a post
wp post list
Gets a list of posts
wp post meta
Adds, updates, deletes, and lists post custom fields
wp post meta add
Add a meta field
wp post meta delete
Delete a meta field
wp post meta get
Get meta field value
wp post meta list
List all metadata associated with an object
wp post meta patch
Update a nested value for a meta field
wp post meta pluck
Get a nested value from a meta field
wp post meta update
Update a meta field
wp post term
Adds, updates, removes, and lists post terms
wp post term add
Add a term to an object
wp post term list
List all terms associated with an object
wp post term remove
Remove a term from an object
wp post term set
Set object terms
wp post update
Updates one or more existing posts
wp post-type
Retrieves details on the site’s registered post types
wp post-type get
Gets details about a registered post type
wp post-type list
Lists registered post types
wp profile eval
Profile arbitrary code execution
wp profile eval-file
Profile execution of an arbitrary file
wp profile hook
Profile key metrics for WordPress hooks (actions and filters)
wp profile stage
Profile each stage of the WordPress load process (bootstrap, main_query, template)
wp rewrite
Lists or flushes the site’s rewrite rules, updates the permalink structure
wp rewrite flush
Flushes rewrite rules
wp rewrite list
Gets a list of the current rewrite rules
wp rewrite structure
Updates the permalink structure
wp role
Manages user roles, including creating new roles and resetting to defaults
wp role create
Creates a new role
wp role delete
Deletes an existing role
wp role exists
Checks if a role exists
wp role list
Lists all roles
wp role reset
Resets any default role to default capabilities
wp scaffold
Generates code for post types, taxonomies, plugins, child themes, etc
wp scaffold block
Generates PHP, JS and CSS code for registering a Gutenberg block for a plugin or theme
wp scaffold child-theme
Generates child theme based on an existing theme
wp scaffold plugin
Generates starter code for a plugin
wp scaffold plugin-tests
Generates files needed for running PHPUnit tests in a plugin
wp scaffold post-type
Generates PHP code for registering a custom post type
wp scaffold taxonomy
Generates PHP code for registering a custom taxonomy
wp scaffold theme-tests
Generates files needed for running PHPUnit tests in a theme
wp scaffold underscores
Generates starter code for a theme based on _s
wp scaffold _s
Generates starter code for a theme based on _s
wp search-replace
Searches/replaces strings in the database
wp server
Launches PHP’s built-in web server for a specific WordPress installation
wp shell
Opens an interactive PHP console for running and testing PHP code
wp sidebar
Lists registered sidebars
wp sidebar list
Lists registered sidebars
wp site
Creates, deletes, empties, moderates, and lists one or more sites on a multisite installation
wp site activate
Activates one or more sites
wp site archive
Archives one or more sites
wp site create
Creates a site in a multisite installation
wp site deactivate
Deactivates one or more sites
wp site delete
Deletes a site in a multisite installation
wp site empty
Empties a site of its content (posts, comments, terms, and meta)
wp site list
Lists all sites in a multisite installation
wp site mature
Sets one or more sites as mature
wp site meta
Adds, updates, deletes, and lists site custom fields
wp site meta add
Add a meta field
wp site meta delete
Delete a meta field
wp site meta get
Get meta field value
wp site meta list
List all metadata associated with an object
wp site meta patch
Update a nested value for a meta field
wp site meta pluck
Get a nested value from a meta field
wp site meta update
Update a meta field
wp site option
Adds, updates, deletes, and lists site options in a multisite installation
wp site option add
Adds a site option
wp site option delete
Deletes a site option
wp site option get
Gets a site option
wp site option list
Lists site options
wp site option patch
Updates a nested value in an option
wp site option pluck
Gets a nested value from an option
wp site option update
Updates a site option
wp site private
Sets one or more sites as private
wp site public
Sets one or more sites as public
wp site spam
Marks one or more sites as spam
wp site switch-language
Activates a given language
and 98 more — all of them are in the JSON