I want a folder structure similar to:


In composer I can specify installer paths to put required modules in the /web/app/modules directory and install drupal core in the /web/core.

Can I get Drupal to look for themes and modules in the /web/app/themes and /web/apps/modules directories so I don't have to put anything custom inside the core directory (so Drupal core can be installed as a package and not stored in my git repo).

I've seen similar set ups with Wordpress allowing you to specify a 'CONTENT_DIR' constant that means Wordpress will look for wp-content in a different directory. Is there a similar way for Drupal?

I found this on git which achieves something but it requires a custom script https://github.com/davidbarratt/drupal-structure

1 Answer 1


Drupals extensions discovery looks only in some specific folders (see http://cgit.drupalcode.org/drupal/tree/modules/README.txt for more information).

But, you don't have to put your own modules inside of the core folder. You should use /modules instead.

The Drupals default directory is not ideal for a development workflow with composer in mind. Take a look at https://github.com/drupal-composer/drupal-project if you have not already.

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.