Skip to Content
Planning and Managing Drupal Projects
book

Planning and Managing Drupal Projects

by Dani Nordin
September 2011
Beginner content levelBeginner
100 pages
2h 54m
English
O'Reilly Media, Inc.
Content preview from Planning and Managing Drupal Projects

Organizing Your Files

As noted above, any customizations to your site (modules, themes, etc.) should reside in your sites/all or sites/default folder. There are many reasons for this, but the most important one is for ease of upgrading your site. When upgrading Drupal core, you’re essentially replacing all of the files in your Drupal installation with the newest version of the files, and updating the database to reflect the new configuration. By keeping all of your customizations in the sites folder, you lessen the risk that all of your files will be replaced once you update. Another handy facet of using the sites folder to hold all your customizations is ease of editing; by keeping everything in one place, there’s less to hunt through when you’re looking to change a file.

By default, you should keep all your customizations in sites/all. If you’re dealing with a single site, it’s just as easy to keep things in sites/default, but if you ever get into creating multi-site installations (which is way beyond the scope of this book), being in the habit of keeping everything in sites/all will save your bacon. You also need to organize your code according to what it does; for example, themes should go into sites/all/themes, modules in sites/all/modules, etc. This is because Drupal actually looks for themes in a folder called themes, modules in a folder called modules, etc. If you don’t have things stored in the appropriate folder, everything goes to heck.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Digital Marketing with Drupal

Digital Marketing with Drupal

José Fernandes

Publisher Resources

ISBN: 9781449309695Errata Page