Dokuwiki notes and tricks
Latest update 2020-08-04.
Automatic UI language switch
- Installed languages: en, fi
- The content is divided to two language sections so that all pages url's start with en or fi
Add to conf/local.php:
@include(DOKU_CONF.'local.protected.php');
In conf/local.protected.php:
<?php $conf['lang'] = 'en'; $detected_lang = preg_replace('/^(..).*/i','$1',$_REQUEST['id']); if (strcmp($detected_lang, 'fi') == 0) { $conf['lang'] = 'fi'; } ?>
Change password from Linux command line
- apt install whois
- mkpasswd -m md5crypt
- type in the new password
- copy the hash to conf/users.auth.php
Upgrading Dokuwiki
- Backup the server content
- Select the desired version, typically it is the recommended version and already selected
- Press “toggle all” to uncheck all other languages than English
- Don't tick anything else
- Press “Start Download” button
- A .tgz file is download
- Ship the file to the server
- Follow instructions on page https://www.dokuwiki.org/install:upgrade starting from step 4
- Untar the tar
- Become a root user
- Copy the files over the current installation
- Check permissions https://www.dokuwiki.org/install:permissions
- Delete unused files https://www.dokuwiki.org/install:unused_files
- Delete the default Dokuwiki content, pages/wiki
- Check that the site works ok