[dokuwiki] Re: Can we directly edit data/pages/*.txt ?

  • From: Christopher Smith <chris@xxxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Fri, 3 Jul 2009 10:15:29 +0100


On 3 Jul 2009, at 08:19, Carsten Fuchs wrote:

Now we'd like to globally "Search and Replace" some URLs and names in all wiki pages. Can we do this by directly editing the contents of the data/pages/ *.txt files?

Page locking is not a concern, and having changelog entries for these changes is not required as well. However, are we safe from inadvertently creating any inconsistencies regarding the DokuWiki internals when directly editing the data/ pages/*.txt files?
Anything to be aware of?


For URLs, the search index will be incorrect until DokuWiki reindexes all the pages that have changed. E.g. after the change searching on the new URL is likely to bring no results while searching on the old URL is likely to return all the changed pages. You can use the searchindex plugin (http://www.dokuwiki.org/plugin:searchindex) to rebuild the search index and fix this issue.

What do you mean by "names"?

- Names of people, things - ie. general text - in the wiki pages. As for URLs above

- Page names (first headings). Touch your conf/local.php file to expire the wiki cache. This will ensure DokuWiki rebuilds things before it uses them. Use searchindex plugin or the search index may still be out of kilter for a while.

- Page names (wiki page file names). Touch your conf/local.php file to expire the wiki cache. Pages will lose the connection to their revisions/history. Some other files will be orphaned (e.g. metadata), the search index will be out of kilter, so use the searchindex plugin. DokuWiki can cope with all this, the new names are new pages and DokuWiki will build the things those new pages need.

---

As with all changes of this nature, test, test, test.

Duplicate your wiki. Run the changes. Try it. To duplicate a dokuwiki installation all you need to do is copy the files to some fresh webspace. Running a webserver on your pc is easy enough and then you can modify your hosts file for the duration of your test - just add an entry mapping your wiki domain name to 127.0.0.1.

- Chris


--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: