0

I installed Drupal via the following command.

composer create-project drupal-composer/drupal-project:8.x-dev
projectfolder --stability dev --no-interaction

As a result I'm getting this structure.

../projectfolder/vendor/drupal

../projectfolder/vendor/bin/drush

../projectfolder/web/

etc. ...

Perfect structure, but what I'm missing the index.php file. Also, the common files like sites/default/settings.php are not part of my install or perfectly hidden.

How can I get those files? What I'm doing wrong? I tried to use Drush for an standard site-install, but it failed also.

4 Answers 4

2

That's exactly what drupal-project does. Your index.php should be at projectfolder/web/index.php.

Personally, I like this approach because it provides one directory level above your site root. This makes a good, secure place for files (settings, private file system) that should never be served directly by your web server.

The drupal-project composer template uses this level above your site root to install composer dependencies and tools like Drush and DrupalConsole. That's nice because when you bundle these tools with the project (instead of using a globally installed Drush for instance), you can always be sure that your colleagues are using the exact same version.

1
  • When I git clone our repo and run composer install when it completes I'm not seeing index.php in the web folder. If I run compose update I do see it, but of course my composer.lock file would have been updated. Oct 16, 2016 at 21:04
1

After installing just run composer drupal:scaffold after running composer install would fix it temporarily.

0

All those missing things should be in your ../projectfolder/web/ folder. Composer installs all the vendor files out of the web root.

0

In my case I had composer installed via the Ubuntu (15.10) repository version. This seems to work but Drupal was incomplete (without index.php, but complete vendor directory).

The version composer from https://getcomposer.org/download/ worked for me.

Thank you all!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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