At work I set up a shared mediawiki setu ... / 2011-04-20

2011-04-20 At work I set up a shared mediawiki setu ... 9 years ago
At work I set up a shared mediawiki setup, where there is one install of the complete mediawiki source and mediawiki instances are a few symlinks and a LocalSettings.php with each their own database, dns name and other settings. Works like a charm for new mediawiki instances.

But now I wanted to migrate an existing mediawiki to this setup. A mediawiki old enough to not have the MediaWiki dumpBackup.php script so I had to export data by hand. It took a bit of searching, but in the end the documentation for the MediaWiki export function had the right hint:
Using 'Special:Export'
  • Go to Special:Allpages and choose the desired namespace.
  • Copy the list of page names to a text editor
  • Put all page names on separate lines
  • Prefix the namespace to the page names (e.g. 'Help:Contents'), unless the selected namespace is the main namespace.
Putting the page names on separate lines was a :%s/\t/^M/g in vim, and indeed the trick worked although I needed to change the php settings a bit according to the MediaWiki import function to allow for the import to take its time.

One thing that I found was that the Main_Page in the newly setup MediaWiki was newer than all the imported revisions, so I still saw the 'welcome' version and couldn't revert it. As a workaround I deleted the Main_Page and redid the import which went a lot faster as the import function checks whether the page/revision in the import is already in the wiki.

Tags: ,

, reachable as PGP encrypted e-mail preferred.

PGP key 5BA9 368B E6F3 34E4 local copy PGP key 5BA9 368B E6F3 34E4 via keyservers pgp key statistics for 0x5BA9368BE6F334E4 Koos van den Hout
Other webprojects: Camp Wireless, wireless Internet access at campsites, The Virtual Bookcase, book reviews
This page generated in 0.004247 seconds.