If you are using Composer to manage Wordpress, simply use the composer
CLI to add the plugin or theme to your composer.json
and composer.lock
files and commit them to your project repository. They will be installed automatically at build time.
# Plugin
$ composer require wpackagist-plugin/cache-control
# Theme
$ composer require wpackagist-theme/neve
If you are not using Composer, you can commit the plugin or theme to your repository and copy the files to the appropriate directory in wordpress/wp-content/
in your build hook.
hooks:
build: |
rsync -a plugins/* wordpress/wp-content/plugins/
For more information on this feature, please see the following page in the Platform.sh documentation:
https://docs.platform.sh/guides/wordpress/composer/migrate.html