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