Composer - A Terminus plugin for running Composer commands on a Pantheon site
Adds a command 'composer' to Terminus 1.x which you can use just like 'drush' or 'wp'. For a version that works with Terminus 0.x, see the 0.x branch.
This project is a simplified version of the original Terminus Composer Plugin by Brian Thompson, updated for Terminus 1.x.
If using Composer to manage your site on Pantheon, it is best to start with the appropriate relocated document root Composer example project:
- WordPress: Advanced WordPress on Pantheon
- Drupal 8: Example Drops-8 Composer
- Drupal 7: Example Drops-7 Composer
Using Composer to manage standard sites on Pantheon not started with these upstreams (or a similar variant thereof) is not recommended. Ensure that your site's pantheon.yml contains
web_docroot: true. See Serving Sites from the Web Subdirectory for more information.
terminus composer my-script
Commands such as
composer require and
composer update take a lot of memory, and are likely to fail when run on the platform. Some problematic examples appear below:
terminus composer my-site.dev -- composer config repositories.drupal composer https://packages.drupal.org/8
terminus composer my-site.dev -- require drupal/media
terminus composer my-site.dev -- update
For help installing, see Manage Plugins
mkdir -p ~/.terminus/plugins composer create-project --no-dev -d ~/.terminus/plugins pantheon-systems/terminus-composer-plugin:~1
terminus help composer for help.