Generates code for post types, taxonomies, plugins, child themes, etc. Subcommands Command Description wp scaffold block Generates PHP, JS and CSS code for registering a Gutenberg block (deprecated) wp scaffold...
Generates PHP, JS and CSS code for registering a Gutenberg block for a plugin or theme. Warning: wp scaffold block is deprecated. The official script to generate a block is...
Generates child theme based on an existing theme. Creates a child theme folder with functions.php and style.css files. Synopsis wp scaffold child-theme <slug> --parent_theme=<slug> [--theme_name=<title>] [--author=<full-name>] [--author_uri=<uri>] [--theme_uri=<uri>] [--activate] [--enable-network]...
Generates files needed for running PHPUnit tests in a plugin. Generated Files phpunit.xml.dist - PHPUnit configuration .circleci/config.yml - CircleCI configuration (or other CI via --ci) bin/install-wp-tests.sh - WordPress test suite...
Lists all roles. Synopsis wp role list [--fields=<fields>] [--field=<field>] [--format=<format>] Options [--fields=] Limit the output to specific object fields. [--field=] Prints the value of a single field. [--format=] Render output...
Resets any default role to default capabilities. Uses WordPress' populate_roles() function to put one or more roles back into the state they were at in a fresh WordPress install. Removes...
Manages user roles, including creating new roles and resetting to defaults. See references for Roles and Capabilities and WP User class. Subcommands Command Description wp role create Creates a new...
Gets a list of the current rewrite rules. Synopsis wp rewrite list [--match=<url>] [--source=<source>] [--fields=<fields>] [--format=<format>] Options [--match=] Show rewrite rules matching a particular URL. [--source=] Show rewrite rules from...
Updates the permalink structure. Sets the post permalink structure to the specified pattern. To regenerate a .htaccess file with WP-CLI, you'll need to add the mod_rewrite module to your WP-CLI...
Lists or flushes the site's rewrite rules, updates the permalink structure. See the WordPress Rewrite API and WP Rewrite class reference. Subcommands Command Description wp rewrite flush Flushes rewrite rules...