User Tools

Site Tools


wiki:how_to_move_pages

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
wiki:how_to_move_pages [2023-12-05 11:58] – created adminwiki:how_to_move_pages [2023-12-08 11:17] (current) – lightbulb added admin
Line 1: Line 1:
-====== How to move pages in DokuWiki ====== +====== 💡How to move pages in DokuWiki ======
-Let's say you have a page ''how_to.txt'' in namespace ''linux'' (that's ''linux:how_to'' in terms of DokuWiki).+
  
-You want to rename this page to ''solution.txt'' and move it to namespace ''help''.+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 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.
  
-Open filemanager as root (or as ''www-user'')+Let's say you have 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'''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.1701773923.txt.gz · Last modified: 2023-12-05 11:58 by admin