Drupal 7 Folder Structure & important files

Drupal 7 Folder Structure & important files

Drupal 7 Folder Structure & important files, Here you can learn about Drupal 7 directory structure and files, what are the important files and folder, for security reasons what permissions you should maintain. Where your modules, themes are found in drupal root directory.

Drupal 7 Folder Structure & important files is an article in the series of Step by step guide to learn drupal7.

#Part 1 @ Day 5

Drupal 7 Folder Structure & important files

  • /includes
    • /database
      • /mysql
      • /pgsql
      • /sqlite
    • /filetransfer
  • /misc
    • /farbtastic
    • /ui
      • /images
  • /modules
  • /profiles
    • /minimal
    • /standard
    • /testing
    • /scripts
  • /sites
    • /all
      • /modules
      • /themes
    • /default
      • /files
        • /field
        • /pictures
        • /styles
  • /themes

Drupal 7 directories are:

  • 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
  • themes

The php files in the root directory are:

  • authorize.php
    • authorize.php is an administrative script for running authorized file operations— for example, downloading an installing a new theme or module from Drupal.org.
  • cron.php
    • cron.php is used for executing periodic tasks, such as pruning database tables and calculating statistics.
  • index.php
    • index.php is the main entry point for serving requests.
  • install.php
    • install.php is the main entry point for the Drupal installer.
  • update.php
    • update.php updates the database schema after a Drupal version upgrade.
  • xmlrpc.php
    •  xmlrpc.php receives XML-RPC requests and may be safely deleted from deployments that do not intend to receive XML-RPC requests.

includes directory in drupal 7

The ‘includes’ directory contains many ‘.inc’ files which are written in php (like the vast majority of Drupal code) and provide much of Drupal’s infrastructure.  There is a new directory titled ‘database’ that houses the logic behind Drupal’s new abstracted database system.  There is another new directory called ‘filetransfer’ which would logically contain code related to moving files in and out of the Drupal file system.

misc directory in drupal 7

As its name would imply, the ‘misc’ directory contains a lot of random files that don’t fit anywhere else.  There are random images that are used within Drupal (e.g. checkmarks, throbber gifs, etc.).  There are also a lot of Javascript files that provide some of the jQuery flashiness that comes with Drupal (e.g. tabledrag.js).  There is a ‘ui’ directory that appears to contain the jQuery UI library.  This library is essentially an extension of the conventional jQuery Jasvascript library, providing many of the usual features that a developer would want in a user interface.

sites directory in drupal 7

The sites directory (see Figure Sites Directory below) contains your 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.

Main directory and file structure in drupal 7

Drupal 7 Folder Structure & important files

File and Directory structure in Drupal 7 root directory

Drupal 7 directory structure with sub directories.

Drupal 7 directory structure with sub directories

Drupal 7 directory structure with sub directories

I hope this article helped you to learn drupal 7 file & folder structure. Drupal 7 Folder Structure & important files is an article in the series of Step by step guide to learn drupal7. To get latest news and updates follow us on twitter & facebook, subscribe to newsletter. If you have any feedback please let us know by using comment form.

https://yandex ru/clck/jsredir?from=yandex ru;search;web;;&text=&etext=1831 NhJ7m2U7oD_zslCXTRA5U5nRtYVf4rBFLuacdqjDV_8SqBm5yIBpGO-h3mBJ2I76 be4f3a95a659d08226f4d7395f0cf045a56c161e&uuid=&state=_BLhILn4SxNIvvL0W45KSic66uCIg23qh8iRG98qeIXme
Vivek Vengala

Vivek Vengala is a Online Entrepreneur, Web Developer from Hyderabad India.

Click Here to Leave a Comment Below 0 comments

Leave a Reply: