Posted by: Josh | June 1, 2010

CodeIgniter integration with DokuWiki

This simple library for CodeIgniter makes rendering a page from a local DokuWiki installation as simple as loading a CI view.

With the permission of Jérôme Jaglale over at, I brought over his rendering code and packaged it up for CI. The comments on his code’s release have also been taken into consideration.

It should be compatible on any server hosting both a functioning CI and DW installation, and has been tested on CodeIgniter 1.7.2 + DokuWiki 2009-12-25c “Lemming” and PHP 5.2.


  1. Obtain the plug-in.
    A zip archive with the files in their relative subdirectories is downloadable here.
  2. Install in CI application.
    Simply copy the files in the config/ and libraries/ archive directories to the CI application folder’s.
  3. Configuration.
    Edit dokuwiki.php in the config/ directory, modifying parameters as necessary.
  4. Usage.
    Functions exactly like a standard CI library. The library itself can be autoloaded or manually loaded with the library name “dokuwiki” (the config/ file will automatically be loaded as well).

    Rendering the XHTML for the DokuWiki start page “doku:start” is then as simple as:

    and if a return to an XHTML string is desired instead,
    $this->dokuwiki->render(‘doku:start’, TRUE);

As an interface to Jérôme’s code, this plugin has the same caveats:

  • DokuWiki content access is unrestricted
  • Uncached wiki pages not accessible (rare concern if editing pages via DW web interface)

Remember that for some links and media to display nicely, you’ll need to apply the DokuWiki CSS stylesheets. Thanks again to Jérôme for making this integration library possible.


  1. Hi, Im not quite following what your doing here. Do you have any fuller instructions anywhere?

    I have my CI install in the root directory.

    My Dokuwiki is installed in /infopages

    Could you please do me a massive favor and explain what I need to do to get this to work?

    I have installed the required libries in the libries folder. and copied the config file into the application folder. What do I now need to do to edit the dokuwiki folder in the /infopages area?



  2. could you please update the link to the zip archive with relative directories? And also perhaps elaborate a little? Would be great!

  3. my dokuwiki at another server.i using above code it showing Doku_Renderer_xhtml class not found

  4. Outra opção é você terceirizar todo processo de distribuição e ficar por conta somente pela divulgação de sua loja na internet, uma muito conhecida é Magazine você
    da Magazine Luíza, você ganha uma comissão sobre a venda do produto.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s


%d bloggers like this: