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

5 Answers 5

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)

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.

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.

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).

0

warning: for debian apt install mediawiki (version 1.35.8)

the tree structure has been changed to include symlinks.

At 1.35.8 I have found that the apt installer uses /var/lib/mediawiki contains symlinks to /etc/mediawiki and /usr/share/mediawiki making it no longer a simple directory tree that can be copied.

Said copies will share instances of: index.php includes img_auth.php composer.json autoload.php api.php vendor thumb.php thumb_handler.php skins rest.php resources opensearch_desc.php mv-config maintenance load.php languages and maybe even LocalSettings.php -> /etc/mediawiki/LocalSettings.php

Download from https://www.mediawiki.org/wiki/Download instead

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .