User Tools

Site Tools


wiki:how_to_move_pages

💡How to move pages in DokuWiki

DokuWiki is a flat-file CMS, which means there is no database, everything is stored in files and folders. I will show you how to rename a page and move it to another namespace. There is no clickable solution built-in, but it's very easy to do on command line or in a file manager.

Let's say you have a page how_to.txt in namespace linux (that's linux:how_to in terms of DokuWiki).
Namespaces are nothing else than simple folders on disk.
Now you want to rename this page to solution.txt and move it to namespace help (that's help:solution in terms of DokuWiki).

Go into the main DokuWiki folder and open a filemanager or do the file operations directly on command line. Both should be done as root (or as user www-user).

The pages are located in folder data/pages, there are subfolders for each namespace and .txt files for every page. This is your whole wiki data you will need when doing backups.

In folder data/meta there is the same folder structure like under data/pages, but here it contains only additional data like revision history of each article (file suffix .changes) and search index of each article (suffix .indexed) and also some metadata (suffix .meta). Only the meta files can be safely deleted anywhere without permanent effect since DokuWiki will rebuild the metadata automatically during page browsing.

Now it's quite clear what to do:

# mv data/pages/linux/how_to.txt data/pages/help/solution.txt
# mv data/meta/linux/how_to.changes data/meta/help/solution.changes
# mv data/meta/linux/how_to.indexed data/meta/help/solution.indexed
# rm data/meta/linux/how_to.meta

That's it! :-) Now navigate to the new page, you may need to jump to another page and back to see the changes live.

wiki/how_to_move_pages.txt · Last modified: 2023-12-08 11:17 by admin