Skip to content

Commands

The commands you'll actually type while building a Divi Extension.

Scaffolding

bash
# Run inside wp-content/plugins/ to scaffold a new extension
npx create-divi-extension

The CLI will prompt for:

  • Plugin name (human-readable, e.g. "Simple Header Pack")
  • Plugin slug (kebab-case, e.g. "simple-header-pack")
  • Author info

Inside the extension plugin folder

bash
# Install dependencies (run once after scaffolding)
yarn install
bash
# Start the dev watcher — recompiles JSX on save
yarn start
bash
# Production build
yarn build
bash
# Package the plugin as a .zip ready for distribution
yarn zip

Translation maintenance (release-time)

bash
# Regenerate translation .pot file (requires gettext installed)
yarn po

Docker (for the local WordPress environment)

bash
# Bring up the official Divi development environment
docker-compose up -d
bash
# Stop the environment
docker-compose down
bash
# Tail container logs
docker-compose logs -f

Cross-references

  • The dev environment expects NodeJS LTS, Yarn, and gettext — see Divi Development Environment.
  • The yarn start watcher is required before you'll see JSX changes in the visual builder.

Reference compiled from publicly available Divi developer documentation.