Archiving a MediaWiki installation


git clone
cd exportMediaWiki2HTML
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt


  • Fix for w/ vs wiki/ problem
  • Will render redirects as the parge it’s redirected to, leading to duplicate content -> Adding &redirect=no to the URL solves that, but creates annoying pages. e.g.


Namespaces are exported separatly, identified by their Namespace IDs

  • 0: default
  • 2: User
  • 10: Template
  • 14: Category
python3 --url=
python3 --url= --namespace=2
python3 --url= --namespace=1ß
python3 --url= --namespace=14


# Create ne jekyll page
jekyll new output
cd output

# copy over content
cp -r ../export/* .

# Add front matter
for a in $(ls -1 *.html); do if [ "$(head -1 $a)" = "---" ]; then continue; fi; echo -e "---\nlayout: page\n---\n$(cat $a)" > $a; done

# Adjust width of minima
mkdir assets
vi assets/main.scss

# serve
jekyll serve

Alernative approaches: