I am installing Open Social on Drupal 8 on my own Ubuntu Linux instance with Nginx, MySQL and PHP 7. Got the "Quick install" instructions using composer and drush completed successfully.

As a relative n00b to Drupal, there is a small gap in the documentation. You can complete an installation on a server using drush and you get a "site built" message - with everything in a directory in my user account. I'm looking at that, and looking at /var/www/html (which is where my public facing web server successfully serves traffic) and I think - eh - what now? The documentation does an exit stage left right there.

Same in the standard Drupal docs. The main clue is where you get vectored off to the procedure to create a dev site from a running production one (ie: the wrong way around). Which sort of suggests that you put the whole tree in the /var/www/html directory into an html/ subdirectory, but then hand edit settings.php to match the database credentials on your newly restored db backup.

So, to get the site running internet facing, is it as simple as moving the whole tree in my local directory under html/ to /var/www/html recursively, and then dragging a settings.php file up to the top level from ./sites/default/settings.php, then editing in the database credentials?

If I do move the website wholesale, nginx just http 500's the web site. Just working through some of the directory assumptions that composer uses... getting autoload.php failing to find a file at line 17.

  • Yes, moving everything from ~user/html to /var/www/html should still work with Drupal 8. Actually, I would move ~user/html to /var/www/drupal8 and change the documentroot in the webserver config. However, you must also move the vendor directory as pointed out below - to /var/www/vendor. (There is no need to move settings.php.) To get further we need to know the 500 error - check the webserver error log - and we need know the autoload error. And your exact layout of /var/www ...
    – hansfn
    Commented Dec 28, 2017 at 9:44
  • You have to mod the Nginx settings in to enable clear URLs and private files to work - I’ll put the suggestions in to add the instructions to the docs.
    – Ian Waring
    Commented Dec 29, 2017 at 10:44
  • Funny, I didn't realize that Ian answered his own question. My comment didn't make much sense then ...
    – hansfn
    Commented Dec 29, 2017 at 13:09

1 Answer 1


The answer is that you have to copy the html/ and vendor/ directory trees from your project under var/www, and in theory it works. Except for me that it doesn't, as it just steps onto the next error where the stylesheet doesn't load properly (error in MIME types)... but that's the next story!

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.