Manual talk:PhpWiki conversion
i found that the regex's noted in the topic left things all backward, so i modified them:
# link markup s!\[\(.*\)|\(http.*\)]![\2 \1]!g # url format -- OK s!\[\(.*\)|\(.*\)\]![\2|\1]!g # switch display and link text -- OK s! |\]!]!g s!\[ ![!g s!|! !g # s!\[\([^]]*\)\]!\1!g # double bracketize -- OK # s!\[\[\(http.*\)\]\]![\1]!g # undo double-bracketing urls by above -- OK
Update on the sed Method for MediaWiki Version 1.15.1
editI found that for a very basic phpwiki the sed script on the main page worked fine. Some '^M' end of lines were inserted but the following vim workflow fixed those:
cd converted vim * %s/\r\n/\r/g %s/\r//g :q
Like I said I was running a simple installation with not too many pages or plugins.
I also bypassed the database import step by using the [file import script] with the following BASH script:
for FILE in *
do
php maintanence/importTextFile.php --user=pbrady --comment="Initial creation of the content from PHPWiki" converted/"${FILE}"
done
You will need to add the appropriate paths to importTextFile.php and the php binary.