wp-cli/scaffold-command
WP-CLI scaffold command generates starter code for WordPress post types, taxonomies, blocks, plugins, and child themes. Includes commands for building themes from Underscores with options for activation, SASS, and WooCommerce support.
wp scaffold post-type / wp scaffold taxonomy (aliases cpt / tax, with --raw for snippet-only output and --theme / --plugin targeting) collapse a recurring 30–60 minute task into a reviewed one-liner. That is a measurable onboarding/ticket-time lever, not a feature..editorconfig, .distignore, .gitignore, and a --ci=<circle|gitlab|bitbucket|github> CI config. That makes it a cheap mechanism for making conventions the path of least resistance across squads and agencies.wp scaffold plugin-tests and wp scaffold theme-tests (PHPUnit config, bin/install-wp-tests.sh, bootstrap, sample test, PHPCS ruleset) are the highest-leverage part of this package. If "we have no automated tests on legacy WordPress code" is on your roadmap, this is a same-day starting point rather than a quarter-long initiative.wp scaffold is no longer recommended for modern WordPress, and wp scaffold block is explicitly deprecated in favor of @wordpress/create-block. That is a decision input: scope this tool to CPT/taxonomy generation and test scaffolding, and route new block/theme work to the modern toolchain. It also caps how much roadmap you should attach to it.php artisan make:*, published package stubs, and Pest/PHPUnit bootstrapping — not this package. Confirm the stack before it enters a plan.Consider it when:
--raw, --theme=<slug>, and --plugin=<slug> cover both snippet-paste and file-generation workflows.WP_TESTS_DIR as the documented integration point.wp scaffold child-theme --parent_theme=<slug>) or an _s-based theme with --sassify / --woocommerce options.--force, and can --activate / --enable-network for automated environment setup.Look elsewhere when:
@wordpress/create-block; wp scaffold block is deprecated and will produce outdated build configs.Gruntfile.js and grunt-wp-i18n / grunt-wp-readme-to-markdown, which is dated relative to @wordpress/scripts.To executives (30 seconds): This is a free, already-installed command-line tool that generates standard WordPress code — custom post types, taxonomies, plugin and theme skeletons, and test/CI configuration. It costs nothing to adopt, carries no new vendor or security surface, and shaves routine setup hours off every WordPress project. It is not a product differentiator and not a strategic bet; it is plumbing that makes engineers faster and makes our code more consistent. Expect modest, compounding time savings and better test coverage on legacy work — not new capability.
To engineering leadership: Adopt it as the default for two things — CPT/taxonomy registration code and PHPUnit/CI bootstrapping — because those are stable, well-tested, and immediately useful. Do not standardize on it for new plugin, theme, or block scaffolds; the maintainers have flagged those paths as superseded by @wordpress/create-block and modern build tooling. Frame it as "one command replaces a wiki page," and set the expectation that we may outgrow the scaffolding half of it.
To the engineering team: Treat the tool as a starting point, not an authority. Generated files should be reviewed and committed like any other code; --force overwrites, so guard it in scripts. The real win is the test harness — wp scaffold plugin-tests --ci=github gets a plugin from zero to a running PHPUnit suite and a CI pipeline in one step, which is the shortest path we have to closing the "untested legacy code" gap.
Risk statement to include in any approval: one known deprecation (wp scaffold block) and one explicit maintainer caveat (plugin/theme scaffolding "no longer recommended" for modern WordPress). Mitigation: restrict usage to non-deprecated commands and keep an exit ramp to @wordpress/create-block and a maintained starter template.
How can I help you explore Laravel packages today?