User:Atrox~mediawikiwiki/Phpwiki2Mediawiki

= Description =

Another approach to converting PhpWiki to Mediawiki. A perl-script that converts the dump is based on script by Isaac Wilcox, but extended as we had very many complicated tables etc. in our PhpWiki. The end result was quite satisfactory, although not perfect (see TODO section in mwconverter.pl).

= Scripts =

I upload them once I have permissions to do so ;)
 * mwconverter.pl - converts wikidump pages to mediawiki pages and writes a list of pages into a tree-file (eg. tree.txt)
 * mwbot/bot.php - php script that inserts converted pages into mediawiki databases (through HTTP-queries)

= How-to = Step-by-step:
 * 1) Set up a blank Mediawiki (1.14.x) installation and create administrative account in Mediawiki (maintenance/createAndPromote.php) to use it for inserting pages afterwards
 * 2) Make a dump of pages from PhpWiki (using Administration->Dump to directory (dumping into zip created repeating content of pages, so don't use it))
 * 3) Convert these pages into Mediawiki format using mwconverter.pl -- eg: cd /path/to/converter ; perl mwconverter.pl
 * 4) Import these pages in Mediawiki format into Mediawiki database using mwbot/bot.php -- eg: cd /path/to/converter/mwbot ; php bot.php
 * 5) Upgrade your Mediawiki

I did it converting from PhpWiki 1.13.14 (actually a SVN snapshot version on 19.Jul.2010) to Mediawiki 1.14.1 (upgrading it after to 1.15.4).

If you happen to test these script, please let me know about your success or pitfalls.