Skip to content

Instantly share code, notes, and snippets.

@thomaspoignant
Last active September 14, 2026 17:23
Show Gist options
  • Select an option

  • Save thomaspoignant/7cbae830acefb923e9d3fd373420f2f5 to your computer and use it in GitHub Desktop.

Select an option

Save thomaspoignant/7cbae830acefb923e9d3fd373420f2f5 to your computer and use it in GitHub Desktop.
Dokuwiki, export all pages with one command line. The result is all the wiki pages and files in html
wget \
--recursive \
--no-clobber \
--page-requisites \
--no-check-certificate \
--html-extension \
--convert-links \
--restrict-file-names=windows \
--no-parent \
--domains yourdomain.com \
--reject-regex 'do=|feed.php'
http://username:password@wiki.yourdomain.com
@stefan2904

stefan2904 commented Jan 13, 2023

Copy link
Copy Markdown

for basic auth it works with

wget \
  --recursive \
  --no-clobber \
  --page-requisites \
  --no-check-certificate \
  --html-extension \
  --convert-links \
  --restrict-file-names=windows \
  --no-parent \
  --domains yourdomain.com \
  --reject-regex 'do=|feed.php' \
  https://username:password@wiki.yourdomain.com

otherwise you need to set the auth cookie DokuWiki with --header

@casdeiro

Copy link
Copy Markdown

Hi, I've tried this (without the username:password) when I was searching for a simple solution to make a static HTML copy of a public wiki, because all the Dokuwiki plugins I tried where unupdated or too complicated or simply didn't work :-(

At first this command seemed to work like a charm, but then I found out that the recursiveness didn't work as excepted, because wget didn't download all the pages of the wiki. It seemed to follow some inner links and not others. Any clue about the reason? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment