[Mediawiki-l] wiki family setup with mediawiki 1.18.1

Daniel Friesen lists at nadir-seen-fire.com
Fri Mar 2 19:38:03 UTC 2012


No, neither of those should be touched. MW_CONFIG_FILE can't be changed  
 from within LocalSettings.php and $IP is the path to where the code is,  
that should be left alone.

Variables like $wgServer, $wgDBname, etc... are what you would change. For  
example:

if ( $_SERVER['HTTP_HOST'] == 'a.example.com' ) {
   $wgServer = "http://a.example.com";
   $wgDBname = "awiki";
} elseif ( $_SERVER['HTTP_HOST'] == 'b.example.com' ) {
   $wgServer = "http://b.example.com";
   $wgDBname = "bwiki";
}

You use conditionals to set the variables that would actually be different  
between the installations.

-- 
~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://daniel.friesen.name]

On Fri, 02 Mar 2012 11:28:55 -0800, Poornima Pochana <ppreddy at uab.edu>  
wrote:

> Thank you Daniel.
>
> Would the configuration variables happen to be 'MW_CONFIG_FILE' , '$IP'?  
> Can you provide an example how to set this conditional? Sorry, I haven't  
> hacked into mediawiki code much, so am quite a novice here.
>
> Poornima.
>
>
> On Mar 2, 2012, at 1:21 PM, Daniel Friesen wrote:
>
>>
>> You should not be modifying core code to make wiki families.
>>
>> You do that by adding conditionals into your LocalSettings.php and  
>> setting configuration variables with different settings depending on  
>> where you are.
>>
>>
>> --
>> ~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://daniel.friesen.name]



More information about the MediaWiki-l mailing list