
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
create-wordpress-block
Advanced tools
Generates PHP, JS and CSS code for registering a block for a WordPress plugin or theme.
Generates PHP, JS and CSS code for registering a block for a WordPress plugin or theme.

Blocks are the fundamental element of the WordPress block editor. They are the primary way in which plugins and themes can register their own functionality and extend the capabilities of the editor.
Visit the Gutenberg handbook to learn more about Block API.
The following command generates PHP, JS and CSS code for registering a block.
$ npm init wordpress-block [options] [slug]
[slug] is optional. When provided it triggers the quick mode where it is used as the target location for scaffolded files and the internal block name. The rest of the configuration is set to all default values.
Options:
-t, --template <name> template type name, allowed values: "es5", "esnext" (default: "esnext")
-V, --version output the version number
-h, --help output usage information
Examples:
slug which is the target location for scaffolded files
and the internal block name.$ npm init wordpress-block todo-list
$ cd todo-list
$ npm init wordpress-block
$ npm init --template es5 wordpress-block
When you scaffold a block, you must provide at least a slug name, the namespace
which usually corresponds to either the theme or plugin name, and the category. In most cases,
we recommended pairing blocks with plugins rather than themes, because only using
plugin ensures that all blocks still work when your theme changes.
Another way of making a developer’s life easier is to use WP-CLI,
which provides a command-line interface for many actions you might perform on
the WordPress instance. One of the commands wp scaffold block was used as
the baseline for this tool and ES5 template in particular.

FAQs
Generates PHP, JS and CSS code for registering a block for a WordPress plugin.
The npm package create-wordpress-block receives a total of 32 weekly downloads. As such, create-wordpress-block popularity was classified as not popular.
We found that create-wordpress-block demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.