: Move the DokuWiki data directory somewhere else? I need to move the DokuWiki data directory away from its default location (because I keep the installation and configuration in version control,
I need to move the DokuWiki data directory away from its default location (because I keep the installation and configuration in version control, but data needs to kept elsewhere, in order to be properly backed up and not be clobbered when upgrading the software version).
How do I this? Is there a simple configuration file? Are there any gotchas?
More posts by @Courtney195
2 Comments
Sorted by latest first Latest Oldest Best
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.
You can change the default location of the data directory by editing /conf/dokuwiki.php
Find line 22 and look for 'savedir' below is the snippet of this entry.
$conf['savedir'] = './data'; //where to store all the files
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.