(WIP) Enables installing WP plugins via Composer 2 (or Composer 1) inside johnpbloch/wordpress
. Replaces drupal-composer/preserve-paths
.
- PHP 7.2 - 8.3 is supported
- Composer 1 & 2 is supported
mkdir your-project && cd your-project
composer init
- Add the following to your
composer.json
extra section:
{
"extra": {
"wordpress-install-dir": "public",
"installer-paths": {
"vendor-wp/wp-content/plugins/{$name}/": ["type:wordpress-plugin"],
"vendor-wp/wp-content/themes/{$name}/": ["type:wordpress-theme"],
"vendor-wp/wp-content/mu-plugins/{$name}/": ["type:wordpress-muplugin"],
"vendor-wp/wp-content/{$name}/": ["type:wordpress-dropin"]
},
"agilo-wp-package-installer": {
"sources": {
"third-party": {
"src": "vendor-wp",
"dest": "public",
"mode": "symlink"
}
}
}
}
}
composer require agilo/wp-package-installer
composer require johnpbloch/wordpress
- Run
composer install --working-dir=tools/php-cs-fixer
- Run
./tools/php-cs-fixer/vendor/bin/php-cs-fixer fix
- Run
composer install --working-dir=tools/phpunit
- Run
./tools/phpunit/vendor/bin/phpunit