Table of Contents
Site Export Plugin
Compatible with DokuWiki
- 2020-07-29 "Hogfather" probably
- 2018-04-22 "Greebo" probably
- 2017-02-19 "Frusterick Manners" probably
- 2016-06-26 "Elenor Of Tsort" yes
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
Download and Installation
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.phpfile for template switching
- /data/media/wiki dir must exist. load some file for creating it.
If any inconveniences or problems occur, please file an issue at the bug tracker.
- Version upped (2022-05-03 16:54)
- Check for the version. (2022-05-03 16:46)
- Version upped (2022-03-25 07:12)
- Make sure, the end tags come as well (2022-03-25 07:10)
- Variable Name fix. (2022-03-25 06:51)
- Remove empty hint sections (2022-03-25 06:44)
- Update Travis (2021-12-28 06:44)
- Variable by reference (2021-12-28 06:33)
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).
- install an DokuWiki instance on your server;
- run install.php an choose: ACL enable and open wiki
- install plugin siteexport
- Get stuff in. This means
- config-files like: smileys,…
be careful in using everything concerning authentication. In an non-open wiki export doesn't work
- used templates (I use the default without compatibility problems)
- hacks of your DokuWiki
- 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.
- pages you want to export
- create a startpage which links the pages, when you don't have a menu structure which doesn't show the subfolder
- 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!
- login and go to config-menu: siteexport; check options; to run links to wget and dl-link should appear otherwise it doesn't work
- click generate and download the packed pages
by starting doku.html 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 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: http://screencast.com/t/QoWLxLpl1sKk. 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.
User contributed information
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
8/22/2018 Comments after installing local servers & siteexport (Bitnami-Doku & DokuwikiStick)
The path and filename issues for the se-debug.txt file and the se-html.zip file are very confusing and difficult. See this informative discussion https://github.com/i-net-software/dokuwiki-plugin-siteexport/issues/64#issuecomment-259107715
- Please see this forum post https://forum.dokuwiki.org/thread/16168 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 https://forum.dokuwiki.org/post/62202
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?)
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.
Github Readme.md file
Mandatory reading for configuration of exports! https://github.com/i-net-software/dokuwiki-plugin-siteexport#dokuwiki-site-export