DokuWiki Guide — Flat-File Wiki Without a Database
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;
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 setupThat’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 contentNamespace 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/commentsCode 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 namespacePermission 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 blogEssential plugins:
| Plugin | Purpose |
|---|---|
| Blog | Turn your wiki into a blog |
| Bureaucracy | Create forms and structured data entry |
| Gallery | Image galleries with lightbox |
| Discussion | Add comments to pages |
| Tag | Tag-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 bootstrap3Select 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
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.
How do namespaces work in DokuWiki? Answer: Namespaces are folders in the filesystem. A page
projects:roadmapmaps todata/pages/projects/roadmap.txt. Colons in page names become directory separators.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).
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
Try It Yourself
- Install DokuWiki on a local server
- Create 3 namespaces and populate them with pages
- Configure ACL to restrict editing to registered users
- Install the Blog and Tag plugins
- Customize the template and sidebar
What’s Next
| Topic | Description |
|---|---|
| MediaWiki | Database-driven wiki for larger projects |
| WordPress | Blog and traditional CMS platform |
| PHP | Server-side language DokuWiki is built on |
| HTML | Understanding wiki output structure |
| CSS | Styling 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