Skip to content
DokuWiki Guide — Flat-File Wiki Without a Database

DokuWiki Guide — Flat-File Wiki Without a Database

DodaTech Updated Jun 6, 2026 6 min read

DokuWiki is a flat-file wiki engine — it stores everything as plain text files instead of a database. Think of it as a wiki that lives in a folder: no MySQL setup, no database admin, just files. If MediaWiki (what Wikipedia runs on) is like a library with a card catalog, DokuWiki is like a well-organized notebook — simpler, faster, and easier to carry.

What You’ll Learn

  • DokuWiki’s flat-file architecture and folder structure
  • Writing content with DokuWiki syntax
  • ACL (Access Control List) permissions
  • Plugins, templates, and configuration
  • Backing up and migrating a DokuWiki site

Why Flat-File Wiki Matters

Most wikis (like MediaWiki) need a database server. DokuWiki removes that requirement — every page is a .txt file. This means:

  • No database to install or maintain
  • Backup means copying files (rsync, tar, Git)
  • Version history stored as file diffs
  • Runs on minimal hosting (even shared hosting with PHP)

DodaTech uses DokuWiki for internal project documentation. The flat-file model means anyone can edit a page with a text editor and changes are tracked in the file system — similar to how Durga Antivirus Pro stores signature definitions as individual files.

    flowchart LR
    A["CMS Overview"] --> B["DokuWiki<br/><strong>You are here</strong>"]:::current
    B --> C["Choose Your CMS"]

    classDef current fill:#38bdf8,color:#0f172a,stroke-width:2px;
  
Prerequisites: Basic understanding of PHP and web servers. No database knowledge needed. If you’ve used MediaWiki before, the concepts are similar but simpler.

Installation

DokuWiki has no database setup — just PHP and a web server:

# Download the latest stable release
wget https://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz
tar -xzf dokuwiki-stable.tgz
mv dokuwiki-*/ /var/www/html/wiki

# Set permissions
chown -R www-data:www-data /var/www/html/wiki
chmod -R 755 /var/www/html/wiki

# Visit https://yourserver/wiki/install.php
# Enter a wiki name, admin user, and password
# Delete install.php after setup

That’s it. No database creation, no configuration file editing. DokuWiki creates its own config during install.

Page Structure

Pages are stored as .txt files in data/pages/. Namespaces become folders:

data/pages/
├── wiki/
│   └── welcome.txt          # wiki:welcome — default welcome page
├── projects/
│   ├── start.txt            # projects:start — namespace start page
│   └── roadmap.txt          # projects:roadmap
├── start.txt                # start — main start page
└── sidebar.txt              # sidebar content

Namespace paths use colons in DokuWiki syntax: [[projects:roadmap]] links to projects/roadmap.txt.

Wiki Syntax

DokuWiki has its own lightweight markup:

====== Heading Level 1 ======
===== Heading Level 2 =====

**Bold text** //Italic text// __Underlined__ ''Monospace''

* Bullet list item
* Another item

  - Indented item

[[page]]                     # Link to a page
[[page|Display Text]]        # Link with custom label
[[http://example.com]]        # External link
{{:image.png}}                # Display an image
{{namespace:image.png}}       # Image from another namespace

>>?                          # Discussion/comments

Code Blocks

<code php>
<?php echo "Hello, Wiki!"; ?>
</code>

Use `<file>` instead of `<code>` for downloadable file blocks.

ACL (Access Control)

DokuWiki uses Access Control Lists for permissions — simpler than MediaWiki’s group system:

# conf/acl.auth.php
*                       @ALL            @1          # Everyone can read
*                       @user           @8          # Registered users can edit
@admin                  @user           @16         # Admins can do everything
@pages                  @admin          @16         # Only admins edit admin namespace

Permission levels:

  • @1 — Read
  • @4 — Create
  • @8 — Edit
  • @16 — Delete/Admin

Plugins

Plugins extend DokuWiki. Install via the Extension Manager in the admin panel or manually:

# Manual install — download and extract to lib/plugins/
cd /var/www/html/wiki/lib/plugins/
wget https://github.com/splitbrain/dokuwiki-plugin-blog/archive/master.zip
unzip master.zip
mv dokuwiki-plugin-blog-master blog

Essential plugins:

PluginPurpose
BlogTurn your wiki into a blog
BureaucracyCreate forms and structured data entry
GalleryImage galleries with lightbox
DiscussionAdd comments to pages
TagTag-based content navigation

Templates

Templates (themes) change DokuWiki’s appearance. Built-in templates live in lib/tpl/:

# Install the Bootstrap3 template
cd /var/www/html/wiki/lib/tpl/
git clone https://github.com/giterlizzi/dokuwiki-template-bootstrap3 bootstrap3

Select the template in the Configuration Manager or set it in conf/local.php:

$conf['template'] = 'bootstrap3';

Common Mistakes

1. Leaving install.php Accessible

After installation, delete install.php. Anyone accessing it can reconfigure your wiki.

2. Forgetting File Permissions

DokuWiki needs write access to data/, conf/, and lib/plugins/ directories. Incorrect permissions cause errors that look like software bugs.

3. Not Setting Up Backups

Since everything is files, backup is simple — but only if you do it. Set up daily rsync or tar backups of the entire DokuWiki directory.

4. Using DokuWiki for Large-Scale Public Wikis

DokuWiki is optimized for small to medium wikis (hundreds to low thousands of pages). For Wikipedia-scale projects, use MediaWiki which has better caching and database optimization.

Practice Questions

  1. What is the biggest advantage of DokuWiki over MediaWiki? Answer: No database required. DokuWiki stores pages as flat files, making installation, backup, and migration simpler. It runs on basic shared hosting without MySQL.

  2. How do namespaces work in DokuWiki? Answer: Namespaces are folders in the filesystem. A page projects:roadmap maps to data/pages/projects/roadmap.txt. Colons in page names become directory separators.

  3. What is an ACL in DokuWiki? Answer: ACL (Access Control List) defines who can read, create, edit, or delete pages. It uses a permission model with levels 1 (read), 4 (create), 8 (edit), and 16 (admin).

  4. Challenge: Install DokuWiki, create a wiki with 3 namespaces and 5 pages, configure ACL to require login for editing, install the Blog plugin, and create a custom sidebar with navigation links.

FAQ

Does DokuWiki support file uploads?
: Yes. By default, users can upload images and files. Configure allowed MIME types and file size limits in the Configuration Manager.
Can I use DokuWiki for a public documentation site?
: Absolutely. DokuWiki is widely used for open-source documentation, project wikis, and knowledge bases. It supports caching and compression for performance.
How does DokuWiki handle concurrent editing?
: DokuWiki uses a locking mechanism — when someone edits a page, it’s locked for others. If a lock expires (user walks away), an admin can break the lock.
Is DokuWiki suitable for enterprise use?
: Yes, for internal wikis and documentation. It supports LDAP authentication, fine-grained ACL permissions, and integration with version control systems.

Try It Yourself

  1. Install DokuWiki on a local server
  2. Create 3 namespaces and populate them with pages
  3. Configure ACL to restrict editing to registered users
  4. Install the Blog and Tag plugins
  5. Customize the template and sidebar

What’s Next

TopicDescription
MediaWikiDatabase-driven wiki for larger projects
WordPressBlog and traditional CMS platform
PHPServer-side language DokuWiki is built on
HTMLUnderstanding wiki output structure
CSSStyling DokuWiki templates

What’s Next

Congratulations on completing this DokuWiki tutorial! Here’s where to go from here:

  • Practice daily — Consistency is more important than long study sessions
  • Build a project — Apply what you learned by building something real
  • Explore related topics — Check out other tutorials in the same category
  • Join the community — Discuss with other learners and share your progress

Remember: every expert was once a beginner. Keep coding!

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro