DokuWiki Namespace Management — Moving Pages, Renaming, and Permissions
In this tutorial, you'll learn advanced namespace management techniques: moving and renaming pages, setting namespace-level permissions, performing bulk operations, and maintaining namespace organization over time.
What You'll Learn
- Moving pages between namespaces
- Renaming pages
- The Move plugin and how to use it
- Namespace-level ACL rules
- Bulk page operations
- Namespace maintenance and cleanup
Why It Matters
As your wiki grows, pages inevitably need to move. A page created in the wrong namespace, a department renamed, a project restructured — all require moving content. Without the right tools, moving pages means manually editing each file and updating every link. Understanding namespace management tools saves hours of work and prevents broken links.
Real-World Use
A company renames its "QA" department to "Quality Engineering." The wiki administrator uses the Move plugin to move all pages from qa: to quality-engineering:. The plugin updates page content to fix any links that pointed to the old namespace. The move is completed in seconds, and all links continue to work. Without the Move plugin, the admin would need to move 50+ files manually and search every page for links to update.
Learning Path
flowchart LR A[Namespaces] --> B[Namespace Management] B --> C[Page Revisions] C --> D[Search] D --> E[Categories] E --> F[ACL Basics]
Moving Pages Between Namespaces
Manual Move (Without Plugins)
DokuWiki does not have a built-in move function in the web interface. To move a page manually:
- Locate the page file in
data/pages/ - Move or copy the file to the target namespace directory
- Update all links that pointed to the old page ID
- Optionally, delete the old file
# Example: Move projects:roadmap to archive:projects:roadmap
mkdir -p data/pages/archive/projects
mv data/pages/projects/roadmap.txt data/pages/archive/projects/roadmap.txt
mv data/pages/projects/roadmap.changes data/pages/archive/projects/roadmap.changes
mv data/pages/projects/roadmap.meta data/pages/archive/projects/roadmap.meta
This approach works but does not update links. You must manually find and update every page that links to projects:roadmap.
Using the Move Plugin
The Move plugin automates page moves and updates all links. Install it:
cd /var/www/html/wiki/lib/plugins/
wget https://github.com/splitbrain/dokuwiki-plugin-move/archive/master.zip
unzip master.zip
mv dokuwiki-plugin-move-master move
After installation, an admin can move pages from the "Admin" menu under "Move Pages."
The plugin provides a form:
Source page: projects:roadmap
Target page: archive:projects:roadmap
[✓] Update links in other pages
[✓] Keep redirect for 30 days
[Move]
When you submit, the plugin:
- Moves the
.txt,.changes, and.metafiles - Updates all pages that link to the old page ID
- (Optionally) Creates a redirect from the old location
Renaming Pages
Renaming a page within the same namespace follows the same Process as moving:
Source page: projects:old-name
Target page: projects:new-name
The Move plugin handles both namespace moves and simple renames.
Namespace-Level ACL
Setting ACL rules per namespace controls who can read, create, edit, or delete pages in that namespace.
ACL Rule Format
# conf/acl.auth.php
* @ALL @1 # Everyone reads everything
* @user @8 # Users edit everything
@internal @ALL @0 # Internal namespace is hidden
@internal @staff @16 # Staff has full access to internal
@projects @admin @16 # Only admins edit projects
The @ symbol before a namespace name indicates a namespace rule. The pattern is:
@namespace user/group permission
@namespace:sub user/group permission
Inheritance
ACL rules inherit from parent to child namespace. A rule on @engineering applies to all pages in engineering:*. A more specific rule on @engineering:backend overrides the parent for that sub-namespace.
Permission Priorities
When multiple ACL rules apply, DokuWiki uses the most specific (longest match) rule:
- Page-specific rules (most specific)
- Sub-namespace rules
- Parent namespace rules
- Global rules (least specific)
Bulk Page Operations
Creating Multiple Pages
To create pages in bulk, write the .txt files directly in data/pages/:
# Create 10 meeting notes pages
for i in $(seq -w 1 10); do
cat > data/pages/meetings/2026-06-$i.txt << EOF
====== Meeting Notes: June $i, 2026 ======
**Attendees:** TBD
**Agenda:**
* Item 1
* Item 2
**Notes:**
**Action Items:**
EOF
done
After creating the files, run the indexer to update the search index.
Deleting Pages in Bulk
To delete all pages in a namespace:
rm -rf data/pages/old-namespace/
rm -rf data/media/old-namespace/
rm -rf data/meta/old-namespace/
rm -rf data/attic/old-namespace/
Be very careful with bulk deletion. There is no undo for rm -rf.
Namespace Maintenance
Finding Orphaned Pages
Pages that no one links to are "orphaned." To find them:
- Use the "Site Map" feature to list all pages
- Compare against your navigation structure
- Pages not linked from any other page or the sidebar are candidates for archiving or deletion
Archiving Old Namespaces
Instead of deleting old content, move it to an archive: namespace:
archive:
projects:
old-project-a:
old-project-b:
team:
former-members:
This keeps the content accessible without cluttering the main navigation.
Namespace Documentation
Create a namespace index page that documents the purpose of each namespace:
====== Namespace Guide ======
This page documents our wiki namespace structure.
| Namespace | Purpose | Permissions | Maintainer |
|-----------|---------|-------------|------------|
| projects: | Active project documentation | Admin edit | Project leads |
| engineering:| Technical documentation | Engineering edit | Tech lead |
| hr: | HR policies and procedures | HR edit | HR director |
| archive: | Archived projects | Admin read/write | Wiki admin |
The Pagemove Plugin
The Pagemove plugin (an alternative to the Move plugin) provides similar functionality with a different interface. It is available from the DokuWiki plugin Repository.
Key features of both plugins:
- Move pages with full link updates
- Rename pages within a namespace
- Move entire namespaces
- Automatic redirects from old locations
- Revision history preservation
Common Mistakes
- Moving files manually without updating links: Your pages move to the new location, but every link from other pages now points to a non-existent page. Always update links when moving pages.
- Not checking ACL rules after moving namespaces: If a namespace had specific ACL rules, moving pages might change who can access them. Review ACL rules after any namespace change.
- Moving pages between servers without preserving metadata: The
.changesand.metafiles are essential for revision history. Copy them along with the.txtfiles. - Creating deeply nested namespaces without a plan: Namespaces created ad-hoc for each project lead to inconsistent structure. Design the hierarchy before creating namespaces at scale.
- Forgetting to update the sidebar after namespace changes: The sidebar often contains links to moved pages. Update the sidebar after any significant namespace reorganization.
Practice Questions
- What is the Move plugin and why is it important for namespace management?
- How do ACL rules inherit from parent namespaces to sub-namespaces?
- What three files must be moved when manually relocating a page to a new namespace?
- Challenge: Write a script that exports all pages from a specific namespace as
.txtfiles, transforms the namespace prefix in the content (updates internal links fromold-prefix:tonew-prefix:), and imports them into a new namespace. The script should handle the.changesand.metafiles as well. Test the script by moving a namespace with at least 5 pages and verifying that internal links are updated correctly.
FAQ
Mini Project
Goal: Perform a namespace reorganization.
- Create a namespace
projects:with at least 3 pages (for example, project-alpha, project-beta, project-gamma) - Create a namespace
archive:for old projects - Install the Move plugin
- Move
project-gammafromprojects:toarchive:projects:using the Move plugin - Verify that links from other pages are updated
- Manually move another page from
projects:toarchive:by moving files on the filesystem - Update the sidebar to reflect the new namespace structure
- Verify both moved pages are accessible at their new locations
What's Next
Namespaces organize your content. Now learn about page revisions to understand DokuWiki's version control and how to recover from mistakes.
Built by the developers of DodaTech
Doda Browser, DodaZIP & Durga Antivirus Pro