On a shared server with Composer installed the template for installing Drupal 8 or Drupal commerce creates a project directory and puts the site in a web directory within the project.

On a shared host with a structure like:


with home private tmp ssl web

How do you use composer to install 3 or more Dupal sites like this?

example.com example.com/mystore example.com/dev

If you run the composer install from the web directory /var/www/example.com/web the install paths are:

example.com/projectname/web example.com/mystore/web example.com/dev/web

and projectname, mystore and dev are not a protected directory.

Running composer from /var/www/example.com does not work

1 Answer 1


Went back and installed the drupal 8 tar.gz (without composer or drush) for the 3 directories I wanted and ran composer from each directory to update and then installed commerce.

After installing the tar.gz

ran: composer config repositories.drupal composer https://packages.drupal.org/8

then: composer require "drupal/commerce 2.x-dev"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.