You need to login to send post. No account yet? Create one:
Create account

Themes and modules in sites/default folder

3 replies [Last post]
Dummie

Why I can't change files in modules and themes in root of Drupal site?

admin
This is not correct

Theoretically you can, your site will work, but it is not good an idea. Reasons are:

  • If you will set up multisite, where all sites are using modules and themes from root, you'll not able made change for only one,
  • you will not able to theming multisite (you need to change CSS and template files for all sites individually),
  • update will complicated, because you will have to made changes again, again and again.

So you - theoretically, for ONE SITE - don't have to make subfolders in default folder for modules and themes, but you will not really able to maintain site. And if you will need multisite, you will have to almost re-build site from scratch.

 

Dummie
And correct is?

I am completely newbie to Drupal.

admin
Drupal folder structure

Your main directory (except updating of modules or themes) is "sites". There are this folders:

  • all
  • default

"all" folder - modules (in "modules" folder - create it) and themes (in "themes" folder - create it) uploaded here will accessible from all websites (domains) in your Drupal instalation. So use it for modules and themes which you planing to use in almost all your websites (admin_menu i.e.).

"default" folder - modules and themes for your main domain (usually domain which have hosting).

In multisite you will create in this same folder ("sites") new subfolders named as domain without "www" prefix, but it can have prefix of subdomain if you plan to use it (i.e. - we have two sites: www.seo-web-design-aberdeen.co.uk for main site and try.seo-web-design-aberdeen.co.uk for sandbox, so we have folders "seo-web-design-aberdeen.co.uk" and "try.seo-web-design-aberdeen.co.uk").

Inside folders in main "site" folder should be this subfolders: "modules", "themes", "files" and "tmp".