I wanted to do a similar thing to keep as much writable stuff out of 'www' as possible, so moved the 'conf' and 'data' folders to a new 'wikifiles' folder.
Assuming that your paths are going to become "var/wikifiles" and "var/www/dokuwiki":
- Move the 'data' and 'conf' folders to 'var/wikifiles'.
- Do not edit 'conf/dokuwiki.php'.
Edit 'conf/local.php' (or create it based on 'conf/local.php.dist') and set the value of $conf['savedir']
to your new path, e.g: $conf['savedir'] = '/var/wikifiles/data';
.
- Edit or create a file called 'preload.php' in 'var/www/dokuwiki/inc' and define a path to the 'conf' folder, e.g:
define('DOKU_CONF','var/wikifiles/conf/');
One gotcha would be if you're moving an existing installation, especially if it's not working as expected: Always check for 'inc/preload.php' as well as 'conf/local.php'. I always remember to do that, and totally didn't just waste a few moments staring blankly at a "The datadir ('pages') at /pages is not found" message.