Convert Wiki to MediaWiki
Max file size 100mb.
Wiki vs MediaWiki Format Comparison
| Aspect | Wiki (Source Format) | MediaWiki (Target Format) |
|---|---|---|
| Format Overview |
Wiki
Generic Wiki Markup
Generic wiki markup files that may originate from various wiki platforms and editors. Wiki files can contain standard MediaWiki syntax but may also include non-standard extensions, informal markup variations, or content exported from different wiki engines that needs normalization. Generic Markup Multi-Source |
MediaWiki
MediaWiki Standard Markup
The standardized markup language defined by the MediaWiki software, the engine powering Wikipedia and thousands of wikis. MediaWiki format follows strict syntax rules for headings, formatting, tables, templates, and links that the MediaWiki parser expects for correct rendering. Standardized Wikipedia Compatible |
| Technical Specifications |
Structure: Wiki-style markup (variable)
Encoding: UTF-8 (typically) Syntax Rules: May vary by source Validation: No strict standard Extensions: .wiki, .txt |
Structure: MediaWiki parser-defined syntax
Encoding: UTF-8 Syntax Rules: MediaWiki specification Validation: MediaWiki parser validation Extensions: .mediawiki, .wiki |
| Syntax Examples |
Generic wiki markup (may vary): == Heading ==
**bold** or '''bold'''
//italic// or ''italic''
* list item
[[link]]
{| table
|-
| cell
|}
|
Standard MediaWiki markup: == Heading ==
'''bold'''
''italic''
* list item
[[Link|display text]]
{| class="wikitable"
|-
| cell
|}
|
| Content Support |
|
|
| Advantages |
|
|
| Disadvantages |
|
|
| Common Uses |
|
|
| Best For |
|
|
| Version History |
Origin: Various wiki platforms
Standardization: No formal standard Status: Informal convention Evolution: Varies by platform |
Introduced: 2002 (MediaWiki 1.0)
Current Version: MediaWiki 1.42 (2024) Status: Actively maintained Evolution: Regular syntax extensions added |
| Software Support |
Editors: Any text editor
Pandoc: Partial support Parsers: Multiple wiki engines Other: Limited specialized tooling |
MediaWiki: Native rendering engine
Pandoc: Full read/write support Wikipedia: Direct import compatible Other: VisualEditor, WikiEditor extensions |
Why Convert Wiki to MediaWiki?
Converting generic Wiki markup to standardized MediaWiki format is important when preparing content for import into MediaWiki-powered platforms such as Wikipedia, Fandom, or enterprise MediaWiki installations. Generic wiki files may contain non-standard syntax, informal formatting conventions, or markup from other wiki engines that the MediaWiki parser does not recognize. Normalization ensures correct rendering.
The conversion process standardizes formatting elements to MediaWiki conventions. Bold text is normalized to triple apostrophe syntax ('''bold'''), headings use the correct equal-sign format (== Heading ==), and tables follow the standard wikitable class structure. Non-standard extensions from other wiki engines like DokuWiki or Confluence are translated to their MediaWiki equivalents.
Proper MediaWiki markup also enables the full range of MediaWiki features. Templates become correctly parseable, categories are properly assigned, internal links resolve correctly, and references follow the cite standard. These features only work when the markup strictly follows MediaWiki syntax rules, making normalization a necessary step before content import.
This conversion is especially valuable during wiki migration projects where content from multiple wiki platforms needs to be consolidated into a single MediaWiki instance. By converting all source content to standardized MediaWiki format, you ensure consistent rendering and functionality across the entire knowledge base.
Key Benefits of Converting Wiki to MediaWiki:
- Syntax Normalization: Ensures all markup follows MediaWiki parser rules
- Import Ready: Output can be directly imported into any MediaWiki installation
- Wikipedia Compatible: Content is ready for Wikipedia or Wikimedia projects
- Template Support: Templates and transclusion work correctly after normalization
- Category Integration: Proper category syntax enables wiki organization
- Cross-Wiki Migration: Consolidate content from different wiki platforms
- Consistent Rendering: Eliminates parsing errors from non-standard markup
Practical Examples
Example 1: Syntax Normalization
Input Wiki file (article.wiki):
== Introduction==
**bold text** and //italic text//
* item one
* item two
[[link to page]]
{|
|cell 1 || cell 2
|-
|cell 3 || cell 4
|}
Output MediaWiki file (article.mediawiki):
== Introduction ==
'''bold text''' and ''italic text''
* item one
* item two
[[Link to page]]
{| class="wikitable"
|-
| cell 1 || cell 2
|-
| cell 3 || cell 4
|}
Example 2: Wikipedia Article Preparation
Input Wiki file (biography.wiki):
= John Smith = John Smith (born 1980) is a scientist. == Career == He worked at [[MIT]] from 2005 to 2015. Publications: * "Research Paper A" (2010) * "Research Paper B" (2013) Links: [https://example.com Homepage]
Output MediaWiki file (biography.mediawiki):
= John Smith =
{{Short description|Scientist}}
John Smith (born 1980) is a scientist.
== Career ==
He worked at [[Massachusetts Institute of Technology|MIT]] from 2005 to 2015.
=== Publications ===
* "Research Paper A" (2010)
* "Research Paper B" (2013)
== External links ==
* [https://example.com Official Homepage]
[[Category:Scientists]]
[[Category:Living people]]
Example 3: Cross-Wiki Content Migration
Input Wiki file (process.wiki):
== Deployment Process == === Step 1: Build === Run the build command: ./build.sh --production === Step 2: Test === Execute test suite: pytest tests/ === Step 3: Deploy === Push to production: ./deploy.sh NOTE: Requires admin access.
Output MediaWiki file (process.mediawiki):
== Deployment Process == === Step 1: Build === Run the build command:./build.sh --production === Step 2: Test === Execute test suite:pytest tests/ === Step 3: Deploy === Push to production:./deploy.sh {{Note|Requires admin access.}} [[Category:Deployment]]
Frequently Asked Questions (FAQ)
Q: What is the difference between Wiki and MediaWiki format?
A: "Wiki" refers to generic wiki markup that may come from various wiki engines (DokuWiki, Confluence, TiddlyWiki, etc.) or be informally written. "MediaWiki" refers specifically to the standardized markup language defined by the MediaWiki software, with strict syntax rules for headings, formatting, tables, templates, and links.
Q: Can I import the output directly into Wikipedia?
A: The output follows standard MediaWiki syntax and is technically compatible with Wikipedia's parser. However, Wikipedia has additional requirements such as notability guidelines, neutral point of view, and proper sourcing. The format will be correct, but content must also meet Wikipedia's editorial standards.
Q: How does the converter handle non-MediaWiki syntax?
A: The converter identifies and translates common non-standard wiki syntax to MediaWiki equivalents. For example, DokuWiki-style bold (**text**) becomes MediaWiki bold ('''text'''). Unsupported syntax that cannot be mapped is preserved as plain text to prevent data loss.
Q: Are wiki templates preserved during conversion?
A: Yes, template syntax using double curly braces is preserved in the output. The converter normalizes template parameter formatting to follow MediaWiki conventions. Note that templates must exist on the target MediaWiki instance for proper rendering.
Q: How are tables normalized?
A: Tables are converted to standard MediaWiki wikitable syntax with proper class attributes, row separators (|-), and header (!) and cell (|) markers. The converter adds the class="wikitable" attribute for default styling and ensures all rows and cells follow the expected structure.
Q: Can I convert MediaWiki export XML files?
A: This converter handles wiki markup text files (.wiki). For MediaWiki XML export files (from Special:Export), you would first need to extract the wiki markup content from the XML wrapper. The extracted markup can then be processed through this converter for normalization.
Q: Will categories be added automatically?
A: Existing category tags in the source file are preserved and normalized to proper [[Category:Name]] syntax. The converter does not automatically add new categories, as category assignment depends on the target wiki's classification system.
Q: Is this useful for migrating from other wiki platforms?
A: Absolutely. This converter is ideal for migrating content from DokuWiki, Confluence, TiddlyWiki, or other wiki platforms to MediaWiki. It translates platform-specific syntax to MediaWiki equivalents, making the migration process much smoother than manual reformatting.