It's better when it's simple

User Tools

Site Tools


Site Export Plugin

Compatible with DokuWiki

  • 2018-04-22 "Greebo" probably
  • 2017-02-19 "Frusterick Manners" probably
  • 2016-06-26 "Elenor Of Tsort" probably
  • 2015-08-10 "Detritus" probably

plugin Export your site or a namespace to standalone HTML pages – including images and media. This plugin is capable of creating an Eclipse Plugin help including the context.xml. You can also select the template to which you want to export your content

Last updated on
Admin, Action
Conflicts with

Similar to dokukiwix, nsexport, offline

Tagged with eclipse, export, html, template

Download and Installation

Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.

For detailed information check out the GitHub repository.


  • DokuWiki version Weatherwax, Binky and newer
  • You need to log in as administrator to have access to the siteexport plugin
  • You have to have the zip compression library of your php installation activated.
  • dw2pdf plugin for PDF export options
  • a writable /inc/preload.php file for template switching
  • /data/media/wiki dir must exist. load some file for creating it.


Please make sure that you do not have any Javascript errors or warnings in your log. You can check this using the Firebug plugin for Firefox. Screenshots might help.

If any inconveniences or problems occur, please file an issue at the bug tracker.

Change Log

How it works

Well I'm not the author of the plugin, but it's really worthwhile getting it work. Especially if you want to make a static snapshot (customer presentation while development of content goes on; secure as plugins are not distributed).

  1. install an DokuWiki instance on your server;
    1. run install.php an choose: ACL enable and open wiki
  2. install plugin siteexport
  3. Get stuff in. This means
    1. config-files like: smileys,…
      be careful in using everything concerning authentification. In an non-open wiki export doesn't work
    2. used templates (I use the default without compatibility problems)
    3. hacks of your DokuWiki ;-)
    4. plugins + config for plugins in local.php
      my first attempts failed, as not all plugins seems to be compatible with this plugin or vice versa.
    5. pages you want to export
  4. create a startpage which links the pages, when you don't have a menu structure which doesn't show the subfolder
  5. if you just want to export a branch you have to go to this folder and there enter the admin-area; you can type in the wanted namespace ether. For me it seems to be more safe to view the namespace first!
  6. login and go to config-menu: siteexport; check options; to run links to wget and dl-link should appear otherwise it doesn't work
  7. click generate and download the packed pages
    by starting doku.htm you run the static version

The main aim is to export your pages in static HTML. Pictures are bundled. As long as you don't forget (to install) any plugins, everything works fine.


:?: Has anyone been able to schedule this to run as an unattended task? Seems like this plugin would be perfect to use to schedule automated backups.

That is possible using the cron function. There is, however, no description yet

:?: Can anyone tell me how this plugin work? I don't see any button to proceed the export function.

To the the page of the namespace to export start, then go to Admin and click “Site export”. On Linux you need to give write access to some files (see message on top when opening “Site export” page).

:?: The search button doesn't work in the exported site.

That's right. The search relies on the PHP backend which is gone once you've exported the site.

:?: “Command unknown: siteexport”. Whats wrong?

Check if you have cleared the JS and CSS cache - and do a hard reload.
Check if you have any JavaScript errors or error messages in the webserver logfiles.
Check what the AJAX response from your DokuWiki was when the export page loads (e.g. use Firebug on Firefox)
If you find anything you think is very wrong, contact our support

:?: The export runs fine from the GUI, but I get no file for downloading

This answer may not apply to all reasons of the question, but it is possible, that the php execution time, set in the php.ini is too short for the export-script.
The script takes a long time, depending on how many links there are in your page - and especially for the first request which fetches CSS, JS, raw alternatives of the page and so on.
Please consider to set a higher execution time (default is about 30sec, try something like 2 minutes ).

:?: I get the status message: “Finished but download failed.” and there is no output file created in the filesystem on the server. php max_execution_time is 120s.

:?: Where is the error log file located?

The logfile can be set in the DokuWiki's configuration page section “Siteexport” (see screenshot).
The destination has to be write able by the server and you need to set the debug level to other than “none”.

:?: I'm getting the following error: 'Can't create preload file in 'inc' directory. Template switching is not available. Plugin disabling is not available.'

The site export plugin requires write permissions to the inc/preload.php file in order to provide template switching and plugin disabling functionality
It's best to just create the file inc/preload.php and give write permissions for the web server to it

:?: I get the message “Finished Download” and it appears that it worked (one page is very fast) but there is no download file. Where is it? My config page: Can't find log file either.

My problem was Chrome! I just tried it in MSIE and Firefox with no difficulties. The downloaded .zip file was being blocked.


old javascript api vs jQuery
You still use the old javascript api function. Your package has also script_angua.js that's rewritten to jQuery.

There is a new Release that is Weatherwax and Binky exclusive. Please check them out.

What is the status on this? because the current released DokuWiki RC version don't support the old javascript api anymore…

I try to export multiple pages to pdf format, using the default template
This message appears : Unsupported font type: TrueTypeUnicode (DejaVuSerifCondensed)
Same with only one page.
Doesn't works, have you got an idea ? Thanks ~~Phil

Looks like you're using a Font type in your css that is not supported by DW2pdf - check out the plugin dw2pdf - there should be a help file that shows you how to create that font

The installation of siteexport on DokuWiki Ricewind works really smart. It is great that there is such a useful plugin!

However, the links trouble me: Links within the HTML-copy do not work, they just point to the current HTML page (although the link's title shows the correct page). |
Further, the symbols for external links are gone and most of the template is gone (alsothough “export_body” is not checked).

Please check the settings for excluded directories, by default there are quite a few. Otherwise please get in touch.

In the current version, it seems, there is no setting for excluded directories (or did I just miss the obvious?) - only an input for exclude-regex, which is empty. Nonetheless, the links on my start page all refer to start.html…

I'm getting an error decompressing the downloaded package. It says “the file or the directory doesn't exit”. Could you please upload it again? Thanks in advance.

I heard that a lot. Please check the browser you use. Did you y try copying the url into the plugin-installation from tha admin section? FYI: The tgz has been created using OSX tools.

Unzipper on Ubuntu fails with message:

tar: This does not look like a tar archive
tar: Skipping to next header
tar: Exiting with failure status due to previous errors

Installing via plugin manager seems possible on ubuntu, but i like the possibility to verify packages before installing.

Please check the new Version from GitHib. The Problems should go away :)

No template images

The site exports fine but when I open the hmtl, the background images for the template, as well as smiley graphics, don't appear. I notice the html source has references to a lib/images directory which doesn't exist. Any ideas how I can get it to show background images? The images from the media folder show on the pages themselves works fine.~~~~ — gymnophoriagymnophoria

2013/01/27 21:44

The lib/images folder is excluded by default. See configuration.

Error Comand unknown: add option

- What I have to write in Costum Options ?

- And I cant Write anything in the Download destination field.

The Download Fields are readonly so you can copy the URL and start a download from your browser without the Admin-Page (Public sites only).
The Custom Option can be left blank. They only serve the purpose of dynamic stuff if you have PHP enabled or have plugins of your own that need other options.

Corrupted ZIP & Other Issues

  • The ZIP archive that is generated is reported as being corrupted by Windows explorer and 7-zip. Simple attempts to repair it fail.
  • preload.php appears to be populated with generated PHP code - without the starting <?php so the code just ends up being echoed on to every page of the wiki.
As an experiment I did a quick test on exporting a namespace. This ended up in disabled administrating and error texts of the plugin on top of the wiki. Minutes before I updated to Eleanor of Tsort. Main reason could be my configuration: this is not properly safe: 'Data directory is not secured'-notification (not all permissions are www-data only). Normally no problem in my configuration, but this could mess up things pretty much in combination with this plugin? Cannot reproduce in more detail. If this is the cause, I simply messed things up for myself. If so, forget this and please delete it. Otherwise: be warned.

—- MartinNL 16.09.22

PHP 5.6 now required

Recent Update of SiteExport caused our Dokuwiki to blank out. By FTP and deleting the siteexport folder under plugins I got the site running again. We use the indexmenu, backup tool, captcha, chkedit, configuration manager, dwedit, extension manager, gallery, info, move, popularity, revert manager, searchindex manager, styling, translation, doku upgrade, user manager, wrap, plus the most normal plugins, like acl manager, plain auth. - Are any of these incompatible? Should I try re-installation? Do you think it was just a glitch in the upgrade? NOTE: The cause of the problem was that both DW2PDF and SiteExport now require PHP 5.6 or greater. We had less. Upgrading fixed the problem.

Rick G. 12/2017

Processsing large documents

  • Clean up the document - Use MultiOrphan, Fix orphans and wanted for media, links and namespaces. Use standard images, no animated gifs.
  • Make sure the single page can be created with the plugin, if not, fix it.
  • Set the plugin to “Debug” and set the Debug file. Review that file during the process.
  • Review the error.log too.
  • In admin > configure > siteexport set maximum script execution time to something adequate.
  • For the website, Find out what the php max_execution_time is set to phpconfig().ini and compare with how long it takes to process the document. If it is set too low, increase it.
  • When processing the full document and it fails, try excluding the page under admin > configuration > siteexport “exclude” and then run the export again.
  • When the document completes, go back and fix all the excluded pages.
  • If the document does not complete, consider setting up a mirrored local Dokuwiki server and running SiteExport there. Why? Because your online server may not have enough memory and power to complete the task. We have had to resort to this technique to successfully complete large tasks. It is more effective than stubbornly trying to make it work with an underpowered website.

Processsing large documents & Other Experience & Requests

8/22/2018 Comments after installing local servers & siteexport (Bitnami-Doku & DokuwikiStick)

1. The path and filename issues for the se-debug.txt file and the file are very confusing and difficult. See this informative discussion

  • Please see this forum post Sometimes the SiteExport Config says only “file” and a path is needed and visa versa.
  • Also I found that the only way I could get it running was to either remove the path and just have the filename or put in an absolute path.
  • Having relative paths does not work in this configuration on Windows.
  • Is there any way the user could “Browse to the file? See the notes in the thread above. Only after getting these paths correct, does the extension work at about 75%. See post 25

2. I have found that a single page and the full document (all namespaces) can be created, but the partial (specify level) fails every time. See

3. Also see post 26 for improvements I am augmenting this post with some improvements that are needed:

  • SiteExport Extension install and configuration to become almost automatic, or adequate instructions to get it working & fixed. Clear Configuration directions.
  • Identify the exact PHP timing parameters that are needed at a minimum, show how to view PHP settings through use of phpinfo.php and show where & how to change them.
  • Bug fix for “Specified Depth”
  • Bug fix for pathnames and filenames in siteexport config ( & se-debug.txt) preconfigured!
  • Confirm that it works properly with big IndexMenu TOC (Tables of Content)
  • Improvement: Namespace Exclusion list made bigger and better, perhaps EXCLUDE located in a TOC at the bottom.
  • Improvement: Better Link handling and control.
    • Internal Links Not Available: List wiki internal links outside the “book” that will fail & should not be linked. Make a different color & add text [Link not available]
    • All Internet External Links flagged with text [Internet Link]
  • Improvements to Wiki Navigation: Search Box of entire document.
  • Improvements to Wiki Navigation: HyperLinked namespace chain automatically generated at the top (one line only) and at the bottom. Similar to Dokuwiki sequence line. To augment the Browser Back Button for navigation.
  • Have a link to the TOC or Index first in this nav line, top and bottom. Is this a template problem?
  • It would be really helpful if these items could be done.

4. The good news. Installing the Doku & SiteExport on a local server is definitely faster and more reliable. It was difficult to get it configured however. This needs improvement, can it just be preconfigured in the config file?

  • Is the download connection through the Browser what is causing trouble with the internet version? Maybe there should be a choice to just drop the outcome on the server somewhere, disabling the browser download? –Sort of a workaround? Then maintenance admin can download the file with FTP or something?
  • It would be very helpful to get SiteExport working better on the internet, or to identify what the bottlenecks actually are on the server or the internet. (It takes ages and ages to complete, why?)

5. The other good news is that the SiteExport extension does produce good files for single page and full document, and that when done locally it takes 1/3 the time. With all the major improvements and work done on the Renderer xhtml, ckgedit and dw2pdf I believe the actual conversion process is better than ever. Now we just need some improvements to SiteExport!

We have been using SiteExport for Program Release Documentation for the last 3 years. It has not been easy and has taken a lot of time requiring editing of the resultant html. We will continue to use it but are looking at epub as another good form of publication. I expect that flat html will continue to be used with OpenCPN documentation as all OS have that. Therefore improvements in SiteExport would be most welcome!

I just completed an full document export of 645 pages (many blank pages for indexmenu that are excluded) of all 4 books for opencpn and the file is 160mb, and took about 45 minutes.

I have seen during processing, in the data/media directory, the activity of new zip files being added to a main zip file, as shown by the debug-info file recorded, where each page creates a new zip, then is added to a main zip, then it is deleted in a lengthy serial process, page by page.

Rick G. 8/22/2018

Unfortunately the plugin has some real problems that make it an incomplete solution:

Rick G. 8/23/2018

Github file

plugin/siteexport.txt · Last modified: 2019-06-03 11:55 by gamma