Directory structure with a composer-built Drupal site

Typically a Composer-built Drupal 9 site will have a directory structure like this:


The codesbase for the site is in /web and the Composer-related directories and files are outside but at the same level as the web root.

DreamHost replaces this path: /var/www/sites/html elsewhere

with this path: /home/myusername/

If I build a Drupal site locally with DDEV and want to upload it to DH for production, do I:

  • Simply upload the contents of /web to /home/myusername/ and ignore the Composer-specific pieces?
  • Put /vendor, /composer.json, /composer.lock into /home/myusername at the same level as
  • Put the entire project into and somehow (???) make the server point to /home/myusername/projectname/web


I think this last one would be the natural thing to do:

On the DH Panel, you can set the web-directory to any path in the Manage-Domains section:

1 Like

Thank you very much.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.