Integrate Composer
Integrate composer.json and install all package dependencies through it.
Details:
- Install composer in the dockerfile
- Add a composer.json, configure packagist and install folders and move plugins there
- In the init script replace plugins installation from
wp cli
tocomposer install/upgrade
, and addwp plugin activate
instructions where needed
More info:
- Our local image init script: https://gitlab.cern.ch/wordpress/wordpress-image/-/blob/master/root/usr/share/container-scripts/php/pre-start/10-install-wordpress.sh?ref_type=heads
- Example how to install plugins via composer for WP: https://support.platform.sh/hc/en-us/community/posts/16439679495314-How-to-install-Wordpress-plugins-and-themes-with-Composer and https://docs.platform.sh/guides/wordpress/composer/migrate.html
- Packagist for WordPress: https://wpackagist.org/
- Activate WP plugins https://developer.wordpress.org/cli/commands/plugin/activate/
Edited by Carina Antunes