Multisite DokuWiki Install

I wanted to be able to install DokuWiki with a single code base serving multiple wikis. This would have several advantages especially making updates easier.

There are a variety of ways of doing this, and thus a variety of instructions around the web. I used the instructions here and this is what I did.

For the purposes of this post I will be using /var/www/dokuwiki as the directory containing the Dokuwiki code and thus the ‘farmer’ in my setup. I created a folder /var/www/wikis/ to contain all the ‘animals’. So for a wiki named ‘mydocs’ the filesystem path would be /var/www/wikis/mydocs and the URL would be http://www.mydomain.tld/wikis/mydocs

Download DokuWiki and extract. There should now be a directory named ‘dokuwiki’. Remove the install.php file and create the preload.php file:

Uncomment the two lines referring to farm in preload.php

so the file should look like:

Amend Apache Conf or .htaccess

If your host allows using .htaccess you can add the following in a .htaccess file inside your dokuwiki directory OR if you have access to the Apache conf files you could add the following directives there:

Adding More Animals / Sub Wikis

Copying the _animal directory with a new name should give you a new wiki but you will need to amend the basedir path in the local.protected.php file within that new wiki folder, and also ensure that each of the directories under data for the new wiki are writeable for the web server user (e.g. www-data or apache).

Users

You should be able to log in to the new wiki with admin/admin so you will want to remove that user from ./wikis/{newwikiname}/conf/users.auth.php

Customising DokuWiki

  • The following template based on Bootstrap is nice (and maintained for the time being): https://github.com/LotarProject/dokuwiki-template-bootstrap3
  • LDAP or Active Directory Authentication of users
  • Create a sidebar with a menu:
    • visit your wiki start page and at the end of url add ?id=sidebar
    • Then ‘Create this Page’
    • Add some content and save
    • The sidebar should appear
  • Create new namespaces as categories for your content: In the wiki search box enter the name for your new category with a colon at the end e.g. mynewcategory:start When you arrive on the page choose ‘Create this Page’. This will create a namespace called mynewcategory

 

 

Leave a Reply

  • (will not be published)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">