This is a read-only archive. Find the latest Linux articles, documentation, and answers at the new!

Feature: Internet & WWW

DokuWiki: An elegant and lightweight wiki engine

By Dmitri Popov on June 25, 2008 (9:00:00 AM)

Share    Print    Comments   

Created as a simple solution for managing documentation, DokuWiki has evolved into a powerful and flexible wiki suitable for most tasks involving collaborative editing. DokuWiki doesn't use a database back end (all pages are stored as plain text files), which makes it easy to install and maintain. Its access control list feature offers a user-friendly and flexible mechanism for restricting access to certain pages and namespaces. You can also extend DokuWiki's default functionality using plugins, and there are hundreds of plugins to choose from.

Since DokuWiki doesn't rely on a database back end, you need only a Web server with PHP to install and run the software. Download the latest release of DokuWiki, unpack the downloaded archive, and move the resulting folder (you might want to rename it to "dokuwiki") to your Web server. You can also install DokuWiki into the root of your server by moving the contents of the unpacked folder into the server's root directory. Make sure that the conf and data directories are writable by the server. To do this, use an FTP client to set permissions for both directories to 777. Then point your browser to http://yourserver/dokuwiki/install.php to start the DokuWiki installer. To install DokuWiki, you must give your wiki a name, enable access control lists, and choose the initial ACL policy for your wiki. Press then the Save button, and your wiki is ready to go.

Once DokuWiki is installed, you can start populating it with pages. The easiest way to do this is to create the start page (the default page you land at when you point your browser to http://yourserver/dokuwiki) by pressing the Create this page button. Like any wiki system, DokuWiki allows you to add links to non-existing pages, so you can "grow" your wiki as you go. To insert an empty link into the currently edited page, put the page name in double brackets: [[link_to_empty_page]].

Although DokuWiki doesn't have a WYSIWYG editor, it does include a toolbar that contains buttons for frequently used formatting options such as bold, italics, headings, lists, links, and more. To make it easier to edit long pages, DokuWiki includes a nifty feature that automatically breaks a page into sections that can be edited separately. It does so by using page headings, and it breaks a page into sections only if the page contains more than three headings (this default value can be adjusted in the Configuration Settings section of the wiki). DokuWiki also automatically generates a table of contents (TOC) for any page that has more than three headings (this value can also be adjusted). This helps readers quickly locate sections in a long page. You can turn this feature off for individual pages by inserting the ~~NOTOC~~ flag somewhere in the page.

Each time you click the Save button, DokuWiki saves the previous version of the page you're working on. You can then use the Old revisions button to view a list of previous versions of the page and compare two or more versions. DokuWiki uses color codes to mark differences between compared page revisions, which makes it easier to track changes. Users can also keep track of changes made to wiki pages using RSS feeds automatically generated by DokuWiki. The Recent changes feed tracks modifications in all wiki pages, while the Current namespace feed monitors pages only in a particular namespace.

You can organize pages in your wiki by topic or any other criteria using so-called namespaces, which act as virtual folders. To create a new namespace, insert a link into the currently edited page using the format [[namespace:page]]. For example, if you want to create a page called "idioms" in a namespace called "english," the link would be [[english:idioms]].

To keep tabs on pages and namespaces, DokuWiki offers an Index page that contains an expandable tree which you can use to browse through namespaces and pages. You can jump to it using the Index button at the bottom of every wiki page. The Search feature provides another way to quickly locate pages in your wiki. Start typing the name of the page you want to find, and DokuWiki automatically displays a list of matching pages and namespaces, narrowing the results as you continue to type. Pressing the Search button returns a list of found pages and highlights the search term in the page summaries.

DokuWiki supports page templates, which can come in handy in situations when every page must include static text such as a disclaimer or copyright notice. To set up a template, create a new wiki page (or use an existing one) and format it the way you want it. Then copy the contents of the page and paste it into a plain text file. Alternatively, you can use a text editor to create and format a template if you are familiar with DokuWiki's formatting options. Save the file as _template.txt and move it into the desired namespace using an FTP client. The system will then apply the template to any page created in that namespace. The clever part is that you can create different templates for different namespaces, so you can, for example, create one template for articles and another template for tips.

Administering and extending DokuWiki

The Admin button at the bottom of every wiki page provides access to DokuWiki's administrative features, including the Access Control List Management and Configuration Settings sections. The former allows you to control access privileges for individual pages and namespaces. The available tools allow you to grant granular privileges to specific users and groups. For example, you can allow a certain user to read and edit pages in a particular namespace while restricting the user's ability to create new pages, delete existing ones, and upload files.

The Configuration Settings section allows you to tweak virtually every aspect of your wiki. The Authentication section contains the Disable DokuWiki actions option, which lets you turn DokuWiki's features on and off. For example, if you want to disable the revisions feature, you can do so by ticking the Old Revisions check box. The Advanced Settings section contains another useful option called Hide matching pages. It allows you to hide pages that match a specific regular expression. For example, if you want to hide all pages that contain the "hidden" string in their names, you can do so by specifying the regular expression ^.*?:hidden$. You can also use pipes to specify multiple page names; for example, ^.*?:hidden$|temporary$. Keep in mind, though, that this feature only hides pages from DokuWiki's search and RSS feeds, and it's not designed to protect confidential information in wiki pages.

The Administration part of DokuWiki contains the Manage Plugins section, which lets you install and manage plugins to extend the default functionality. To install a plugin, enter its link into the URL field and press the Download button. Since the plugin manager requires write access to the plugins folder, it may not always work on your particular DokuWiki installation. In that case, you can install plugins manually. Download the plugin package in zip or tar.gz format, unpack it, and upload the resulting folder to the lib/plugins directory in your DokuWiki installation.

The official plugin page contains more than 100 useful plugins, and which one you choose to install depends, of course, on your needs. There are, however, a few must-have plugins for any DokuWiki installation. The ODT Export plugin, for example, allows you to save any page in DokuWiki as an Writer document. With this plugin installed, you can add an ODF export button to any wiki page by inserting the ~~ODT~~ flag somewhere in it. Tag is another plugin worth installing. It adds tagging capabilities to DokuWiki. The plugin lets you tag wiki pages using simple markup like {{tag>tag1 tag2 tag3}}; for example, {{tag>english language idioms}}. You can then generate a list of all pages containing a certain tag or tags using the syntax {{topic>tag1 tag2}}; for example, {{topic>idioms}}.

Final word

Behind DokuWiki's lightweight and elegant appearance hides a powerful and flexible wiki engine that can help you to publish information and collaborate with consummate ease. Moreover, using the available plugins, you can beef up DokuWiki's default functionality and even transform it into a blog, a database, or a task manager. Finally, if you decide to go with DokuWiki, check the DokuWiki Manual and Tips and Tricks pages, which can help you get the most out of this excellent wiki engine.

Dmitri Popov is a freelance writer whose articles have appeared in Russian, British, US, German, and Danish computer magazines.

Share    Print    Comments   


on DokuWiki: An elegant and lightweight wiki engine

Note: Comments are owned by the poster. We are not responsible for their content.

DokuWiki: An elegant and lightweight wiki engine

Posted by: Anonymous [ip:] on June 25, 2008 12:34 PM
Absolutely. I've used it home and work, and it is a great and reliable wiki.
The template and plugins library is large and very good.
Highly recommended.


DokuWiki: An elegant and lightweight wiki engine

Posted by: Anonymous [ip:] on June 25, 2008 03:02 PM
An ongoing project to give DokuWiki a WYSIWYG is DokuWikiFCK from It uses the FCKeditor as its front end and aims to provide as much of that Editor's graphic capabilities as possible.


DokuWiki: An elegant and lightweight wiki engine

Posted by: Anonymous [ip:] on June 25, 2008 04:57 PM
If your looking for a wiki the current top 2 are:

TWiki (perl)
MoinMoin (python)


Re: DokuWiki: An elegant and lightweight wiki engine

Posted by: Anonymous [ip:] on June 26, 2008 02:35 PM
Top two according to what metric?


DokuWiki: An elegant and lightweight wiki engine

Posted by: Anonymous [ip:] on June 25, 2008 09:45 PM
"If your looking for a wiki the current top 2 are:..."

This this assertion is base on what? Clearly your opinion of "top 2" and nothing else. There are a ton of quality options in the open source wiki world, with many suited for certain tasks more than others. For a good comparison:

Note: I'm not knocking your top 2 as they are quality products and well known, but I doubt most would agree with this ranking.


Top two what?

Posted by: Anonymous [ip:] on June 26, 2008 09:06 AM
I agree with the last poster; TWiki and MoinMoin are quite good, but hardly what most of us would think of as the Top 2. My list probably runs something like MediaWiki (thank you, Wikipedia, for stress-testing that for us), TikiWiki, DocuWiki for something your grandmother could figure out, and Trac if you're in a creative/development field. After putting these four in my (response to) "Top 2", I'd probably think about MoinMoin on top of that, since it's had Zeus knows how many forks. But your mileage WILL vary, and that Wikipedia comparison, since it doesn't do anything idiotic like rank them, is pretty good.

And yes, I have actually used all of the above, and administered DokuWiki, MoinMoin and MediaWiki.


DokuWiki: An elegant and lightweight wiki engine

Posted by: Anonymous [ip:] on June 27, 2008 09:15 PM
I just downloaded and installed it. No fuss whatsoever. Very easy to use. Exactly what I have been looking for.


DokuWiki: An elegant and lightweight wiki engine

Posted by: Anonymous [ip:] on July 04, 2008 12:24 AM
Can DocWiki help me create documentation, or is it just a wiki? In other words, can it export a set of pages as docbook XML, latex, ODT, or something similar?

I don't want to knock it, but I am curious if there is something better for collaborative online documentation than what I have chosen for Kino[1]. The Kino User Guide wiki exports easily to docbook XML, which I use to generate the online help for the application. I did find this thing called DocBook DocuWiki[2]; however, it appears to only facilitate a single page as docbook document whereas DocBookWiki[3] lets you use the wiki tech for managing the entire document.



This story has been archived. Comments can no longer be posted.

Tableless layout Validate XHTML 1.0 Strict Validate CSS Powered by Xaraya