WP-CLI
wp term
Manages taxonomy terms and term meta, with create, delete, and list commands. See reference for taxonomies and their terms. Subcommands...
wp theme
Manages themes, including installs, activations, and updates. See the WordPress Theme Handbook developer resource for more information on themes. Subcommands...
wp transient
Adds, gets, and deletes entries in the WordPress Transient Cache. By default, the transient cache uses the WordPress database to...
wp user
Manages users, along with their roles, capabilities, and meta. See references for Roles and Capabilities and WP User class. Subcommands...
wp widget
Manages widgets, including adding and moving them within sidebars. A widget adds content and features to a widget area (also...
wp shell
Opens an interactive PHP console for running and testing PHP code. wp shell allows you to evaluate PHP statements and...
wp sidebar list
Lists registered sidebars. Synopsis wp sidebar list [--fields=<fields>] [--format=<format>] Options [--fields=] Limit the output to specific object fields. [--format=] Render...
wp sidebar
Lists registered sidebars. A sidebar is any widgetized area of your theme. Subcommands Command Description wp sidebar list Lists registered...
wp site
Creates, deletes, empties, moderates, and lists one or more sites on a multisite installation. Subcommands Command Description wp site activate...
wp super-admin
Lists, adds, or removes super admin users on a multisite installation. Subcommands Command Description wp super-admin add Grants super admin...
wp taxonomy
Retrieves information about registered taxonomies. See references for built-in taxonomies and custom taxonomies. Subcommands Command Description wp taxonomy get Gets...
wp scaffold theme-tests
Generates files needed for running PHPUnit tests in a theme. Generated Files phpunit.xml.dist - PHPUnit configuration .circleci/config.yml - CircleCI configuration...
wp scaffold _s
Generates starter code for a theme based on _s. See the Underscores website for more details. Synopsis wp scaffold _s...
wp scaffold
Generates code for post types, taxonomies, plugins, child themes, etc. Subcommands Command Description wp scaffold block Generates PHP, JS and...
wp scaffold taxonomy
Generates PHP code for registering a custom taxonomy. Synopsis wp scaffold taxonomy <slug> [--post_types=<post-types>] [--label=<label>] [--textdomain=<textdomain>] [--theme] [--plugin=<plugin>] [--raw] [--force]...
wp scaffold block
Generates PHP, JS and CSS code for registering a Gutenberg block for a plugin or theme. Warning: wp scaffold block...
wp scaffold child-theme
Generates child theme based on an existing theme. Creates a child theme folder with functions.php and style.css files. Synopsis wp...
wp search-replace
Searches/replaces strings in the database. Searches through all rows in a selection of tables and replaces appearances of the first...
wp server
Launches PHP's built-in web server for a specific WordPress installation. Uses php -S to launch a web server serving the...
wp role
Manages user roles, including creating new roles and resetting to defaults. See references for Roles and Capabilities and WP User...
wp role create
Creates a new role. Synopsis wp role create <role-key> <role-name> [--clone=<role>] Options The internal name of the role. The publicly...
wp role delete
Deletes an existing role. Synopsis wp role delete <role-key> Options The internal name of the role. Examples # Delete approver...
wp role exists
Checks if a role exists. Exits with return code 0 if the role exists, 1 if it does not. Synopsis...
wp role list
Lists all roles. Synopsis wp role list [--fields=<fields>] [--field=<field>] [--format=<format>] Options [--fields=] Limit the output to specific object fields. [--field=]...
wp role reset
Resets any default role to default capabilities. Uses WordPress' populate_roles() function to put one or more roles back into the...
wp rewrite
Lists or flushes the site's rewrite rules, updates the permalink structure. See the WordPress Rewrite API and WP Rewrite class...
wp rewrite flush
Flushes rewrite rules. Resets WordPress' rewrite rules based on registered post types, etc. To regenerate a .htaccess file with WP-CLI,...
wp rewrite list
Gets a list of the current rewrite rules. Synopsis wp rewrite list [--match=<url>] [--source=<source>] [--fields=<fields>] [--format=<format>] Options [--match=] Show rewrite...
wp rewrite structure
Updates the permalink structure. Sets the post permalink structure to the specified pattern. To regenerate a .htaccess file with WP-CLI,...
wp post
Manages posts, content, and meta. Subcommands Command Description wp post create Creates a new post. wp post delete Deletes an...
wp post-type
Retrieves details on the site's registered post types. Get information on WordPress' built-in and the site's custom post types. Subcommands...
wp post-type get
Gets details about a registered post type. Synopsis wp post-type get <post-type> [--field=<field>] [--fields=<fields>] [--format=<format>] Options Post type slug. [--field=]...
wp post-type list
Lists registered post types. Synopsis wp post-type list [--<field>=<value>] [--field=<field>] [--fields=<fields>] [--format=<format>] Options [--=] Filter by one or more fields...
wp option
Retrieves and sets site options, including plugin and WordPress settings. See the Plugin Settings API and the Theme Options for...
wp package
Lists, installs, and removes WP-CLI packages. WP-CLI packages are community-maintained projects built on WP-CLI. They can contain WP-CLI commands, but...
wp plugin
Manages plugins, including installs, activations, and updates. See the WordPress Plugin Handbook developer resource for more information on plugins. Subcommands...
wp language theme
Installs, activates, and manages theme language packs. Subcommands Command Description wp language theme install Installs a given language for a...
wp language core
Installs, activates, and manages core language packs. Subcommands Command Description wp language core activate Activates a given language. (Deprecated: use...
wp language
Installs, activates, and manages language packs. Subcommands Command Description wp language core Installs, activates, and manages core language packs. wp...
wp language plugin
Installs, activates, and manages plugin language packs. Subcommands Command Description wp language plugin install Installs a given language for a...
wp maintenance-mode
Activates, deactivates or checks the status of the maintenance mode of a site. Subcommands Command Description wp maintenance-mode activate Activates...
wp media
Imports files as attachments, regenerates thumbnails, or lists registered image sizes. Subcommands Command Description wp media fix-orientation Fix image orientation...
wp menu
Lists, creates, assigns, and deletes the active theme's navigation menus. See the Navigation Menus reference in the Theme Handbook. Subcommands...
wp network
Perform network-wide operations. Subcommands Command Description wp network meta Gets, adds, updates, deletes, and lists network custom fields. wp network...
wp i18n make-pot
Create a POT file for a WordPress project. Scans PHP, Blade-PHP and JavaScript files for translatable strings, as well as...
wp i18n update-po
Update PO files from a POT file. This behaves similarly to the msgmerge command. Synopsis wp i18n update-po <source> [<destination>]...
wp i18n
Provides internationalization tools for WordPress projects. Subcommands Command Description wp i18n make-json Extract JavaScript strings from PO files and add...
wp i18n make-json
Extract JavaScript strings from PO files and add them to individual JSON files. For JavaScript internationalization purposes, WordPress requires translations...
wp i18n make-mo
Create MO files from PO files. Synopsis wp i18n make-mo <source> [<destination>] Options <source> : Path to an existing PO...
wp i18n make-php
Create PHP files from PO files. Synopsis wp i18n make-php <source> [<destination>] Options <source> : Path to an existing PO...
wp import
Imports content from a given WXR file. Provides a command line interface to the WordPress Importer plugin, for performing data...
wp export
Exports WordPress content to a WXR file. Generates one or more WXR files containing authors, terms, posts, comments, and attachments....
wp help
Gets help on WP-CLI, or on a specific command. Synopsis wp help [<command>...] Options [<command>...] : Get help on a...
wp embed
Inspects oEmbed providers, clears embed cache, and more. Subcommands Command Description wp embed cache Finds, triggers, and deletes oEmbed caches....
wp embed fetch
Attempts to convert a URL into embed HTML. In non-raw mode, starts by checking the URL against the regex of...
wp embed handler
Retrieves embed handlers. Subcommands Command Description wp embed handler list Lists all available embed handlers. wp embed handler list Lists...
wp embed provider
Retrieves oEmbed providers. Subcommands Command Description wp embed provider list Lists all available oEmbed providers. wp embed provider match Gets...
wp embed cache
Finds, triggers, and deletes oEmbed caches. Subcommands Command Description wp embed cache clear Deletes all oEmbed caches for a given...
wp eval
Executes arbitrary PHP code. Note: because code is executed within a method, global variables need to be explicitly globalized. Synopsis...
wp eval-file
Loads and executes a PHP file. Note: because code is executed within a method, global variables need to be explicitly...
wp core
Downloads, installs, updates, and manages a WordPress installation. Subcommands Command Description wp core check-update Checks for WordPress updates via Version...
wp cron
Tests, runs, and deletes WP-Cron events; manages WP-Cron schedules. Subcommands Command Description wp cron event Schedules, runs, and deletes WP-Cron...
wp db
Performs basic database operations using credentials stored in wp-config.php. Subcommands Command Description wp db check Checks the current status of...
wp cli
Reviews current WP-CLI info, checks for updates, or views defined aliases. Subcommands Command Description wp cli alias Retrieves, sets and...
wp comment
Creates, updates, deletes, and moderates comments. Subcommands Command Description wp comment approve Approves a comment. wp comment count Counts comments,...
wp config
Generates and reads the wp-config.php file. Subcommands Command Description wp config create Generates a wp-config.php file. wp config delete Deletes...
wp cache
Adds, removes, fetches, and flushes the WP Object Cache object. By default, the WP Object Cache exists in PHP memory...
wp cap
Adds, removes, and lists capabilities of a user role. See references for Roles and Capabilities and WP User class. Subcommands...