Is there a way to rename a page through DokuWiki?
Renaming would possibly break a lot of links linking to the old page, but Dokuwiki doesn't know which pages link where so this could be handled. An easy way to “rename” a page is to simply create the new one and then change the content of the old page to something like this:
moved to [[newpage]]
Then visit the pages linking to the old page, and update them to refer to the new page. This can be done gradually.
Does renaming/moving the txt file in the file system do bad things other than breaking links? Does the history move with the moved file? – Zugschlus, 2005-08-11
The history does not get moved with the main file. The history is associated with the filename, not the file itself. — ta' lajzar 2005-08-11 16:37
Note: This tip assumes one is using a Unix-like OS with text file utilities installed, or is using Cygwin under Windows.
Note that following this tip prevents DokuWiki from keeping a coherent page history (old revisions). Remember to back up all raw text files and data.
How-To Rename a set of pages?
Use sed regular expressions to match a filename pattern and replace it with a new filename pattern.
Example: Rename all pages starting with <project_name> to another prefix:
for f in `ls *.txt`; do sed -e 's:\[\[project_name\(.*\)\]\]:[[prj_code.\1]]:g' $f > $f.new; done for f in `ls *.new | sed -e 's:\(.*\)\.new:\1:g'`; do mv $f.new $f; done for f in `ls *.txt | sed -e 's:project_name\(.*\)\.txt:\1.txt:g'`; do mv project_name-$f prj_code-$f; done
Explanation: