It's better when it's simple

User Tools

Site Tools


offline Plugin

Compatible with DokuWiki

2009-02-14, rc2009-02-06, rc2009-01-30, 2008-05-05 and 2007-06-26b

plugin Generates a static version of your wiki that will be browseable offline.

Last updated on

This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.

Similar to dokukiwix, siteexport

Tagged with export, html

Download and Installation

Download and install the plugin using the Plugin Manager using the following URL. Refer to Plugins on how to install plugins manually.


Please share your comments and ideas with me on this page. — Graw 2009/02/09 10:12


I have it plugged in, now how do I get it to work?

Tried it out but: Safe mode restriction in effect - the script is not allowed to access '/home'. This comes from using an absolute path to the DokuWiki installation, appending the path to the ../../data/tmp dir. — .fredy 2009/02/22
Touché! All my test installations do not run in safe mode …
I'm using absolute paths because setting a working directory was not always possible. On some installations it worked well but on others it did not. Any ideas? — Carsten Graw 2009/03/10
The solution is to rewrite create_directory() to use the recursive option of mkdir(dir,mode,TRUE) — fredy 2010/03/18
function create_directory($dirStr, $mode = 0777) {
        global $offlineConf;   
        $msgStr = 'Creating directory "' . $dirStr . '" ... ' . "\n";
        log_msg(__LINE__, $msgStr);
        if (!is_dir($dirStr)) {
                if (mkdir($dirStr, $mode, true)) {
                        $msgStr .= 'ok.';
                        log_msg(__LINE__, compact('msgStr'));
                } else {
                        $msgStr .= 'ERROR: Could not create directory!' . "\n";
                        $msgStr .= 'Program aborted.' . "\n\n";
                        log_msg(__LINE__, compact('msgStr'));
        } else {
                $msgStr .= '  already exists.';
                log_msg(__LINE__, $msgStr);
in dry run, the existence check for wget failed. This is also due to the safe mode restriction. In safe mode you cannot access /opt/csw/bin/…. all allowed binaries are preconfigured via php.ini. — .fredy 2009/02/22
So, if you cannot access php.ini you will not be able to use wget, unless it was already preconfigured - right? — Carsten Graw 2009/03/10
In a huge wiki, it Would be nice to be able to give it a starting point from where to start recursion in the page and meta trees — .fredy 2009/02/22
You're right, I'll put on my list for future improvements. — Carsten Graw 2009/03/10
My DokuWiki is installed on Windows server. Function escapeshellcmd() in create.php removes backslashes from paths to wget and zip. So if I configured path as 'C:\usr\GnuWin32\bin\wget.exe' script converts it into 'C: usr GnuWin32 bin wget.exe'. So when we try to execute wget or zip via call to system() function it does nothing at all. Excluding calls to escapeshellcmd() solved the problem. — VitVlkv 2009/04/04
In a private wiki (anonymous users cannot even view any pages) how to supply user name and password to wget? Couldn't find any solution in Documentation for offline plugin. Will be trying to figure it out by myself… — VitVlkv 2009/04/04
I'm having trouble with this! The script runs, mirrors the structure, copies the media files but the HTML files are empty. What am I doing wrong? — asp 2009/04/06

Same thing happened for me, this fixed it … 'ln -s dokuwiki-2011-05-25a dokuwiki'

Please, read my previous post about php function escapeshellcmd(). The script works fine without it. — Neil 2011/09/15

I'm a newbee, please show me how til exclude calls to escapeshellcmd() — Jan Erik 2009/04/27

It's very simple. You have to edit create.php file. Find all occurences of “escapeshellcmd” substring. Every time you see something like $a = escapeshellcmd(another_function()); replace it with $a = another_function(); — VitVlkv 2009/06/19
The Plugin runs, the log is OK, it says the Offline version are created and give me the link “http://www.”“/pilzwiki/lib/plugins/offline/” but there is no file. i also search in the whole directory an there is also no offline version…
… what can go wrong? what i've to write in the Field “plugin»offline»dokuwikiRelativePath” z.b. localhost? thanks for helpEric eric dot 2009/09/03
I have the same problem here if someone can help us giving informations about it.
I've adapted the plugin a bit to our needs (datadir not inside the webroot, no media files). See for my diffs. –Otmar Lendl, 2011/01/03


Hi, I just tried this plugin (with dokuwiki-2009-12-25c). It works just fine, but I have the folowing two issues :

  1. The smileys images are not copied in the archive, which make them to always appear as alt text.
  2. It seems incompatible with the imagemap plugin, which makes the images also to appear as alt txt (even if the actual image files are copied in the archive)

Any ideas how I can solve those 2 issues ?

For information, other “classic” images work just fine –Cyrille GACHOT 2010-07-23

Your wiki requires authentication? You might be out of luck

Very promising plug-in, however, all my pages come out “Permission denied.” Your cryptic explanations surrounding this problem (something about .htaccess) are insufficient to permit me to figure out how to log in during the creation of offline pages. No idiot-proofing here. I'm guessing that the fact that I've set up a private wiki with numerous users who've populated it with many pages doesn't make me expert enough to be able to use this utility. Alas, if you're a potential user of this plug-in and your wiki requires authentication to access, you may be out of luck with this one. –Russell Bateman, 2011/07/29

I have it installed now what do I need to do to actually make it work??? –Bryson Hair, 2013/05/23

Great plugin. How can I customize it to obtain a a5paper size? – Celano, 2013/07/05

Namespace filtering?

Good work here! Is it possible to restrict the namespaces that will be zipped? – Eldad, 2014/02/10


Site is configured to fncode = utf-8. How do the packing cp1251? – Vladimir Sirenko, 2014/04/04

plugin/offline.txt · Last modified: 2016-01-26 17:29 by Aleksandr