Install and configure modules only once for all websites running the same drupal install?
Hello, I have one single drupal installation for several websites. Everything is in /var/www/html/drupal (apache on Linux). The drupal/sites subfolder has one folder per website, each with its own settings.php, files/, modules/. each site has its separate mysql database. The question is if it is possible in this context (which I cannot change, doesn't depend from me) to install/configure a module once and have it work in every website using that drupal installation. If I understand itcorrectly, the answer is no, because I *could* only install one file and link to it from each modules/ folder, but I'd still have to log in to each single site to enable the module, right? Or not? TIA, D.
Actually the answer is "mostly". If you put a module in the /modules directory instead of /sites/foo/modules, then it becomes available to all sites. (That does mix it in with core modules. However, the next version of Drupal will have a sites/all/modules directory for that purpose as well.) You can then go to each site and enable the module, and it will run install script for each site to setup the database (if necessary) for that site. Any configuration you have to do, however, is per-site unless you're merging things like the variable table between sites, which you really shouldn't be doing. :-) However, depending on what it is you're doing it MAY make sense to share tables for that module between multiple sites. That depends on your use case. The web site and install docs have more on shared tables. In most cases, you probably don't want to have configuration shared between two sites. Think very hard before you do so. Cheers. On Sunday 20 August 2006 05:15, dondi_2006 wrote:
Hello,
I have one single drupal installation for several websites. Everything is in /var/www/html/drupal (apache on Linux).
The drupal/sites subfolder has one folder per website, each with its own settings.php, files/, modules/. each site has its separate mysql database.
The question is if it is possible in this context (which I cannot change, doesn't depend from me) to install/configure a module once and have it work in every website using that drupal installation.
If I understand itcorrectly, the answer is no, because I *could* only install one file and link to it from each modules/ folder, but I'd still have to log in to each single site to enable the module, right? Or not?
TIA, D.
-- Larry Garfield AIM: LOLG42 larry@garfieldtech.com ICQ: 6817012 "If nature has made any one thing less susceptible than all others of exclusive property, it is the action of the thinking power called an idea, which an individual may exclusively possess as long as he keeps it to himself; but the moment it is divulged, it forces itself into the possession of every one, and the receiver cannot dispossess himself of it." -- Thomas Jefferson
Hi, On Mon, 21 Aug 2006 00:37:15 +0200, Larry Garfield <larry@garfieldtech.com> wrote:
Actually the answer is "mostly". If you put a module in the /modules directory instead of /sites/foo/modules, then it becomes available to all sites.
Correct
Any configuration you have to do, however, is per-site
That is the way I am doing it per - site
In most cases, you probably don't want to have configuration shared between two sites. Think very hard before you do so.
I have played with this and it is a bigger headache sharing configurations than redoing manual configurations. What I am investigating is to selectively export specific tables from one site to another such as the user file. Due to restrictions by my hosting co I am forced to use a rigid control panel and all hosted sites out of my account are fixed dirs directly below public_html/ , thus the Drupal scheme of shared code could not work for me. What I have done is to create symlinks to the appropriate dirs (I even have a bash script to instantly create the links for new sites) Thus I have ~/public_html/mysite/ with symlinks to ~/public_html/drupal_47/database ./includes etc. Only ./files and ./sites and ./modules/xtra (for contributed modules) are unique dirs for any shared site. This works like a charm with a single codebase shared between all sites. Security updates for Drupal means a single set of files copied to drupal_47 . The contributed modules in ./modules/xtra are also manual symlinks to ./drupal_47/modules/xtra/my_module or whatever appropriate module is required. Hope this helps someone -- Casper Labuschagne +27827054416 www.krooninfo.co.za www.boerboel.co.za Visit http://www.ubuntu.com for a highly recommended open source alternative to Windows!
participants (3)
-
Casper Labuschagne -
dondi_2006 -
Larry Garfield