MediaWiki XML

Last modified by Thomas Mortagne on 2023/06/12 00:18

cogFilter stream extension to parse a MediaWiki XML package
Developed by

Thomas Mortagne

Active Installs76
0 Votes
LicenseGNU Lesser General Public License 2.1

Requires XWiki 11.10 or more.

Installable with the Extension Manager


Filter stream extension to parse a MediaWiki XML package

Supported input

XML export

The Filter take in input an XML file as defined in


The XML file contain the wiki pages, but MediaWiki also store files on the filesystem. You can directly use the folder in which MediaWiki store its files.

Import a MediaWiki export in an XWiki instance


After you have completed these steps, click the "Convert" button. After that, you will see the conversion progress.

What about the MediaWiki templates ?

Calls to MediaWiki templates are converted into macro calls since that's the closest we can find in the XWiki world, but the implementation of those templates is not converted because it would be very hard (because they are implemented in PHP and often use MediaWiki APIs) so you end up with "Missing macro" error. To resolve them the simplest is to actually implement an XWiki macro which behave like the MediaWiki template you are trying to migrate, see for more details on how to implement an XWiki macro.

Advanced use

Import everything in a specific wiki/space

By default, the importer try to convert as much as possible, MediaWiki naming into XWiki naming. That means that all the page located in default MediaWiki namespace will end up in XWiki Main space, for example.

If you make all the imported pages go in a specific wiki or space, you can use the property "Parent". Indicate the reference of the entity. For example for the wiki with the id mywiki use wiki:mywiki and for the space MediaWiki in wiki with id mywiki you can use space:mywiki:MediaWiki. It does not need to already exist.

Prerequisites & Installation Instructions

We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager).

You can also use the manual method which involves dropping the JAR file and all its dependencies into the WEB-INF/lib folder and restarting XWiki.


Dependencies for this extension (org.xwiki.contrib.mediawiki:mediawiki-xml 2.0.0):

Get Connected