You are hereBlogs / Slim's blog / Directory Structure and Naming Conventions for Web Development

Directory Structure and Naming Conventions for Web Development

By Slim - Posted on 28 August 2009

On my path to becoming a better developer. This is the directory structure and file naming conventions to implement a website with Drupal 6. We will map the directories in another message.


Mercurial web store directory structure

the mercurial web store directory



my drupal base mercurial store where all the base files for drupal 6.x are held



my drupal all store where common modules for all my sites are stored



the directory for mercurial tracked websites



my drupal default store where the skeleton for website specific files, modules, and themes are held:




This is the place where I build and configure a drupal site from store for development on dev server.


The directory for my development workspace:



the directory to house drupal sites within drupal application



the drupal sites/all directory where common modules across many drupal sites are shared




This is where the final copy of the site is before syncing it with the production copy on client account without the mercurial store. This is created with the command "hg archive".



The directories are generated at the end of development cycle and very unstable. These directories are to prep for the syncing on clients host.


Naming conventions

The naming of the websites are the FQDN


Example for



The naming convention for staging is the base name and revision



hg archive /var/www/stage/%b-%R


Now these naming conventions may change over time, but here are the basics. Next will be the mapping of directories.