Upgrade on Hosted Webspace per ftp

Here is a description of upgrading a DokuWiki installation to a newer version and restoring your pages.
In this case it was version 2006-03-09b to version 2006-11-06.

1. Backup Files

  • /data dir
  • /conf/acl.auth.php
  • /conf/local.php
  • /conf/users.auth.php
  • /lib/plugins dir(plug-ins1))
  • /lib/tpl dir (Your own template, if present)

2. Install new DokuWiki version

Download DokuWiki-gz archive, extract and copy all files to server. Consider that instead of overwriting/deleting directories, it might be smarter to make a selection which folders can remain on the server, and which should be replaced. The files of which you just have made a backup, may be a good starting point of the files which will probably remain.

3. Restore Settings

If these files are not there yet, copy to the /conf directory:

  • acl.auth.php
  • local.php (If necessary, change template to default temporarily)
  • users.auth.php

4. Set Permissions

Change permissions (non recursive):

  • /conf 757
  • /conf/users.auth.php 646

If you had to copy the /data directory with ftp as well, change:

  • /data/attic 757
  • /data/cache 757
  • /data/locks 757
  • /data/media 757
  • /data/meta 757
  • /data/pages 757
  • /data/meta/_dokuwiki.changes 646 (Only when this is present)

5. Initial Test

  • Start wiki…
  • Do a “do=check” test
  • test login
  • Everything fine?
  • logoff

6. Restore Pages

If there is no alternative to transfering the /data directory from your computer to the hosted webspace, restore all pages and files from the /data directory except the /wiki and /playground directory. (Realize that this step might not be necessary at all. Just leave the complete /data directory where it was previously. Transfer all files and directories, except for the /data directory from your computer. If it had been there already, all permissions are correctly set. Then make sure, the newer /wiki and /playground directory are transferred.)

Due to limitions with some hosted webspace with only ftp access, files/folders with 644/755 might not be able to be edited/deleted with DW. Possibly this has to do with who the owner is of the files. A workaround is changing all permissions to 646/757. With FileZilla 3 (In 2006 dec. still Beta) this can be done automatically, by enabling the “recurse into subdirectories”. This process has to be done twice. Once for all files, secondly for all directories.
See the Dokuwiki forum.

7. Copy Plug-ins

  • Searchindexmanager
  • cacherevisionserase
  • highlight
  • video
  • etc.

~8. Rebuild The Index

Normally the index will be rebuild automatically. However in some rare cases, rebuilding the index manually might be necessary. For this you can use the plug-in Searchindex Manager2). In order to make that work, it might be necessary to modify the temporary fix/hack for this. Insert the following on line 56 in /inc/indexer.php:

if (!is_array($links)) { $links = Array($links); }
  • Start wiki…
  • login, go to manage→Searchindex Manager→Rebuild Index3)
Check compatibilty with newer DokuWiki
Version: searchindex-plugin-2005-09-04.tgz
Clicking the Rebuild Index button didn't gave any reaction. I had to do a refresh of this webpage in order to force my browser (FireFox) to reload the page.