One command creates a complete WordPress development environment with your custom plugin, ready to code in minutes.
npx github:ChrisRArendt/create-wp-pluginAnswer a few questions about your plugin, and you'll get:
- Full WordPress installation (latest version)
- Your custom plugin scaffolded and activated
- Development environment running (Lando + Docker)
- Modern build pipeline (Webpack)
- Testing framework (PHPUnit + Jest)
- Code quality tools (PHPCS, PHPStan, ESLint)
Setup time: ~3 minutes from command to coding.
The generator creates a full WordPress installation with your plugin already integrated:
- WordPress: Latest version, installed and configured
- Lando: Containerized environment with PHP, MySQL, phpMyAdmin, MailHog
- Build Pipeline: Webpack with hot reloading for development
- Testing: PHPUnit for PHP, Jest for JavaScript
- Code Quality: PHPCS (WordPress standards), PHPStan (level 8), ESLint, Prettier
- CI/CD: GitHub Actions workflows ready to use
your-project/
├── wordpress/ # Full WordPress installation
├── plugin/ # Your plugin source code
│ ├── src/ # PHP classes (PSR-4 autoloaded)
│ │ ├── Plugin.php
│ │ ├── Admin/
│ │ ├── Frontend/
│ │ └── Integrations/
│ ├── assets/
│ │ ├── src/ # JavaScript & SCSS source
│ │ └── dist/ # Built assets
│ ├── tests/
│ │ ├── php/ # PHPUnit tests
│ │ └── js/ # Jest tests
│ ├── composer.json
│ ├── package.json
│ └── webpack.config.js
└── .lando.yml # Development environment config
Choose what you need during setup:
- Elementor: Custom widget boilerplate
- Advanced Custom Fields: Field groups and blocks
- Gutenberg: Custom block examples
- WooCommerce: Integration templates
- REST API: Endpoint examples
- Alpine.js: Reactive components
npx github:ChrisRArendt/create-wp-pluginYou'll be prompted for:
- Project name and folder
- Plugin details (name, description, author)
- Company name (used for namespaces and URLs)
- WordPress and PHP versions
- Which integrations and features to include
cd your-project
# Start WordPress environment
lando start
# Watch and rebuild assets (in another terminal)
cd plugin
npm run dev
# Your site is ready
# https://your-project.lndo.site
# https://your-project.lndo.site/wp-adminlando wp # WP-CLI
lando composer # Composer
lando npm # npm
lando build # Build production assets
lando dev # Watch mode
lando phpcs # Check PHP standards
lando phpstan # Static analysis
lando phpunit # Run PHP tests
lando test # Run all tests- PSR-4 autoloading with Composer
- Modern PHP 8.0+ features and type hints
- Object-oriented plugin structure
- Namespaced code
- Dependency injection ready
PHP:
- WordPress Coding Standards (PHPCS)
- PHPStan at level 8
- PHPUnit with code coverage
JavaScript:
- ESLint with WordPress config
- Prettier formatting
- Jest testing
- Babel transpilation
Generated projects include GitHub Actions that:
- Run tests on push and pull requests
- Test multiple PHP versions (8.0-8.3)
- Test multiple WordPress versions
- Create releases automatically on git tags
# Release workflow
git tag v1.0.0
git push origin v1.0.0
# GitHub Actions builds and releasesThe generator pulls the latest versions when you run it:
- Latest WordPress version
- Current PHP recommendations
- Up-to-date npm packages
- Fresh Docker images
Run it today or in 5 years—you'll get a modern setup.
$ npx github:ChrisRArendt/create-wp-plugin
? Plugin name: Simple Widget
? JavaScript approach: vanilla
? Integrations: (none)
# Clean, minimal plugin$ npx github:ChrisRArendt/create-wp-plugin
? Plugin name: Advanced Plugin
? JavaScript approach: both
? Integrations: elementor,acf,gutenberg
? Features: rest-api,custom-post-types
# Complete plugin with all integrationsThe generator itself has comprehensive tests:
- Unit Tests (27): Core logic and functions
- Template Validation (48): File integrity and placeholders
- Integration Tests (31): Full project generation
- E2E Tests (CI): Real WordPress environment
Total: 106 tests
# Run all tests
./scripts/test-local.sh
# Specific suites
npm run test:generator:unit
npm run test:generator:validation
npm run test:generator:integrationSee docs/TESTING.md for details.
Can I use this with existing WordPress?
No, it creates a fresh WordPress install. Copy the generated plugin folder to any WordPress site.
Do I need to know Lando/Docker?
No. Just have them installed—the template handles configuration.
Can I modify the generated code?
Yes, it's your code. Modify anything.
Works on Windows/Mac/Linux?
Yes, wherever Docker runs.
How do I deploy?
Run npm run build in the plugin folder, then ZIP it. Or use the GitHub Actions release workflow.
"Lando not found"
Install from lando.dev
"Docker not running"
Start Docker Desktop.
"Port already in use"
lando poweroffPlugin won't activate
Check logs with lando logs. Common fixes:
lando composer installlando rebuild -y
Assets not building
cd plugin
npm install
npm run buildNeed help?
- Node.js 24.x (LTS)
- Lando 3.x+
- Docker (running)
- Composer 2.x (optional)
- Git (recommended)
Contributions welcome! See CONTRIBUTING.md for guidelines.
GPL v2 or later
Created by Christopher Arendt
Built with:
Happy coding!