Download the PHP package convertiv/composer-wordpress without Composer
On this page you can find all versions of the php package convertiv/composer-wordpress. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download convertiv/composer-wordpress
More information about convertiv/composer-wordpress
Files in convertiv/composer-wordpress
Package composer-wordpress
Short Description This library fills a gap when using wordpress with composer. Previously, packages like Drupal's preserve paths composer plugin closed this gap, but with Composer 2's parallel operations, preserve paths creates a race condition.
License MIT
Informations about the package composer-wordpress
ComposerWordPress Plugin
This is a Composer plugin that copies packages (in our case WordPress plugins, mu-plugins and themes) from a specified source path to a specified destination path, as defined in the composer.json
file.
Installation
You can install this plugin by doing the following:
1. Setup in the composer.json file of your project
Add the following configuration to your composer.json
file:
The wordpress-install-dir key defines the path to the WordPress installation directory which is installed using John Bloch's WordPress package.
the installer-paths key defines the paths to the WordPress packages to be copied. We're copying the WordPress packages to the bin/composer_wordpress_vendor/wp-content directory.
The composer-custom-install-path-src key defines the path to the source directory containing WordPress packages to be copied, and the composer-custom-install-path-dest key defines the path to the destination directory where the packages will be copied.
The plugin will automatically run during the post-install-cmd and post-update-cmd events, and will copy the WordPress packages from the source path to the destination path.
2. Run the following command to install the plugin:
Composer installer will ask whether you trust the plugin:
Type y
to allow the plugin to be used.
After this setup is done, the plugin will be used to copy WordPress packages from the source path to the destination path during composer install
and composer update
.
4. Add the folder path used in composer-custom-install-path-src to your .gitignore file
If you used bin/composer_wordpress_vendor/wp-content as the path, add the following to your .gitignore file:
License This plugin is licensed under the MIT License. For more information, see the LICENCE file.