SlideShare a Scribd company logo
The CivicActions Drupal Directory Structure Gregory Heller (@gregoryheller on twitter) CivicActions.com Seattle Drupal User Group (#seadug) May 2009
Default Drupal Setup If you download and unzip drupal, usually you will put it in public_html: /public_html/ ( drupal core live here) /public_html/sites /public_html/sites/all/modules /public_html/sites/default
Default Drupal: Pros/Cons Its easy: it comes this way You don't need to think about it much Works fine for a single site Core upgrades made more difficult.  sites directory must be copied and moved repeatedly
CivicActions Directory Structure We run 3 versions of each site: dev, qa, live.  All run off the same version of core. Active development takes place on dev (new modules, theme changes first tested there). SVN Tags gets cut and moved to QA for more testing. The tag then is released to Live.
CivicActions Directory Structure You don't need to run your setup like this, or use SVN to reap the benefits of the CivicActions Directory Structure.
CivicActions Directory Structure What are the benefits? No need to backup drupal core, you can always download it again. Back up all your sites directories easily and at one No need to move your sites directory for every core upgrade. Possible to run multiple versions of core for different sites off the “same” multi site.
CivicActions Directory Structure Limitations and Drawbacks: Some hosting companies don't let you access anything outside of your web root. Get a new hosting company. Some webhosts have limitations on the number (depth) of symlinks ( symlink1  =>  sym2  =>real_file doesn't work). You can modify the structure a bit while still reaping the benefits.
CivicActions Directory Structure These are all real directories (at the same level): /public_html/ /drupal/nobackup/ /drupal/nobackup/6.11 /sites/ /sites/all /sites/example.com
CivicActions SymLinks Symlinks (short for “symbolic links”) are your friend. They're like “shortcuts”. Create them with the following command: $ ln -s target/directory symlink See where they point with:  $ ls -la where “target/directory” is the directory or file you want to link to, and “symlink” is the link
CivicActions SymLinks Structure /public_html/ example.com  => ../drupal/nobackup/ 6 this symlink sends apache requests from your public_html directory to drupal/nobackup/6 /drupal/nobackup/ 6  => 6.11  (/drupal/nobackup.6.11) this symlink sends requests from “6” to “6.10” allowing you to easily switch to a new version of drupal core /drupal/nobackup/6.11/ sites  => ../../../sites this symlink points to a sites directory outside of drupal core, which means you don't have to move the “sites” directory each time you upgrade core, and also makes it easier to backup sites (your contrib modules and files)
What does your Sites Directory Look Like? This is no different from a “standard” multisite setup. Drupal “knows” which site to serve up based on the apache referral. All sites can access the modules and themes in the /sites/all directory. Notice there is no “default” directory! /sites/all /sites/all/modules/contrib /sites/all/modules/custom /sites/example.com /sites/example.com/modules/contrib /sites/example-two.com /sites/example-two.com/modules/contrib
Advanced Tricks: Staging Sites Sometimes you will have a staging site like drupal.example.com because your client is not ready to launch. In your sites directory you can symlink  drupal.example.com  => example.com When the time comes to launch the site, all you need to do is point the final domain at your drupal core install (which means, at the symlink in public_html that points to drupal/nobackup/ 6 )
Recap apache request for example.com goes to  public_html/ example.com  which symlinks to  ../drupal/nobackup/ 6  which symlinks to  drupal/nobackup/6.11 Drupal looks in  / sites   which symlinks to  ../../../sites  for example.com and finds it, and  settings.php  which points to the right database, and all the modules and themes live in that directory ( /sites/example.com  or  /sites/all ).

More Related Content

PPT
Introduction to Module Development (Drupal 7)
KEY
Building a Mobile Drupal Site
ODP
Let's Take Drupal Offline!
PPTX
Top 20 mistakes you will make on your 1st Drupal project
PPTX
Using Bootstrap in Drupal 7
KEY
Simplifying End-user Drupal 7 Content Administration
PPTX
Drupal is from Mars, Wordpress is from Venus: Finding your library's CMS soul...
PDF
Introduction to Drupal 7 - Panels
Introduction to Module Development (Drupal 7)
Building a Mobile Drupal Site
Let's Take Drupal Offline!
Top 20 mistakes you will make on your 1st Drupal project
Using Bootstrap in Drupal 7
Simplifying End-user Drupal 7 Content Administration
Drupal is from Mars, Wordpress is from Venus: Finding your library's CMS soul...
Introduction to Drupal 7 - Panels

What's hot (20)

PDF
Introduction to Drupal 7 - Performance optimization
PPT
Open Source Content Management Systems
PPT
Drupal
PDF
Media handling in Drupal (Drupalcamp Leuven 2013)
PPTX
Difference Between Drupal 6 vs drupal 7
PDF
Drupal 6 to 7 migration guide
PPT
Taking your site from Drupal 6 to Drupal 7
PPT
Drupal Distributions
PDF
The Foundations of Being Sassy in Drupal
PPTX
How to Create a Drupal 8 Theme Using Bootstrap
PDF
Drupal Step-by-Step: How We Built Our Training Site, Part 2
PPT
Beginner's guide to drupal
PDF
Bootstrap base theme for Drupal 7
PPTX
Drupal 7 Search Engine Optimisation
PDF
Deployer - Deployment tool for PHP
PPTX
Using Foundation with Drupal
PDF
An Introduction to Drupal
PDF
Anton Faibyshev - Drupal 8: lazy builder. What we need to build a house - we ...
PPTX
Drupalcampatl d7
PDF
Put a little Backbone in your WordPress vs. 3
Introduction to Drupal 7 - Performance optimization
Open Source Content Management Systems
Drupal
Media handling in Drupal (Drupalcamp Leuven 2013)
Difference Between Drupal 6 vs drupal 7
Drupal 6 to 7 migration guide
Taking your site from Drupal 6 to Drupal 7
Drupal Distributions
The Foundations of Being Sassy in Drupal
How to Create a Drupal 8 Theme Using Bootstrap
Drupal Step-by-Step: How We Built Our Training Site, Part 2
Beginner's guide to drupal
Bootstrap base theme for Drupal 7
Drupal 7 Search Engine Optimisation
Deployer - Deployment tool for PHP
Using Foundation with Drupal
An Introduction to Drupal
Anton Faibyshev - Drupal 8: lazy builder. What we need to build a house - we ...
Drupalcampatl d7
Put a little Backbone in your WordPress vs. 3
Ad

Viewers also liked (20)

PDF
用Erlang构建容错系统
PPT
Maggie Valley NC Trip, revised
PPTX
Nu2014 mooc ossiannilsson creelman_ehlers
PPTX
Ossiannilsson medfak sida_lu2014
ODP
High availability + high performance
PPTX
Iso sis ossiannilsson2014
PPS
Lavoro etica sviluppo
PPTX
Open & Shut: Leadership in the Social World
PDF
Ossiannilsson medfak sida_ipt_march2016
PPTX
PPTX
Ossiannilsson 140422 lnu
PDF
РИФ 2016, Рейтинг Mail.ru - аналитический сервис для вашего бизнеса
PDF
Ossiannilsson tiim2011 boldic session
PDF
РИФ 2016, Всегда ли новое лучше старого или какую игру выбираешь ты?
PDF
Food apps competitive analysis (Apr 2011)
PPTX
Ossiannilsson sequent master class barcelona2014
PPT
I am
PPTX
Ossiannilsson130820 miun
PPT
curiculum vitae - edwina
PPTX
Ossiannilsson fbf 210915
用Erlang构建容错系统
Maggie Valley NC Trip, revised
Nu2014 mooc ossiannilsson creelman_ehlers
Ossiannilsson medfak sida_lu2014
High availability + high performance
Iso sis ossiannilsson2014
Lavoro etica sviluppo
Open & Shut: Leadership in the Social World
Ossiannilsson medfak sida_ipt_march2016
Ossiannilsson 140422 lnu
РИФ 2016, Рейтинг Mail.ru - аналитический сервис для вашего бизнеса
Ossiannilsson tiim2011 boldic session
РИФ 2016, Всегда ли новое лучше старого или какую игру выбираешь ты?
Food apps competitive analysis (Apr 2011)
Ossiannilsson sequent master class barcelona2014
I am
Ossiannilsson130820 miun
curiculum vitae - edwina
Ossiannilsson fbf 210915
Ad

Similar to CivicActions Drupal Directory Structure (20)

PPT
Drupal - Introduction to Drupal Creating Modules
PPT
SynapseIndia drupal presentation on drupal best practices
ODP
Drupal Multi-Site Setup
PDF
Building a Custom Theme in Drupal 8
ODP
Drupal Now! - Introduction to Drupal
PPTX
Top 8 Improvements in Drupal 8
PDF
Improving your Drupal 8 development workflow DrupalCampLA
PPTX
Rapid site production with Drupal
PDF
Introduction to Drupal - Installation, Anatomy, Terminologies
PDF
Introduction To Drupal
ZIP
Building a Drupal Distribution using Features, Drush Make, Installation Profi...
PPT
Doing Drupal: Quick Start Deployments via Distributions
PPTX
Drupal in Libraries
ODP
Making The Drupal Pill Easier To Swallow
ODP
Drupal Multi-site for Fun and Profit
PPT
Drupal: an Overview
ODP
Drupal Theme Development - DrupalCon Chicago 2011
PPTX
Converting (X)HTML/CSS template to Drupal 7 Theme
PDF
Everything You Need to Know About the Top Changes in Drupal 8
Drupal - Introduction to Drupal Creating Modules
SynapseIndia drupal presentation on drupal best practices
Drupal Multi-Site Setup
Building a Custom Theme in Drupal 8
Drupal Now! - Introduction to Drupal
Top 8 Improvements in Drupal 8
Improving your Drupal 8 development workflow DrupalCampLA
Rapid site production with Drupal
Introduction to Drupal - Installation, Anatomy, Terminologies
Introduction To Drupal
Building a Drupal Distribution using Features, Drush Make, Installation Profi...
Doing Drupal: Quick Start Deployments via Distributions
Drupal in Libraries
Making The Drupal Pill Easier To Swallow
Drupal Multi-site for Fun and Profit
Drupal: an Overview
Drupal Theme Development - DrupalCon Chicago 2011
Converting (X)HTML/CSS template to Drupal 7 Theme
Everything You Need to Know About the Top Changes in Drupal 8

More from Gregory Heller (11)

PDF
Agile Project management For Drupal Web Development Projects
PDF
Crowdfunding In The Kitchen - Seattle Chefs Collaborative National Sustainabl...
ODP
Free & Open Source Software For Nonprofits: NTEN Webinar
ODP
SCRUM Project Management For Wedding Planning
ODP
CiviCON Ignite: Gregory Heller on 15 Improvements To CiviCRM
PPT
NTC 2010 "Working With Opensource Software And Vendors"
ODP
"You Don't Need A Website" Ignite NTC 2010 Gregory Heller
PDF
Listening: Free Tools & Techniques for Nonprofit Brand Monitoring
PDF
Social Media Overview and Strategy For NGOs
PDF
Social Media Overview and Strategy For NGOs
PPT
What Makes A Green Cab
Agile Project management For Drupal Web Development Projects
Crowdfunding In The Kitchen - Seattle Chefs Collaborative National Sustainabl...
Free & Open Source Software For Nonprofits: NTEN Webinar
SCRUM Project Management For Wedding Planning
CiviCON Ignite: Gregory Heller on 15 Improvements To CiviCRM
NTC 2010 "Working With Opensource Software And Vendors"
"You Don't Need A Website" Ignite NTC 2010 Gregory Heller
Listening: Free Tools & Techniques for Nonprofit Brand Monitoring
Social Media Overview and Strategy For NGOs
Social Media Overview and Strategy For NGOs
What Makes A Green Cab

Recently uploaded (20)

PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
Machine Learning_overview_presentation.pptx
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
cuic standard and advanced reporting.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
A comparative analysis of optical character recognition models for extracting...
PPTX
MYSQL Presentation for SQL database connectivity
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
sap open course for s4hana steps from ECC to s4
Review of recent advances in non-invasive hemoglobin estimation
Programs and apps: productivity, graphics, security and other tools
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Machine Learning_overview_presentation.pptx
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Reach Out and Touch Someone: Haptics and Empathic Computing
Building Integrated photovoltaic BIPV_UPV.pdf
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
cuic standard and advanced reporting.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Spectral efficient network and resource selection model in 5G networks
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
A comparative analysis of optical character recognition models for extracting...
MYSQL Presentation for SQL database connectivity

CivicActions Drupal Directory Structure

  • 1. The CivicActions Drupal Directory Structure Gregory Heller (@gregoryheller on twitter) CivicActions.com Seattle Drupal User Group (#seadug) May 2009
  • 2. Default Drupal Setup If you download and unzip drupal, usually you will put it in public_html: /public_html/ ( drupal core live here) /public_html/sites /public_html/sites/all/modules /public_html/sites/default
  • 3. Default Drupal: Pros/Cons Its easy: it comes this way You don't need to think about it much Works fine for a single site Core upgrades made more difficult. sites directory must be copied and moved repeatedly
  • 4. CivicActions Directory Structure We run 3 versions of each site: dev, qa, live. All run off the same version of core. Active development takes place on dev (new modules, theme changes first tested there). SVN Tags gets cut and moved to QA for more testing. The tag then is released to Live.
  • 5. CivicActions Directory Structure You don't need to run your setup like this, or use SVN to reap the benefits of the CivicActions Directory Structure.
  • 6. CivicActions Directory Structure What are the benefits? No need to backup drupal core, you can always download it again. Back up all your sites directories easily and at one No need to move your sites directory for every core upgrade. Possible to run multiple versions of core for different sites off the “same” multi site.
  • 7. CivicActions Directory Structure Limitations and Drawbacks: Some hosting companies don't let you access anything outside of your web root. Get a new hosting company. Some webhosts have limitations on the number (depth) of symlinks ( symlink1 => sym2 =>real_file doesn't work). You can modify the structure a bit while still reaping the benefits.
  • 8. CivicActions Directory Structure These are all real directories (at the same level): /public_html/ /drupal/nobackup/ /drupal/nobackup/6.11 /sites/ /sites/all /sites/example.com
  • 9. CivicActions SymLinks Symlinks (short for “symbolic links”) are your friend. They're like “shortcuts”. Create them with the following command: $ ln -s target/directory symlink See where they point with: $ ls -la where “target/directory” is the directory or file you want to link to, and “symlink” is the link
  • 10. CivicActions SymLinks Structure /public_html/ example.com => ../drupal/nobackup/ 6 this symlink sends apache requests from your public_html directory to drupal/nobackup/6 /drupal/nobackup/ 6 => 6.11 (/drupal/nobackup.6.11) this symlink sends requests from “6” to “6.10” allowing you to easily switch to a new version of drupal core /drupal/nobackup/6.11/ sites => ../../../sites this symlink points to a sites directory outside of drupal core, which means you don't have to move the “sites” directory each time you upgrade core, and also makes it easier to backup sites (your contrib modules and files)
  • 11. What does your Sites Directory Look Like? This is no different from a “standard” multisite setup. Drupal “knows” which site to serve up based on the apache referral. All sites can access the modules and themes in the /sites/all directory. Notice there is no “default” directory! /sites/all /sites/all/modules/contrib /sites/all/modules/custom /sites/example.com /sites/example.com/modules/contrib /sites/example-two.com /sites/example-two.com/modules/contrib
  • 12. Advanced Tricks: Staging Sites Sometimes you will have a staging site like drupal.example.com because your client is not ready to launch. In your sites directory you can symlink drupal.example.com => example.com When the time comes to launch the site, all you need to do is point the final domain at your drupal core install (which means, at the symlink in public_html that points to drupal/nobackup/ 6 )
  • 13. Recap apache request for example.com goes to public_html/ example.com which symlinks to ../drupal/nobackup/ 6 which symlinks to drupal/nobackup/6.11 Drupal looks in / sites which symlinks to ../../../sites for example.com and finds it, and settings.php which points to the right database, and all the modules and themes live in that directory ( /sites/example.com or /sites/all ).