logo
search
Microsoft 365 Migration

How to Migrate MediaWiki Pages and Images to SharePoint

John WilsonJohn Wilson Sep 29, 2026 869 views

Question details

The user needs a method to migrate exported MediaWiki content, including XML files and image archives, into a SharePoint environment to recreate the wiki structure.

How to Migrate MediaWiki Pages and Images to SharePoint
Product
Microsoft SharePoint
Device & OS
not provided
Scenario
Moving an existing wiki knowledge base from MediaWiki to Microsoft SharePoint.
Observed behavior
The user possesses raw MediaWiki XML exports and image files but requires a reliable workflow to import and correctly display them as SharePoint pages.
Before you start

Ensure you have SharePoint Site Administrator permissions and have downloaded the complete MediaWiki XML export along with its accompanying image archives. It is highly recommended to set up a dedicated test SharePoint site to validate the conversion scripts before running a full migration.

Solution 1Recommended

Convert XML to HTML and Automate with PnP PowerShell

Since SharePoint cannot directly import MediaWiki XML files, you must first convert the XML data to HTML, then use PnP PowerShell scripts to automate the creation of modern SharePoint pages.

SharePoint Online utilizes modern pages built with web parts, meaning raw MediaWiki XML will not render natively. Transforming the XML into standard HTML prepares the text so it can be inserted into SharePoint's Text web parts programmatically.

1
Extract MediaWiki Files

Extract and prepare your MediaWiki XML export and image archives in a local, easily accessible directory on your computer.

2
Convert XML to HTML

Convert the XML page content into standard HTML format using an XSLT transformation script or an automated wiki-conversion utility. Keep the resulting HTML files organized.

3
Upload Image Archives

Navigate to your SharePoint site, open the 'Site contents' menu, and upload your image archives to a designated Document Library (or Site Assets) so they have valid SharePoint destination URLs.

4
Run Add-PnPPage Command

Open PnP PowerShell and connect to your SharePoint environment. Use the 'Add-PnPPage' command inside a loop script to programmatically generate new modern pages based on your file list.

5
Inject Content and Fix Links

Use PowerShell to inject the converted HTML content into the newly created pages using Text web parts. Ensure your script updates the old image reference links in the HTML to point to the new SharePoint Document Library URLs.

Convert XML to HTML and Automate with PnP PowerShell
Testing Your Migration: Always run your PowerShell migration script on a small batch of 5 to 10 pages first. This allows you to verify that formatting, metadata, and image links are preserved correctly before processing the entire wiki.
Free Microsoft Office alternative

Enhance Your Team Collaboration with WPS Office

While migrating your organizational wiki to SharePoint, you might also need a cost-effective, lightweight productivity suite for everyday tasks. WPS Office provides excellent compatibility with Microsoft file formats, a highly familiar user interface, and robust tools for Word, Excel, and PowerPoint documents—completely free.

  1. 1. Visit the Website: Go to the official WPS Office website in your browser.
  2. 2. Download the Installer: Click the 'Free Download' button to get the installation package tailored for your operating system.
  3. 3. Install and Start Creating: Run the downloaded installer and launch WPS Office to instantly begin managing your collaborative documents.
Seamless compatibility with standard Microsoft formats including .docx, .xlsx, and .pptx.Lightweight installation that runs flawlessly on a wide variety of hardware and operating systems.All-in-one tabbed interface for easily managing documents, spreadsheets, presentations, and PDFs in a single window.Rich suite of free built-in templates to standardize your team's internal documentation and wiki drafts.
microsoft office alternative - wps office

Frequently Asked Questions

Can SharePoint natively import MediaWiki XML files?

No, SharePoint Online does not feature a built-in tool to directly import or render raw MediaWiki XML exports. The XML content must be converted to HTML before it can be integrated into modern SharePoint pages.

Where should I store my MediaWiki images in SharePoint?

Images should be bulk-uploaded to a designated Document Library or the Site Assets library in your SharePoint site. Once uploaded, you must map and update the image paths in your converted HTML files to reference these new SharePoint locations.

What is PnP PowerShell and why is it needed for this migration?

PnP (Patterns and Practices) PowerShell is a cross-platform command-line module that allows you to automate complex tasks in Microsoft 365. It is essential for this migration because it enables you to bulk-create modern SharePoint pages and populate web parts directly from your locally converted HTML files.

Are there third-party tools available for migrating MediaWiki to SharePoint?

Yes, several third-party enterprise migration tools and professional services are designed specifically for SharePoint content migrations. They often handle the XML-to-HTML conversion, layout mapping, and link resolution automatically, which can save substantial time for large, complex wikis.