Skip to content

Latest commit

 

History

History
60 lines (39 loc) · 3.06 KB

File metadata and controls

60 lines (39 loc) · 3.06 KB

How to use this tool

This tool allows you to migrate your content from Mediawiki to VSTS Wiki. It uses Pandoc for file conversion from mediawiki formats to markdown format and then ensures that links, images, hierarchy, etc. are created based on the VSTS Wiki architecture. Learn more about what is supported in this tool @ migration details

Prerequisites

For creating sql backup of your existing mediawiki - https://www.mediawiki.org/wiki/Manual:Backing_up_a_wiki Also take a backup of all images from: <<media wiki install location>>\images\ [For eg: C:\xampp\htdocs\mediawiki\images]

Steps:

  1. In case you need to create a local media wiki server (Optional Step - required if your current media wiki is LDAP integrated, but preferred as it will speed things up)

Alternately, in your existing mediawiki, you change the LocalSettings.php to open it for public

$wgGroupPermissions['*']['read'] = true;

  • Backup your existing mediawiki (https://www.mediawiki.org/wiki/Manual:Restoring_a_wiki_from_backup#Import_the_database_backup)

    • From the command line using mysqladmin
    mysqladmin -u wikidb_user -p drop wikidb

    Substituting as appropriate for wikidb_user and wikidb. The -p parameter will prompt you for the password.

  • Then to create a new database:

    mysqladmin -u wikidb_user -p create wikidb
    - To import dump_of_wikidb.sql from the command line you simply do:

    mysql -u wikidb_user -p wikidb < dump_of_wikidb.sql
  1. Run the script with the following parameters:

    -mediWikiUrl : Your media wiki url for which credentails are provided/open wiki <format: http://localhost:8080/mediawiki>,

    -imageDiskPath : Your image backup location <format: C:\xampp\htdocs\mediawiki\images>,

    -u : mediawiki username <format: alias>,

    -p : mediawiki password,

    -o : output directory on disk <format: C:\anylocation>,

    -vstsWikiRemoteUrl : vsts wiki clone url <format: https://myacct.visualstudio.com/proj/_git/proj.wiki>,

    -pandocPath :path where pandoc.exe resides <format: C:\pandoc>,

    -vstsUserName : vsts username (Please provide PAT token when asked for password),

    -originalmMediaWikiUrl : mediawiki absolute url(can be different from mediawiki url provided above - to change absolute urls in content) <format: https://mywiki.com/index.php\?title=>,

Note: Powershell has a limit of 260 characters for path. so good to have smaller path lenths