1

I have a "multi-site" installation of Drupal 7, which means that I have these folders in my "sites" folder:

all
domain.one
domain.two
domain.x

And in each of these folders, I also have "modules" and "themes" folders.

If I click the "install new module" link on the modules page ("admin/modules") from any domain X, Drupal tries to download modules in the "all/modules" folder instead of the "X/modules" folder.

Maybe I am not using the proper phrase to search in Google, but I do not see similar problems, so it may just be my problem.

How to install site-specific modules in a Drupal 7 multi-site?

Michael Saunders
  • 2,662
  • 1
  • 12
  • 21
NSp
  • 23
  • 1
  • 6

3 Answers3

0

You can try the example detailed out in this post: http://www.pixelclever.com/how-set-up-drush-for-multisite-installation which basically requires you to create a drushrc.php file for each multisite, which includes the path to the respective modules folder.

Here are the lines from that post that explain

To start, go to your drush folder where you will find a file entitled example.drushrc.php. Copy that file into the individual site folder in your Drupal multisite installation (sites/yourmultisite), and rename the file to drushrc.php.

Now open that file and add the following line: $command_specific['dl']['destination'] = 'sites/yourmultisite/modules';

or

$command_specific['dl']['destination'] = 'sites/yourmultisite/modules/contributions';

This is also a step by step walkthrough of the updating process using drush on multisites.

http://rinen.net/2013/02/updating-a-drupal-multisite-using-drush/

jsheffers
  • 1,602
  • 19
  • 41
  • Thank you for your time and post, I looked for this information. May be you also know, how can I do this without Drush? May be some variable in settings.php? Drush is good, but inDrupal possibility is also useful for me. – NSp Aug 03 '13 at 04:52
0

This worked for me:

  1. Changed working directory on terminal to specific site directory i.e. "cd [drupal_site_directory]/sites/[site_one]/ "
  2. use usual drush command to install modules i.e. "drush dl [module_name]"

Hope this might help you guys also.

.

rabin
  • 81
  • 2