5

We need to run several MediaWiki Wikis, that need totally separate user accounts, on the one server. What would be the better solution:

  1. Use separate source code and use namespaces in the database.
  2. Use the same source code along the lines of this, essentially you create a customised localsettings.php file for each site that contains the site specific info and you have a master localsettings.php file that depending on the url send you to the relevant site specific localsettings.php
  3. Symlink all of the source code except for localsettings.php and any other relevant files from a master folder.

Obviously it would be nicer to be able to use the same code for every instance, as it will make upgrades a lot easier.

For what it's worth it will be running on Ubuntu server, Apache with a sprinkling on nginx & MySQL

Jon Rhoades
  • 4,989
  • 3
  • 30
  • 47

4 Answers4

7

Use separate source code and separate databases. That way you can install extensions or custom themes in one of them without impacting others.

If you really know that you will never ever have custom extensions/themes in one but not in the other wikis, then 3. seems to be a better choice than 2, but keep in mind the upload folder (there is a setting in LocalSettings to specify the path)

Michael Stum
  • 4,010
  • 4
  • 35
  • 48
7

Mediawiki upgrades are a doddle anyway, so I run 2 totally separate instances, including a copy of the plugins directory and a copy (not a symlink) of the LocalSettings.php file. I found years ago that trying to save a few minutes on running 2 upgrades would cost me days of getting it set up right, so I just don't bother anymore :)

2 DBs, 2 code instances. Simple. you can export and import between the two very easily then, for maybe one day when you want to merge them together.

gbjbaanb
  • 3,852
  • 1
  • 22
  • 27
4

A MediaWiki installation is nothing more than a directory tree and associated database. You can run as many parallel installations as you like. Any part of the file base that needs to be shared can be done so using symlinks. It only gets tricky if you want to share parts of the database and because that tends to be a one way road to disaster you would be well advised to stay clear of it.

John Gardeniers
  • 27,262
  • 12
  • 53
  • 108
0

Well, this is newer than any of the answers here..

https://sharkysoft.com/wiki/how_to_configure_multiple_MediaWiki_instances_on_a_single_host

Basically, you create another folder, symlink to most of the main files, remove some of the symlinks, and set up the separate files yourself.

For mediawiki v1.21.2, I didn't have an AdminSettings.php to remove, and the config folder is actually named mw-config. I also had to manually create a new mysql user for the new db via the command line (using the original user to do it).

B T
  • 155
  • 2
  • 8