What's the purpose of the directories used from Drupal?
2 Answers
I haven't seen one, so let's start a list right here. In Drupal 5, 6 and 7 the structure looks like this:
- includes - include files with php functions and classes that make up the Drupal API
- misc - miscellaneous assets like javascript files and images
- modules - Drupal core modules (not meant for contrib and custom modules)
- profiles - installation profiles
- scripts - shell scripts for developers and administrators
sites - all files that are added by a developer to create a site
- sites/all/libraries - 3rd party libraries, eg. a wysiwyg editor
- sites/all/modules - contributed and custom modules
- sites/all/themes - contributed and custom (sub)themes
- sites/default - contains the default settings.php
- sites/default/files - the default directory for user-uploaded files
- sites/example.com/modules - the site-specific modules directory in a multisite structure
- sites/example.com/themes - the site-specific themes directory in a multisite structure
- sites/example.com/files - the site-specific directory for user-uploaded files in a multisite structure
- themes - Drupal core themes
The accepted answer is good. This is just my two cents to expand other answers, as a site developer on Drupal 7. It is easier to navigate when upgrading many custom modules, few features, and parent/custom sub-themes.
- sites/all
- /modules
- /contrib
- /custom
- /features
- /libraries
- /themes
- /modules
- sites/example.com
- same as sites/all/* with site-instance specific needs when appropriate
-
I want exactly the same thing on Drupal 7 that you have mentioned in your answer but i am wondering how can i install new module in
sites/all/modules/custom
directory. Please help on this. Commented Nov 21, 2013 at 7:11 -
I really havent tried placing modules to custom directory with drupal ui (ftp). I just ftp/ssh them there directly or assign it in makefile. As a sidenote installation and making module available are different thing as latter implies system modifications. Commented Nov 24, 2013 at 18:53