Drupal File Structure

includes folder

Contains libraries of common function that Drupal does.

misc folder

Contains the core modules, with each module in its own folder.

profiles folder

Contains different installation profiles for a site. If there are other profiles besides the default profile in this subdirectory, Drupal will ask you which profile you want to install when first installing your Drupal site.

scripts folder

Contains scripts for checking syntax, cleaning up code, running Drupal from the command line, and handling special cases with cron.

sites folder

Contains the user modifications to Drupal in the form of settings, modules, and themes. When you add modules to Drupal from the contributed modules repository or by writing your own, they go into sites/all/modules.
This keeps all your Drupal modifications within a single folder. Inside the sites directory will be a subdirectory named default that holds the default configuration file for your Drupal site—default.settings.php. The Drupal installer will modify these original settings based on the information you provide and write a settings.php file for
your site. The default directory is typically copied and renamed to the URL of your
site by the person deploying the site, so your final settings file would be at sites/www.example.com/settings.php.

themes folder

The themes folder contains the template engines and default themes for Drupal.
Additional themes you download or create should not go here; they go into

cron.php file

cron.php is used for executing periodic tasks, such as pruning database tables and
calculating statistics.


main entry point.


main entry point for the Drupal installer.


Updates the database schema after a Drupal version upgrade.


Receives XML-RPC requests and may be safely deleted from deployments that
do not intend to receive XML-RPC requests.


Default implementation of the robot exclusion standard.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.