WP CLI Commands

A complete overview of all WordPress CLI commands.

wp user term set

Replaces existing terms on the object. <id> The ID of the object. <taxonomy> The name of the taxonomy type to…

wp user term remove

OPTIONS <id> The ID of the object. <taxonomy> The name of the term’s taxonomy. [<term>…] The name of the term…

wp user term list

<id> ID for the object. <taxonomy>… One or more taxonomies to list. [--field=<field>] Prints the value of a single field…

wp user term add

Append the term to the existing set of terms on the object. <id> The ID of the object. <taxonomy> The…

wp user session list

Note: The token field does not return the actual token, but a hash of it. The real token is not…

wp user session destroy

OPTIONS <user> User ID, user email, or user login. [<token>] The token of the session to destroy. Defaults to the…

wp user meta update

OPTIONS <user> The user login, user email, or user ID of the user to update metadata for. <key> The metadata…

wp user meta pluck

OPTIONS <id> The ID of the object. <key> The name of the meta field to get. <key-path>… The name(s) of…

wp user meta patch

OPTIONS <action> Patch action to perform. -– options: – insert – update – delete -– <id> The ID of the…

wp user meta list

OPTIONS <user> The user login, user email, or user ID of the user to get metadata for. [--keys=<keys>] Limit output…

wp user meta get

OPTIONS <user> The user login, user email, or user ID of the user to get metadata for. <key> The metadata…

wp user meta delete

OPTIONS <user> The user login, user email, or user ID of the user to delete metadata from. <key> The metadata…

wp user meta add

OPTIONS <user> The user login, user email, or user ID of the user to add metadata for. <key> The metadata…

wp theme mod set

OPTIONS <mod> The name of the theme mod to set or update. <value> The new value. EXAMPLES # Set theme…

wp theme mod remove

OPTIONS [<mod>…] One or more mods to remove. [--all] Remove all theme mods. EXAMPLES # Remove all theme mods. $…

wp theme mod list

OPTIONS [--field=<field>] Returns the value of a single field. [--format=<format>] Render output in a particular format. -– default: table options:…

wp theme mod get

OPTIONS [<mod>…] One or more mods to get. [--field=<field>] Returns the value of a single field. [--all] List all theme…

wp term meta update

OPTIONS <id> The ID of the object. <key> The name of the meta field to update. [<value>] The new value.…

wp term meta pluck

OPTIONS <id> The ID of the object. <key> The name of the meta field to get. <key-path>… The name(s) of…

wp term meta patch

OPTIONS <action> Patch action to perform. -– options: – insert – update – delete -– <id> The ID of the…

wp term meta list

OPTIONS <id> ID for the object. [--keys=<keys>] Limit output to metadata of specific keys. [--fields=<fields>] Limit the output to specific…

wp term meta get

OPTIONS <id> The ID of the object. <key> The name of the meta field to get. [--format=<format>] Get value in…

wp term meta delete

OPTIONS <id> The ID of the object. [<key>] The name of the meta field to delete. [<value>] The value to…

wp term meta add

OPTIONS <id> The ID of the object. <key> The name of the meta field to create. [<value>] The value of…

wp site option update

OPTIONS <key> The name of the site option to update. [<value>] The new value. If ommited, the value is read…

wp site option pluck

OPTIONS <key> The option name. <key-path>… The name(s) of the keys within the value to locate the value to pluck.…

wp site option patch

OPTIONS <action> Patch action to perform. -– options: – insert – update – delete -– <key> The option name. <key-path>……

wp site option list

OPTIONS [--search=<pattern>] Use wildcards ( * and ? ) to match option name. [--site_id=<id>] Limit options to those of a…

wp site option get

OPTIONS <key> Key for the site option. [--format=<format>] Get value in a particular format. -– default: var_export options: – var_export…

wp site option delete

OPTIONS <key> Key for the site option. EXAMPLES $ wp site option delete my_option Success: Deleted ‘my_option’ site option. GLOBAL…

wp site option add

OPTIONS <key> The name of the site option to add. [<value>] The value of the site option to add. If…

wp site meta update

OPTIONS <id> The ID of the object. <key> The name of the meta field to update. [<value>] The new value.…

wp site meta pluck

OPTIONS <id> The ID of the object. <key> The name of the meta field to get. <key-path>… The name(s) of…

wp site meta patch

OPTIONS <action> Patch action to perform. -– options: – insert – update – delete -– <id> The ID of the…

wp site meta list

OPTIONS <id> ID for the object. [--keys=<keys>] Limit output to metadata of specific keys. [--fields=<fields>] Limit the output to specific…

wp site meta get

OPTIONS <id> The ID of the object. <key> The name of the meta field to get. [--format=<format>] Get value in…

wp site meta delete

OPTIONS <id> The ID of the object. [<key>] The name of the meta field to delete. [<value>] The value to…

wp site meta add

OPTIONS <id> The ID of the object. <key> The name of the meta field to create. [<value>] The value of…

wp post term set

Replaces existing terms on the object. <id> The ID of the object. <taxonomy> The name of the taxonomy type to…

wp post term remove

OPTIONS <id> The ID of the object. <taxonomy> The name of the term’s taxonomy. [<term>…] The name of the term…

wp post term list

<id> ID for the object. <taxonomy>… One or more taxonomies to list. [--field=<field>] Prints the value of a single field…

wp post term add

Append the term to the existing set of terms on the object. <id> The ID of the object. <taxonomy> The…

wp post meta update

OPTIONS <id> The ID of the object. <key> The name of the meta field to update. [<value>] The new value.…

wp post meta pluck

OPTIONS <id> The ID of the object. <key> The name of the meta field to get. <key-path>… The name(s) of…

wp post meta patch

OPTIONS <action> Patch action to perform. -– options: – insert – update – delete -– <id> The ID of the…

wp post meta list

OPTIONS <id> ID for the object. [--keys=<keys>] Limit output to metadata of specific keys. [--fields=<fields>] Limit the output to specific…

wp post meta get

OPTIONS <id> The ID of the object. <key> The name of the meta field to get. [--format=<format>] Get value in…

wp post meta delete

OPTIONS <id> The ID of the object. [<key>] The name of the meta field to delete. [<value>] The value to…

wp post meta add

OPTIONS <id> The ID of the object. <key> The name of the meta field to create. [<value>] The value of…

wp network meta update

OPTIONS <id> The ID of the object. <key> The name of the meta field to update. [<value>] The new value.…

wp network meta pluck

OPTIONS <id> The ID of the object. <key> The name of the meta field to get. <key-path>… The name(s) of…

wp network meta patch

OPTIONS <action> Patch action to perform. -– options: – insert – update – delete -– <id> The ID of the…

wp network meta list

OPTIONS <id> ID for the object. [--keys=<keys>] Limit output to metadata of specific keys. [--fields=<fields>] Limit the output to specific…

wp network meta get

OPTIONS <id> The ID of the object. <key> The name of the meta field to get. [--format=<format>] Get value in…

wp network meta delete

OPTIONS <id> The ID of the object. [<key>] The name of the meta field to delete. [<value>] The value to…

wp network meta add

OPTIONS <id> The ID of the object. <key> The name of the meta field to create. [<value>] The value of…

wp menu location remove

OPTIONS <menu> The name, slug, or term ID for the menu. <location> Location’s slug. EXAMPLES $ wp menu location remove…

wp menu location list

OPTIONS [--format=<format>] Render output in a particular format. -– default: table options: – table – csv – json – count…

wp menu location assign

OPTIONS <menu> The name, slug, or term ID for the menu. <location> Location’s slug. EXAMPLES $ wp menu location assign…

wp menu item update

OPTIONS <db-id> Database ID for the menu item. [--title=<title>] Set a custom title for the menu item. [--link=<link>] Set a…

wp menu item list

OPTIONS <menu> The name, slug, or term ID for the menu. [--fields=<fields>] Limit the output to specific object fields. [--format=<format>]…

wp menu item delete

OPTIONS <db-id>… Database ID for the menu item(s). EXAMPLES $ wp menu item delete 45 Success: 1 menu item deleted.…

wp menu item add-term

OPTIONS <menu> The name, slug, or term ID for the menu. <taxonomy> Taxonomy of the term to be added. <term-id>…

wp menu item add-post

OPTIONS <menu> The name, slug, or term ID for the menu. <post-id> Post ID to add to the menu. [--title=<title>]…

wp menu item add-custom

OPTIONS <menu> The name, slug, or term ID for the menu. <title> Title for the link. <link> Target URL for…

wp language theme update

OPTIONS [<theme>…] One or more themes to update languages for. [--all] If set, languages for all themes will be updated.…

wp language theme uninstall

OPTIONS <theme> Theme to uninstall language for. <language>… Language code to uninstall. EXAMPLES $ wp language theme uninstall twentyten ja…

wp language theme list

OPTIONS [<theme>…] One or more themes to list languages for. [--all] If set, available languages for all themes will be…

wp language theme is-installed

Returns exit code 0 when installed, 1 when uninstalled. OPTIONS <theme> Theme to check for. <language>… The language code to…

wp language theme install

Downloads the language pack from WordPress.org. OPTIONS [<theme>] Theme to install language for. [--all] If set, languages for all themes…

wp language plugin update

OPTIONS [<plugin>…] One or more plugins to update languages for. [--all] If set, languages for all plugins will be updated.…

wp language plugin uninstall

OPTIONS <plugin> Plugin to uninstall language for. <language>… Language code to uninstall. EXAMPLES $ wp language plugin uninstall hello-dolly ja…

wp language plugin list

OPTIONS [<plugin>…] One or more plugins to list languages for. [--all] If set, available languages for all plugins will be…

wp language plugin is-installed

Returns exit code 0 when installed, 1 when uninstalled. OPTIONS <plugin> Plugin to check for. <language>… The language code to…

wp language plugin install

Downloads the language pack from WordPress.org. OPTIONS [<plugin>] Plugin to install language for. [--all] If set, languages for all plugins…

wp language core update

OPTIONS [--dry-run] Preview which translations would be updated. EXAMPLES $ wp language core update Updating ‘Japanese’ translation for WordPress 4.9.2……

wp language core uninstall

OPTIONS <language>… Language code to uninstall. EXAMPLES $ wp language core uninstall ja Success: Language uninstalled. GLOBAL PARAMETERS These global…

wp language core list

OPTIONS [--field=<field>] Display the value of a single field [--<field>=<value>] Filter results by key=value pairs. [--fields=<fields>] Limit the output to…

wp language core is-installed

Returns exit code 0 when installed, 1 when uninstalled. OPTIONS <language> The language code to check. EXAMPLES # Check whether…

wp language core install

Downloads the language pack from WordPress.org. OPTIONS <language>… Language code to install. [--activate] If set, the language will be activated…

wp language core activate

OPTIONS <language> Language code to activate. EXAMPLES $ wp language core activate ja Success: Language activated. GLOBAL PARAMETERS These global…

wp embed provider match

OPTIONS <url> URL to retrieve provider for. [--discover] Whether to use oEmbed discovery or not. Defaults to true. [--limit-response-size=<size>] Limit…

wp embed provider list

OPTIONS [--field=<field>] Display the value of a single field [--fields=<fields>] Limit the output to specific fields. [--format=<format>] Render output in…

wp embed handler list

OPTIONS [--field=<field>] Display the value of a single field [--fields=<fields>] Limit the output to specific fields. [--format=<format>] Render output in…

wp embed cache trigger

oEmbed caches for a post are stored in the post’s metadata. OPTIONS <post_id> ID of the post to do the…

wp embed cache find

Starting with WordPress 4.9, embeds that aren’t associated with a specific post will be cached in a new oembed_cache post…

wp embed cache clear

oEmbed caches for a post are stored in the post’s metadata. OPTIONS <post_id> ID of the post to clear the…

wp cron schedule list

OPTIONS [--fields=<fields>] Limit the output to specific object fields. [--field=<field>] Prints the value of a single field for each schedule.…

wp cron event schedule

OPTIONS <hook> The hook name. [<next-run>] A Unix timestamp or an English textual datetime description compatible with strtotime(). Defaults to…

wp cron event run

OPTIONS [<hook>…] One or more hooks to run. [--due-now] Run all hooks due right now. [--all] Run all hooks. EXAMPLES…

wp cron event list

OPTIONS [--fields=<fields>] Limit the output to specific object fields. [--<field>=<value>] Filter by one or more fields. [--field=<field>] Prints the value…

wp cron event delete

OPTIONS <hook> The hook name. EXAMPLES # Delete the next scheduled cron event $ wp cron event delete cron_test Success:…

wp comment meta update

OPTIONS <id> The ID of the object. <key> The name of the meta field to update. [<value>] The new value.…

wp comment meta pluck

OPTIONS <id> The ID of the object. <key> The name of the meta field to get. <key-path>… The name(s) of…

wp comment meta patch

OPTIONS <action> Patch action to perform. -– options: – insert – update – delete -– <id> The ID of the…

wp comment meta list

OPTIONS <id> ID for the object. [--keys=<keys>] Limit output to metadata of specific keys. [--fields=<fields>] Limit the output to specific…

wp comment meta get

OPTIONS <id> The ID of the object. <key> The name of the meta field to get. [--format=<format>] Get value in…

wp comment meta delete

OPTIONS <id> The ID of the object. [<key>] The name of the meta field to delete. [<value>] The value to…

wp comment meta add

OPTIONS <id> The ID of the object. <key> The name of the meta field to create. [<value>] The value of…

wp cli cache prune

Removes all cached files except for the newest version of each one. EXAMPLES $ wp cli cache prune Success: Cache…

wp cli cache clear

EXAMPLES $ wp cli cache clear Success: Cache cleared. GLOBAL PARAMETERS These global parameters have the same behavior across all…

wp cli alias update

OPTIONS <key> Key for the alias. [--set-user=<user>] Set user for alias. [--set-url=<url>] Set url for alias. [--set-path=<path>] Set path for…

wp cli alias list

OPTIONS [--format=<format>] Render output in a particular format. -– default: yaml options: – yaml – json – var_export -– EXAMPLES…

wp cli alias get

OPTIONS <key> Key for the alias. EXAMPLES # Get alias. $ wp cli alias get @prod ssh: dev@somedeve.env:12345/home/dev/ GLOBAL PARAMETERS…

wp cli alias delete

OPTIONS <key> Key for the alias. [--config=<config>] Config file to be considered for operations. -– options: – global – project…

wp cli alias add

OPTIONS <key> Key for the alias. [--set-user=<user>] Set user for alias. [--set-url=<url>] Set url for alias. [--set-path=<path>] Set path for…

wp widget update

OPTIONS <widget-id> Unique ID for the widget [--<field>=<value>] Field to update, with its new value EXAMPLES # Change calendar-1 widget…

wp widget reset

Removes all widgets from the sidebar and places them in Inactive Widgets. OPTIONS [<sidebar-id>…] One or more sidebars to reset.…

wp widget move

Changes the order of a widget in its existing sidebar, or moves it to a new sidebar. OPTIONS <widget-id> Unique…

wp widget list

OPTIONS <sidebar-id> ID for the corresponding sidebar. [--fields=<fields>] Limit the output to specific object fields. [--format=<format>] Render output in a…

wp widget delete

OPTIONS <widget-id>… Unique ID for the widget(s) EXAMPLES # Delete the recent-comments-2 widget from its sidebar. $ wp widget delete…

wp widget deactivate

Moves widgets to Inactive Widgets. OPTIONS <widget-id>… Unique ID for the widget(s) EXAMPLES # Deactivate the recent-comments-2 widget. $ wp…

wp widget add

Creates a new widget entry in the database, and associates it with the sidebar. OPTIONS <name> Widget name. <sidebar-id> ID…

wp user update

OPTIONS <user>… The user login, user email or user ID of the user(s) to update. [--user_pass=<password>] A string that contains…

wp user unspam

OPTIONS <id>… One or more IDs of users to remove from spam. EXAMPLES $ wp user unspam 123 User 123…

wp user term

EXAMPLES # Set user terms $ wp user term set 123 test category Success: Set terms.

wp user spam

OPTIONS <id>… One or more IDs of users to mark as spam. EXAMPLES $ wp user spam 123 User 123…

wp user set-role

OPTIONS <user> User ID, user email, or user login. [<role>] Make the user have the specified role. If not passed,…

wp user session

EXAMPLES # List a user’s sessions. $ wp user session list admin@example.com –format=csv login_time,expiration_time,ip,ua “2016-01-01 12:34:56″,”2016-02-01 12:34:56″,127.0.0.1,”Mozilla/5.0…” # Destroy the…

wp user reset-password

OPTIONS <user>… one or more user logins or IDs. [--skip-email] Don’t send an email notification to the affected user(s). EXAMPLES…

wp user remove-role

OPTIONS <user> User ID, user email, or user login. [<role>] A specific role to remove. EXAMPLES $ wp user remove-role…

wp user remove-cap

OPTIONS <user> User ID, user email, or user login. <cap> The capability to be removed. EXAMPLES $ wp user remove-cap…

wp user meta

EXAMPLES # Add user meta $ wp user meta add 123 bio “Mary is an WordPress developer.” Success: Added custom…

wp user list

Display WordPress users based on all arguments supported by WP_User_Query(). OPTIONS [--role=<role>] Only display users with a certain role. [--<field>=<value>]…

wp user list-caps

OPTIONS <user> User ID, user email, or login. [--format=<format>] Render output in a particular format. -– default: list options: -…

wp user import-csv

If the user already exists (matching the email address or login), then the user is updated unless the –skip-update flag…

wp user get

OPTIONS <user> User ID, user email, or user login. [--field=<field>] Instead of returning the whole user, returns the value of…

wp user generate

Creates a specified number of new users with dummy data. OPTIONS [--count=<number>] How many users to generate? -– default: 100…

wp user delete

On multisite, wp user delete only removes the user from the current site. Include –network to also remove the user…

wp user create

OPTIONS <user-login> The login of the user to create. <user-email> The email address of the user to create. [--role=<role>] The…

wp user check-password

OPTIONS <user> The user login, user email or user ID of the user to check credentials for. <user_pass> A string…

wp user add-role

OPTIONS <user> User ID, user email, or user login. <role> Add the specified role to the user. EXAMPLES $ wp…

wp user add-cap

OPTIONS <user> User ID, user email, or user login. <cap> The capability to add. EXAMPLES # Add a capability for…

wp transient type

Indicates whether the transients API is using an object cache or the database. For a more complete explanation of the…

wp transient set

&lt;expiration&gt; is the time until expiration, in seconds. For a more complete explanation of the transient cache, including the network|site…

wp transient list

OPTIONS [--search=<pattern>] Use wildcards ( * and ? ) to match transient name. [--exclude=<pattern>] Pattern to exclude. Use wildcards (…

wp transient get

For a more complete explanation of the transient cache, including the network|site cache, please see docs for wp transient. OPTIONS…

wp transient delete

For a more complete explanation of the transient cache, including the network|site cache, please see docs for wp transient. OPTIONS…

wp theme update

OPTIONS [<theme>…] One or more themes to update. [--all] If set, all themes that have updates will be updated. [--exclude=<theme-names>]…

wp theme status

OPTIONS [<theme>] A particular theme to show the status for. EXAMPLES $ wp theme status twentysixteen Theme twentysixteen details: Name:…

wp theme search

Displays themes in the WordPress.org theme directory matching a given search query. OPTIONS <search> The string to search for. [--page=<page>]…

wp theme path

OPTIONS [<theme>] The theme to get the path to. Path includes “style.css” file. If not set, will return the path…

wp theme mod

EXAMPLES # Set the ‘background_color’ theme mod to ‘000000’. $ wp theme mod set background_color 000000 Success: Theme mod background_color…

wp theme list

OPTIONS [--<field>=<value>] Filter results based on the value of a field. [--field=<field>] Prints the value of a single field for…

wp theme is-installed

Returns exit code 0 when installed, 1 when uninstalled. OPTIONS <theme> The theme to check. EXAMPLES # Check whether theme…

wp theme is-active

Returns exit code 0 when active, 1 when not active. OPTIONS <theme> The plugin to check. EXAMPLES # Check whether…

wp theme install

OPTIONS <theme|zip|url>… One or more themes to install. Accepts a theme slug, the path to a local zip file, or…

wp theme get

OPTIONS <theme> The theme to get. [--field=<field>] Instead of returning the whole theme, returns the value of a single field.…

wp theme enable

Permits theme to be activated from the dashboard of a site on a WordPress multisite install. OPTIONS <theme> The theme…

wp theme disable

Removes ability for a theme to be activated from the dashboard of a site on a WordPress multisite install. OPTIONS…

wp theme delete

Removes the theme or themes from the filesystem. OPTIONS [<theme>…] One or more themes to delete. [--all] If set, all…

wp theme activate

OPTIONS <theme> The theme to activate. EXAMPLES $ wp theme activate twentysixteen Success: Switched to ‘Twenty Sixteen’ theme. GLOBAL PARAMETERS…

wp term update

OPTIONS <taxonomy> Taxonomy of the term to update. <term> ID or slug for the term to update. [--by=<field>] Explicitly handle…

wp term recount

In instances where manual updates are made to the terms assigned to posts in the database, the number of posts…

wp term migrate

OPTIONS <term> Slug or ID of the term to migrate. [--by=<field>] Explicitly handle the term value as a slug or…

wp term meta

EXAMPLES # Set term meta $ wp term meta set 123 bio “Mary is a WordPress developer.” Success: Updated custom…

wp term list

OPTIONS <taxonomy>… List terms of one or more taxonomies [--<field>=<value>] Filter by one or more fields (see get_terms() $args parameter…

wp term get

OPTIONS <taxonomy> Taxonomy of the term to get <term> ID or slug of the term to get [--by=<field>] Explicitly handle…

wp term generate

Creates a specified number of new terms with dummy data. OPTIONS <taxonomy> The taxonomy for the generated terms. [--count=<number>] How…

wp term delete

Errors if the term doesn’t exist, or there was a problem in deleting it. OPTIONS <taxonomy> Taxonomy of the term…

wp term create

OPTIONS <taxonomy> Taxonomy for the new term. <term> A name for the new term. [--slug=<slug>] A unique slug for the…

wp taxonomy list

OPTIONS [--<field>=<value>] Filter by one or more fields (see get_taxonomies() first parameter for a list of available fields). [--field=<field>] Prints…

wp taxonomy get

OPTIONS <taxonomy> Taxonomy slug. [--field=<field>] Instead of returning the whole taxonomy, returns the value of a single field. [--fields=<fields>] Limit…

wp super-admin remove

OPTIONS <user>… One or more user IDs, user emails, or user logins. EXAMPLES $ wp super-admin remove superadmin2 Success: Revoked…

wp super-admin list

OPTIONS [--format=<format>] Render output in a particular format. -– default: list options: – list – table – csv – json…

wp super-admin add

OPTIONS <user>… One or more user IDs, user emails, or user logins. EXAMPLES $ wp super-admin add superadmin2 Success: Granted…

wp site unspam

OPTIONS <id>… One or more IDs of sites to remove from spam. EXAMPLES $ wp site unspam 123 Success: Site…

wp site unmature

OPTIONS <id>… One or more IDs of sites to set as unmature. EXAMPLES $ wp site general 123 Success: Site…

wp site unarchive

OPTIONS <id>… One or more IDs of sites to unarchive. EXAMPLES $ wp site unarchive 123 Success: Site 123 unarchived.…

wp site switch-language

OPTIONS <language> Language code to activate. EXAMPLES $ wp site switch-language ja Success: Language activated. GLOBAL PARAMETERS These global parameters…

wp site spam

OPTIONS <id>… One or more IDs of sites to be marked as spam. EXAMPLES $ wp site spam 123 Success:…

wp site public

OPTIONS <id>… One or more IDs of sites to set as public. EXAMPLES $ wp site public 123 Success: Site…

wp site private

OPTIONS <id>… One or more IDs of sites to set as private. EXAMPLES $ wp site private 123 Success: Site…

wp site option

EXAMPLES # Get site registration $ wp site option get registration none # Add site option $ wp site option…

wp site meta

EXAMPLES # Set site meta $ wp site meta set 123 bio “Mary is a WordPress developer.” Success: Updated custom…

wp site mature

OPTIONS <id>… One or more IDs of sites to set as mature. EXAMPLES $ wp site mature 123 Success: Site…

wp site list

OPTIONS [--network=<id>] The network to which the sites belong. [--<field>=<value>] Filter by one or more fields (see “Available Fields” section).…

wp site empty

Truncates posts, comments, and terms tables to empty a site of its content. Doesn’t affect site configuration (options) or users.…

wp site delete

OPTIONS [<site-id>] The id of the site to delete. If not provided, you must set the –slug parameter. [--slug=<slug>] Path…

wp site deactivate

OPTIONS <id>… One or more IDs of sites to deactivate. EXAMPLES $ wp site deactivate 123 Success: Site 123 deactivated.…

wp site create

OPTIONS --slug=<slug> Path for the new site. Subdomain on subdomain installs, directory on subdirectory installs. [--title=<title>] Title of the new…

wp site archive

OPTIONS <id>… One or more IDs of sites to archive. EXAMPLES $ wp site archive 123 Success: Site 123 archived.…

wp site activate

OPTIONS <id>… One or more IDs of sites to activate. EXAMPLES $ wp site activate 123 Success: Site 123 activated.…

wp sidebar list

OPTIONS [--fields=<fields>] Limit the output to specific object fields. [--format=<format>] Render output in a particular format. -– default: table options:…

wp scaffold underscores

See the Underscores website for more details. OPTIONS <slug> The slug for the new theme, used for prefixing functions. [--activate]…

wp scaffold theme-tests

The following files are generated by default: phpunit.xml.dist is the configuration file for PHPUnit. .travis.yml is the configuration file for…

wp scaffold taxonomy

OPTIONS <slug> The internal name of the taxonomy. [--post_types=<post-types>] Post types to register for use with the taxonomy. [--label=<label>] The…

wp scaffold post-type

OPTIONS <slug> The internal name of the post type. [--label=<label>] The text used to translate the update messages. [--textdomain=<textdomain>] The…

wp scaffold plugin

The following files are always generated: plugin-slug.php is the main PHP plugin file. readme.txt is the readme file for the…

wp scaffold plugin-tests

The following files are generated by default: phpunit.xml.dist is the configuration file for PHPUnit. .travis.yml is the configuration file for…

wp scaffold child-theme

Creates a child theme folder with functions.php and style.css files. OPTIONS <slug> The slug for the new child theme. --parent_theme=<slug>…

wp scaffold block

Blocks are the fundamental element of the Gutenberg editor. They are the primary way in which plugins and themes can…

wp role reset

OPTIONS [<role-key>…] The internal name of one or more roles to reset. [--all] If set, all default roles will be…

wp role list

OPTIONS [--fields=<fields>] Limit the output to specific object fields. [--field=<field>] Prints the value of a single field. [--format=<format>] Render output…

wp role exists

Exits with return code 0 if the role exists, 1 if it does not. OPTIONS <role-key> The internal name of…

wp role delete

OPTIONS <role-key> The internal name of the role. EXAMPLES # Delete approver role. $ wp role delete approver Success: Role…

wp role create

OPTIONS <role-key> The internal name of the role. <role-name> The publicly visible name of the role. [--clone=<role>] Clone capabilities from…

wp rewrite structure

Sets the post permalink structure to the specified pattern. To regenerate a .htaccess file with WP-CLI, you’ll need to add…

wp rewrite list

OPTIONS [--match=<url>] Show rewrite rules matching a particular URL. [--source=<source>] Show rewrite rules from a particular source. [--fields=<fields>] Limit the…

wp rewrite flush

Resets WordPress’ rewrite rules based on registered post types, etc. To regenerate a .htaccess file with WP-CLI, you’ll need to…

wp profile stage

When WordPress handles a request from a browser, it’s essentially executing as one long PHP script. wp profile stage breaks…

wp profile hook

In order to profile callbacks on a specific hook, the action or filter will need to execute during the course…

wp profile eval

Code execution happens after WordPress has loaded entirely, which means you can use any utilities defined in WordPress, active plugins,…

wp profile eval-file

File execution happens after WordPress has loaded entirely, which means you can use any utilities defined in WordPress, active plugins,…

wp post update

OPTIONS <id>… One or more IDs of posts to update. [--post_author=<post_author>] The ID of the user who added the post.…

wp post term

EXAMPLES # Set post terms $ wp post term set 123 test category Success: Set terms.

wp post meta

EXAMPLES # Set post meta $ wp post meta set 123 _wp_page_template about.php Success: Updated custom field ‘_wp_page_template’. # Get…

wp post list

Display posts based on all arguments supported by WP_Query(). OPTIONS [--<field>=<value>] One or more args to pass to WP_Query. [--field=<field>]…

wp post get

OPTIONS <id> The ID of the post to get. [--field=<field>] Instead of returning the whole post, returns the value of…

wp post generate

Creates a specified number of new posts with dummy data. OPTIONS [--count=<number>] How many posts to generate? -– default: 100…

wp post exists

Displays a success message if the post does exist. OPTIONS <id> The ID of the post to check. EXAMPLES #…

wp post edit

OPTIONS <id> The ID of the post to edit. EXAMPLES # Launch system editor to edit post $ wp post…

wp post delete

OPTIONS <id>… One or more IDs of posts to delete. [--force] Skip the trash bin. [--defer-term-counting] Recalculate term count in…

wp post create

OPTIONS [--post_author=<post_author>] The ID of the user who added the post. Default is the current user ID. [--post_date=<post_date>] The date…

wp post-type list

OPTIONS [--<field>=<value>] Filter by one or more fields (see get_post_types() first parameter for a list of available fields). [--field=<field>] Prints…

wp post-type get

OPTIONS <post-type> Post type slug [--field=<field>] Instead of returning the whole taxonomy, returns the value of a single field. [--fields=<fields>]…

wp plugin verify-checksums

OPTIONS [<plugin>…] One or more plugins to verify. [--all] If set, all plugins will be verified. [--strict] If set, even…

wp plugin update

OPTIONS [<plugin>…] One or more plugins to update. [--all] If set, all plugins that have updates will be updated. [--exclude=<name>]…

wp plugin uninstall

OPTIONS [<plugin>…] One or more plugins to uninstall. [--deactivate] Deactivate the plugin before uninstalling. Default behavior is to warn and…

wp plugin toggle

If the plugin is active, then it will be deactivated. If the plugin is inactive, then it will be activated.…

wp plugin status

OPTIONS [<plugin>] A particular plugin to show the status for. EXAMPLES # Displays status of all plugins $ wp plugin…

wp plugin search

Displays plugins in the WordPress.org plugin directory matching a given search query. OPTIONS <search> The string to search for. [--page=<page>]…

wp plugin path

OPTIONS [<plugin>] The plugin to get the path to. If not set, will return the path to the plugins directory.…

wp plugin list

Displays a list of the plugins installed on the site with activation status, whether or not there’s an update available,…

wp plugin is-installed

Returns exit code 0 when installed, 1 when uninstalled. OPTIONS <plugin> The plugin to check. EXAMPLES # Check whether plugin…

wp plugin is-active

Returns exit code 0 when active, 1 when not active. OPTIONS <plugin> The plugin to check. EXAMPLES # Check whether…

wp plugin install

OPTIONS <plugin|zip|url>… One or more plugins to install. Accepts a plugin slug, the path to a local zip file, or…

wp plugin get

OPTIONS <plugin> The plugin to get. [--field=<field>] Instead of returning the whole plugin, returns the value of a single field.…

wp plugin delete

OPTIONS [<plugin>…] One or more plugins to delete. [--all] If set, all plugins will be deleted. EXAMPLES # Delete plugin…

wp plugin deactivate

OPTIONS [<plugin>…] One or more plugins to deactivate. [--uninstall] Uninstall the plugin after deactivation. [--all] If set, all plugins will…

wp plugin activate

OPTIONS [<plugin>…] One or more plugins to activate. [--all] If set, all plugins will be activated. [--network] If set, the…

wp package update

EXAMPLES $ wp package update Using Composer to update packages… — Loading composer repositories with package information Updating dependencies Resolving…

wp package uninstall

OPTIONS <name> Name of the package to uninstall. EXAMPLES $ wp package uninstall wp-cli/server-command Removing require statement from /home/person/.wp-cli/packages/composer.json Deleting…

wp package path

If you want to contribute to a package, this is a great way to jump to it. OPTIONS [<name>] Name…

wp package list

OPTIONS [--fields=<fields>] Limit the output to specific fields. Defaults to all fields. [--format=<format>] Render output in a particular format. -–…

wp package install

Packages are required to be a valid Composer package, and can be specified as: Package name from WP-CLI’s package index.…

wp package browse

Lists packages available for installation from the Package Index. Although the package index will remain in place for backward compatibility…

wp option update

OPTIONS <key> The name of the option to update. [<value>] The new value. If ommited, the value is read from…

wp option pluck

OPTIONS <key> The option name. <key-path>… The name(s) of the keys within the value to locate the value to pluck.…

wp option patch

OPTIONS <action> Patch action to perform. -– options: – insert – update – delete -– <key> The option name. <key-path>……

wp option list

OPTIONS [--search=<pattern>] Use wildcards ( * and ? ) to match option name. [--exclude=<pattern>] Pattern to exclude. Use wildcards (…

wp option get

OPTIONS <key> Key for the option. [--format=<format>] Get value in a particular format. -– default: var_export options: – var_export -…

wp option delete

OPTIONS <key>… Key for the option. EXAMPLES # Delete an option. $ wp option delete my_option Success: Deleted ‘my_option’ option.…

wp option add

Errors if the option already exists. OPTIONS <key> The name of the option to add. [<value>] The value of the…

wp network meta

EXAMPLES # Get a list of super-admins $ wp network meta get 1 site_admins array ( 0 => ‘supervisor’, )

wp menu location

EXAMPLES # List available menu locations $ wp menu location list +———-+——————-+ | location | description | +———-+——————-+ | primary…

wp menu list

OPTIONS [--fields=<fields>] Limit the output to specific object fields. [--format=<format>] Render output in a particular format. -– default: table options:…

wp menu item

EXAMPLES # Add an existing post to an existing menu $ wp menu item add-post sidebar-menu 33 –title=”Custom Test Post”…

wp menu delete

OPTIONS <menu>… The name, slug, or term ID for the menu(s). EXAMPLES $ wp menu delete “My Menu” Success: 1…

wp menu create

OPTIONS <menu-name> A descriptive name for the menu. [--porcelain] Output just the new menu id. EXAMPLES $ wp menu create…

wp media regenerate

OPTIONS [<attachment-id>…] One or more IDs of the attachments to regenerate. [--image_size=<image_size>] Name of the image size to regenerate. Only…

wp media import

OPTIONS <file>… Path to file or files to be imported. Supports the glob(3) capabilities of the current shell. If file…

wp media image-size

OPTIONS [--fields=<fields>] Limit the output to specific fields. Defaults to all fields. [--format=<format>] Render output in a specific format -–…

wp media fix-orientation

OPTIONS [<attachment-id>…] One or more IDs of the attachments to regenerate. [--dry-run] Check images needing orientation without performing the operation.…

wp maintenance-mode status

EXAMPLES $ wp maintenance-mode status Maintenance mode is active. GLOBAL PARAMETERS These global parameters have the same behavior across all…

wp maintenance-mode is-active

EXAMPLES $ wp maintenance-mode is-active $ echo $? 1 GLOBAL PARAMETERS These global parameters have the same behavior across all…

wp maintenance-mode deactivate

EXAMPLES $ wp maintenance-mode deactivate Disabling Maintenance mode… Success: Deactivated Maintenance mode. GLOBAL PARAMETERS These global parameters have the same…

wp maintenance-mode activate

[--force] Force maintenance mode activation operation. EXAMPLES $ wp maintenance-mode activate Enabling Maintenance mode… Success: Activated Maintenance mode. GLOBAL PARAMETERS…

wp language theme

EXAMPLES # Install the Dutch theme language pack. $ wp language theme install twentyten nl_NL Success: Language installed. # Uninstall…

wp language plugin

EXAMPLES # Install the Dutch plugin language pack. $ wp language plugin install hello-dolly nl_NL Success: Language installed. # Uninstall…

wp language core

EXAMPLES # Install the Dutch core language pack. $ wp language core install nl_NL Success: Language installed. # Activate the…

wp i18n make-pot

Scans PHP and JavaScript files for translatable strings, as well as theme stylesheets and plugin files if the source directory…

wp i18n make-json

For JavaScript internationalization purposes, WordPress requires translations to be split up into one Jed-formatted JSON file per JavaScript source file.…

wp embed provider

wp embed handler

wp embed fetch

In non-raw mode, starts by checking the URL against the regex of the registered embed handlers. If none of the…

wp embed cache

wp db tables

Defaults to all tables registered to the $wpdb database handler. OPTIONS [<table>…] List tables based on wildcard search, e.g. ‘wp_*_options’…

wp db size

Display the database name and size for DB_NAME specified in wp-config.php. The size defaults to a human-readable number. Available size…

wp db search

Searches through all or a selection of database tables for a given string, Outputs colorized references to the string. Defaults…

wp db reset

Runs DROP_DATABASE and CREATE_DATABASE SQL statements using DB_HOST, DB_NAME, DB_USER and DB_PASSWORD database credentials specified in wp-config.php. OPTIONS [--dbuser=<value>] Username…

wp db repair

Runs mysqlcheck utility with –repair=true using DB_HOST, DB_NAME, DB_USER and DB_PASSWORD database credentials specified in wp-config.php. See docs for more…

wp db query

Executes an arbitrary SQL query using DB_HOST, DB_NAME, DB_USER and DB_PASSWORD database credentials specified in wp-config.php. OPTIONS [<sql>] A SQL…

wp db prefix

Display the database table prefix, as defined by the database handler’s interpretation of the current site. EXAMPLES $ wp db…

wp db optimize

Runs mysqlcheck utility with –optimize=true using DB_HOST, DB_NAME, DB_USER and DB_PASSWORD database credentials specified in wp-config.php. See docs for more…

wp db import

Runs SQL queries using DB_HOST, DB_NAME, DB_USER and DB_PASSWORD database credentials specified in wp-config.php. This does not create database by…

wp db export

Runs mysqldump utility using DB_HOST, DB_NAME, DB_USER and DB_PASSWORD database credentials specified in wp-config.php. OPTIONS [<file>] The name of the…

wp db drop

Runs DROP_DATABASE SQL statement using DB_HOST, DB_NAME, DB_USER and DB_PASSWORD database credentials specified in wp-config.php. OPTIONS [--dbuser=<value>] Username to pass…

wp db create

Runs CREATE_DATABASE SQL statement using DB_HOST, DB_NAME, DB_USER and DB_PASSWORD database credentials specified in wp-config.php. OPTIONS [--dbuser=<value>] Username to pass…

wp db columns

OPTIONS [<table>] Name of the database table. [--format] Render output in a particular format. -– default: table options: – table…

wp db cli

OPTIONS [--database=<database>] Use a specific database. Defaults to DB_NAME. [--default-character-set=<character-set>] Use a specific character set. Defaults to DB_CHARSET when defined.…

wp db clean

Runs DROP_TABLE for each table that has a $table_prefix as specified in wp-config.php. OPTIONS [--dbuser=<value>] Username to pass to mysql.…

wp db check

Runs mysqlcheck utility with –check using DB_HOST, DB_NAME, DB_USER and DB_PASSWORD database credentials specified in wp-config.php. See docs for more…

wp cron test

This command tests the spawning system by performing the following steps: Checks to see if the DISABLE_WP_CRON constant is set;…

wp cron schedule

EXAMPLES # List available cron schedules $ wp cron schedule list +————+————-+———-+ | name | display | interval | +————+————-+———-+…

wp cron event

EXAMPLES # Schedule a new cron event $ wp cron event schedule cron_test Success: Scheduled event with hook ‘cron_test’ for…

wp core version

OPTIONS [--extra] Show extended version information. EXAMPLES # Display the WordPress version $ wp core version 4.5.2 # Display WordPress…

wp core verify-checksums

Downloads md5 checksums for the current version from WordPress.org, and compares those checksums against the currently installed files. For security,…

wp core update

Defaults to updating WordPress to the latest version. If you see “Error: Another update is currently in progress.”, you may…

wp core update-db

[--network] Update databases for all sites on a network [--dry-run] Compare database versions without performing the update. EXAMPLES # Update…

wp core multisite-install

Creates the WordPress tables in the database using the URL, title, and default admin user details provided. Then, creates the…

wp core multisite-convert

Creates the multisite database tables, and adds the multisite constants to wp-config.php. For those using WordPress with Apache, remember to…

wp core is-installed

Determines whether WordPress is installed by checking if the standard database tables are installed. Doesn’t produce output; uses exit codes…

wp core install

Creates the WordPress tables in the database using the URL, title, and default admin user details provided. Performs the famous…

wp core download

Downloads and extracts WordPress core files to the specified path. Uses current directory when no path is specified. Downloaded build…

wp core check-update

Lists the most recent versions when there are updates available, or success message when up to date. OPTIONS [--minor] Compare…

wp config shuffle-salts

OPTIONS EXAMPLES # Get new salts for your wp-config.php file $ wp config shuffle-salts Success: Shuffled the salt keys. GLOBAL…

wp config set

OPTIONS <name> Name of the wp-config.php constant or variable. <value> Value to set the wp-config.php constant or variable to. [--add]…

wp config path

EXAMPLES # Get wp-config.php file path $ wp config path /home/person/htdocs/project/wp-config.php GLOBAL PARAMETERS These global parameters have the same behavior…

wp config list

OPTIONS [<filter>…] Name or partial name to filter the list by. [--fields=<fields>] Limit the output to specific fields. Defaults to…

wp config has

OPTIONS <name> Name of the wp-config.php constant or variable. [--type=<type>] Type of the config value to set. Defaults to ‘all’.…

wp config get

OPTIONS <name> Name of the wp-config.php constant or variable. [--type=<type>] Type of config value to retrieve. Defaults to ‘all’. -–…

wp config edit

EXAMPLES # Launch system editor to edit wp-config.php file $ wp config edit # Edit wp-config.php file in a specific…

wp config delete

OPTIONS <name> Name of the wp-config.php constant or variable. [--type=<type>] Type of the config value to delete. Defaults to ‘all’.…

wp config create

Creates a new wp-config.php with database constants, and verifies that the database constants are correct. OPTIONS --dbname=<dbname> Set the database…

wp comment update

OPTIONS <id>… One or more IDs of comments to update. --<field>=<value> One or more fields to update. See wp_update_comment(). EXAMPLES…

wp comment untrash

OPTIONS <id>… The IDs of the comments to untrash. EXAMPLES # Untrash comment. $ wp comment untrash 1337 Success: Untrashed…

wp comment unspam

OPTIONS <id>… The IDs of the comments to unmark as spam. EXAMPLES # Unspam comment. $ wp comment unspam 1337…

wp comment unapprove

OPTIONS <id>… The IDs of the comments to unapprove. EXAMPLES # Unapprove comment. $ wp comment unapprove 1337 Success: Unapproved…

wp comment trash

OPTIONS <id>… The IDs of the comments to trash. EXAMPLES # Trash comment. $ wp comment trash 1337 Success: Trashed…

wp comment status

OPTIONS <id> The ID of the comment to check. EXAMPLES # Get status of comment. $ wp comment status 1337…

wp comment spam

OPTIONS <id>… The IDs of the comments to mark as spam. EXAMPLES # Spam comment. $ wp comment spam 1337…

wp comment recount

OPTIONS <id>… IDs for one or more posts to update. EXAMPLES # Recount comment for the post. $ wp comment…

wp comment meta

EXAMPLES # Set comment meta $ wp comment meta set 123 description “Mary is a WordPress developer.” Success: Updated custom…

wp comment list

Display comments based on all arguments supported by WP_Comment_Query(). OPTIONS [--<field>=<value>] One or more args to pass to WP_Comment_Query. [--field=<field>]…

wp comment get

OPTIONS <id> The comment to get. [--field=<field>] Instead of returning the whole comment, returns the value of a single field.…

wp comment generate

in this article we are going to learn how to use WP comment generate CLI command. Basically WP comment generate…

wp comment exists

In this article we are going to see how to use WP comment exist CLI command. With the help of…

wp comment delete

In this article we are going to learn how to use WP comment delete CLI command. We can delete any…

wp comment create

In this article we are going to learn how to use WP comment create CLI command to create a new…

wp comment count

In this article we are going to see how how to use WP comment count CLI command. it is pretty…

wp comment approve

in this article we are going to learn how to use WP comment approve subcommand. if someone comment on any…

wp cli version

EXAMPLES # Display CLI version. $ wp cli version WP-CLI 0.24.1 GLOBAL PARAMETERS These global parameters have the same behavior…

wp cli update

Default behavior is to check the releases API for the newest stable version, and prompt if one is available. Use…

wp cli param-dump

OPTIONS [--with-values] Display current values also. [--format=<format>] Render output in a particular format. -– default: json options: – var_export -…

wp cli info

Helpful for diagnostic purposes, this command shares: OS information. Shell information. PHP binary used. PHP binary version. php.ini configuration file…

wp cli has-command

This commands checks if a command is registered with WP-CLI. If the command is found then it returns with exit…

wp cli completions

OPTIONS --line=<line> The current command line to be executed. --point=<point> The index to the current cursor position relative to the…

wp cli cmd-dump

wp cli check-update

Queries the Github releases API. Returns available versions if there are updates available, or success message if using the latest…

wp cli cache

EXAMPLES # Remove all cached files. $ wp cli cache clear Success: Cache cleared. # Remove all cached files except…

wp cli alias

Aliases are shorthand references to WordPress installs. For instance, @dev could refer to a development install and @prod could refer…

wp cap remove

OPTIONS <role> Key for the role. <cap>… One or more capabilities to remove. EXAMPLES # Remove ‘spectate’ capability from ‘author’…

wp cap list

OPTIONS <role> Key for the role. [--format=<format>] Render output in a particular format. -– default: list options: – list -…

wp cap add

OPTIONS <role> Key for the role. <cap>… One or more capabilities to add. [--grant] Adds the capability as an explicit…

wp cache type

Note that the guesses made by this function are based on the WP_Object_Cache classes that define the 3rd party object…

wp cache set

Errors if the value can’t be set. OPTIONS <key> Cache key. <value> Value to set on the key. [<group>] Method…

wp cache replace

Errors if the value can’t be replaced. OPTIONS <key> Cache key. <value> Value to replace. [<group>] Method for grouping data…

wp cache incr

Errors if the value can’t be incremented. OPTIONS <key> Cache key. [<offset>] The amount by which to increment the item’s…

wp cache get

Errors if the value doesn’t exist. OPTIONS <key> Cache key. [<group>] Method for grouping data within the cache which allows…

wp cache flush

For WordPress multisite instances using a persistent object cache, flushing the object cache will typically flush the cache for all…

wp cache delete

Errors if the value can’t be deleted. OPTIONS <key> Cache key. [<group>] Method for grouping data within the cache which…

wp cache decr

Errors if the value can’t be decremented. OPTIONS <key> Cache key. [<offset>] The amount by which to decrement the item’s…

wp cache add

Errors if a value already exists for the key, which means the value can’t be added. OPTIONS <key> Cache key.…

wp widget

A widget adds content and features to a widget area (also called a sidebar). EXAMPLES # List widgets on a…

wp user

See references for Roles and Capabilities and WP User class. EXAMPLES # List user IDs $ wp user list –field=ID…

wp transient

By default, the transient cache uses the WordPress database to persist values between requests. On a single site installation, values…

wp theme

See the WordPress Theme Handbook developer resource for more information on themes. EXAMPLES # Install the latest version of a…

wp term

See reference for taxonomies and their terms. EXAMPLES # Create a new term. $ wp term create category Apple –description=”A…

wp taxonomy

See references for built-in taxonomies and custom taxonomies. EXAMPLES # List all taxonomies with ‘post’ object type. $ wp taxonomy…

wp super-admin

EXAMPLES # List user with super-admin capabilities $ wp super-admin list supervisor administrator # Grant super-admin privileges to the user.…

wp site

EXAMPLES # Create site $ wp site create –slug=example Success: Site 3 created: http://www.example.com/example/ # Output a simple list of…

wp sidebar

A sidebar is any widgetized area of your theme. EXAMPLES # List sidebars $ wp sidebar list –fields=name,id –format=csv name,id…

wp shell

wp shell allows you to evaluate PHP statements and expressions interactively, from within a WordPress environment. Type a bit of…

wp server

Uses php -S to launch a web server serving the WordPress webroot. <http://php.net/manual/en/features.commandline.webserver.php&gt; Importantly, PHP’s built-in web server doesn’t support…

wp search-replace

Searches through all rows in a selection of tables and replaces appearances of the first string with the second string.…

wp scaffold

EXAMPLES # Generate a new plugin with unit tests $ wp scaffold plugin sample-plugin Success: Created plugin files. Success: Created…

wp role

See references for Roles and Capabilities and WP User class. EXAMPLES # List roles. $ wp role list –fields=role –format=csv…

wp rewrite

See the WordPress Rewrite API and WP Rewrite class reference. EXAMPLES # Flush rewrite rules $ wp rewrite flush Success:…

wp profile

wp post

EXAMPLES # Create a new post. $ wp post create –post_type=post –post_title=’A sample post’ Success: Created post 123. # Update…

wp post-type

Get information on WordPress’ built-in and the site’s custom post types. EXAMPLES # Get details about a post type $…

wp plugin

See the WordPress Plugin Handbook developer resource for more information on plugins. EXAMPLES # Activate plugin $ wp plugin activate…

wp package

WP-CLI packages are community-maintained projects built on WP-CLI. They can contain WP-CLI commands, but they can also just extend WP-CLI…

wp option

See the Plugin Settings API and the Theme Options for more information on adding customized options. EXAMPLES # Get site…

wp network

EXAMPLES # Get a list of super-admins $ wp network meta get 1 site_admins array ( 0 => ‘supervisor’, )

wp menu

See the Navigation Menus reference in the Theme Handbook. EXAMPLES # Create a new menu $ wp menu create “My…

wp media

EXAMPLES # Re-generate all thumbnails, without confirmation. $ wp media regenerate –yes Found 3 images to regenerate. 1/3 Regenerated thumbnails…

wp maintenance-mode

EXAMPLES # Activate Maintenance mode. $ wp maintenance-mode activate Enabling Maintenance mode… Success: Activated Maintenance mode. # Deactivate Maintenance mode.…

wp language

EXAMPLES # Install the Dutch core language pack. $ wp language core install nl_NL Success: Language installed. # Activate the…

wp import

Provides a command line interface to the WordPress Importer plugin, for performing data migrations. OPTIONS <file>… Path to one or…

wp i18n

EXAMPLES # Create a POT file for the WordPress plugin/theme in the current directory $ wp i18n make-pot . languages/my-plugin.pot

wp help

OPTIONS [<command>…] Get help on a specific command. EXAMPLES # get help for `core` command wp help core # get…

wp find

Recursively iterates subdirectories of provided &lt;path&gt; to find and report WordPress installations. A WordPress installation is a wp-includes directory with…

wp export

Generates one or more WXR files containing authors, terms, posts, comments, and attachments. WXR files do not include site configuration…

wp eval

Note: because code is executed within a method, global variables need to be explicitly globalized. OPTIONS <php-code> The code to…

wp eval-file

Note: because code is executed within a method, global variables need to be explicitly globalized. OPTIONS <file> The path to…

wp embed

wp dist-archive

For a plugin in a directory ‘wp-content/plugins/hello-world’, this command creates a distribution archive ‘wp-content/plugins/hello-world.zip’. You can specify files or directories…

wp db

EXAMPLES # Create a new database. $ wp db create Success: Database created. # Drop an existing database. $ wp…

wp cron

EXAMPLES # Test WP Cron spawning system $ wp cron test Success: WP-Cron spawning is working as expected.

wp core

EXAMPLES # Download WordPress core $ wp core download –locale=nl_NL Downloading WordPress 4.5.2 (nl_NL)… md5 hash verified: c5366d05b521831dd0b29dfc386e56a5 Success: WordPress…

wp config

wp comment

in this article we are going to learn how to use WP comment command. We can use WP comment CLI…

wp cli

EXAMPLES # Display the version currently installed. $ wp cli version WP-CLI 0.24.1 # Check for updates to WP-CLI. $…

wp cap

See references for Roles and Capabilities and WP User class. EXAMPLES # Add ‘spectate’ capability to ‘author’ role. $ wp…

wp cache

In this article we are going to learn how to use WP cache command. By default, the WP Object Cache…

wp admin

The wp admin command is used to open the /wp-admin/ screen. Installation To use the wp admin command we need to…

Scroll to Top
%d bloggers like this: