Install drupal 8 project with composer using default template and modify where document root is other than web

This would require you to install composer first, then follow the below command to create a Drupal 8 project with composer.

composer create-project drupal-composer/drupal-project:8.x-dev testing.com --stability dev --no-interaction --no-install

The above command will create a Drupal 8 project with a folder name testing.com. Now make the following changes in composer.json.

Under "extra→installer-paths, look for "web/core": ["type:drupal-core"], replace all instances of web with your folder name, for example, docroot.

Then run "Composer Install"

This will download Drupal 8 code with its dependencies defined in the composer.json file.

0/5