I've been putting all my modules and themes in sites/all prob bc it didn't occur to me that you could put them in the config directory. It sounds great at first but you might have 3 configs for 1 website, local, dev and prod. Copying the modules everytime you change something would be stupid and you're only other alternative is I guess to do some fancy symlink magic or something and I don't believe windows has something like that. Many develop on a windows box and deploy to linux environments. Anyways, is this really the best way to do things? Also does anyone have suggestions?

Jay

Comments

matkeane’s picture

Hi,

I might be mis-understanding the question, but here goes... By default, I put any shared modules into /sites/all/modules/ so that they are available to all sites, but when you talk about modules for local, dev and prod sites, I guess you are talking about site-specific modules. In that case, yes, symlinks can be handy and avoid having to copy your modules into 3 different folders. So you end up with something like:

sites/www.example.com/modules/ (production site folder with your module code)
sites/www.example.local/modules (symlink pointing to production site folder)
sites/www.example.dev/modules (symlink pointing to production site folder)

.. and the same thing for the themes folder. The settings.php file is of course different for each, but you only have to maintain 1 copy of your modules and themes.

This also seems to work with Windows aliases - at least when I quickly checked under WAMP on a colleague's machine.

yelvington’s picture

Unless you have a specific reason to make a module absolutely unavailable to one or another of your sites, put them all in the sites/all/modules.

One example of a good reason would be that you have two versions of a specific module -- production and testing.

drupalninja99’s picture

Altho in that case I would probably want to deploy to a different server. Right now we only have 1 so that would be helpful in that case.

I'm nervous ab symlinks. Right now all my stuff is in sites/all/ but it's starting to get crowded. It's annoying when I'm enabling a module bc I have to look at site specific modules that aren't relevant. It might be a moot point bc I'll be setting up a drupal6 install soon and prob won't move the old sites over unless I have a specific reason to but I am thinking ab the symlink thing...if I can get it to work without deployment being a total pain. It's just annoying that I would need symlinks on my linux server and windows shortcuts on my local box.