Most of DokuWikis features are configured through a single configuration file called conf/dokuwiki.php
. Here you can find a description what each option does. Do not fear the length of this page. For most users DokuWiki will work out of the box without touching the config file.
Some notes about the Config-file. The file is a piece of PHP code so the PHP syntax has to be preserved. Eg. each line has to have a semicolon at the end. There are multiple types of Variables:
9
'foo bar'
true
or false
or 1
or 0
Hint: The Configfile now includes a file called conf/local.php
if it exists. This allows you to overwrite just some options without touching the default config. This should make upgrading simpler.
Here is a sample of conf/local.php
<?php $conf['useacl'] = 1; //Use Access Control Lists to restrict access? ?>
There are many more places to customize your DokuWiki installation. Have a look at interwiki, include hooks, templates, smileys, abbreviations and stylesheets.
This parameter influences the file permissions which new files will get. See umask for general info about umask. You're not setting the permissions here but the logically inverse. So the default of 0111
creates files with permissions of 0666
(rw-rw-rw-
).
0111
This works like umask above but sets the permissions of new directories. The default creates directories with permissions of 0777
(rwxrwxrwx
). For better security (if you followed the installation instructions) change this value to 0002
(rwxrwxr-x
).
0000
Usually DokuWiki can detect the directory that it is installed in on its own. But sometimes this does not work for various reasons. If DokuWiki does not seem to function properly and cannot find things such as images for its web pages, you can set the directory here.
The path you should set here, is the path from the server root to your DokuWiki installation. Eg. if your wiki is available at http://www.yourserver.com/dokuwiki/
you should set basedir to /dokuwiki/
. Be sure to have a leading and a trailing slash!
This sets the language of the interface. See multilanguage.
en
This is the path were all files will be stored. This is a filesystem path. It needs to be writable by the webserver.
./data
Inside this directory are multiple subdirectories and the changelog. You can override their position by the following config parameters:
Parameter | default inside savedir |
---|---|
datadir | pages |
olddir | attic |
mediadir | media |
cachedir | cache |
lockdir | locks |
changelog | changes.log |
metadir | meta |
This is the name of the default page which is loaded when no page was given also known as “The Homepage” .
start
This is the name of your Wiki installation. Change it to whatever you like. If you want to run multiple installations of DokuWiki on the same server they need to have different titles!
DokuWiki
The name of the template used by your Wiki installation. For more details refer templates.
default
Enable this to see the full filesystem path of the displayed document.
Defines the number of documents to show in the Recent changes
20
Defines the number of recently visited pages to show in the breadcrumbs trail
10
Enable to convert certain character combinations to their typographically correct counterpart.
1
Defines if embedding HTML using the <html>
tags is allowed. This may break the layout and XHTML compliance if wrong HTML is inserted.
0
Defines if embedding PHP using the <php>
tags is allowed. This is a huge security problem when used on a freely accessible site!
0
Configures how dates are formated. This is directly passed to the date PHP function. Some people may prefer to set it to d.m.Y H:i
.
Y/m/d H:i
Configures how the signature string of logged in users should look like. You can use all variables defined by the strftime function and the following special variables:
variable | gets replaced with |
---|---|
@USER@ | The user's login name |
@NAME@ | The user's full name |
@MAIL@ | The user's e-mail address |
@DATE@ | The current date and time formatted as specified in dformat above |
--- //[[@MAIL@|@NAME@]] @DATE@//
Some people may prefer to use something shorter like: --- //[[@MAIL@|@USER@]] %b%e//
. If you want to have user pages you could use something like this: --- //[[user:@USER@|@NAME@]] @DATE@//
Set this variable to the maximum number of heading levels to include in the automatically generated Table of Contents.
3
Set this variable to the maximum number of heading levels deep to create as separate, editable, sections.
3
Enable this for CamelCase links. This is a common but controversial way of linking in Wikis. If you enable this, and later disable it again, you may create orphan pages.
0
When this is enabled, accented chars in page names will be replaced by their unaccented ASCII equivalents. Eg. ü
becomes ue
or á
becomes a
.
1
When this option is enabled, a link to a wiki page name will automatically use the first heading in the page for each of the following:
For more information, read Using the first heading as the page name.
0
Enables the use of a blacklist against WikiSpam.
1
This configures if and how email addresses will be obfuscated against harvesting bots. Possible options are:
visible
– replaces @
with [at]
, .
with [dot]
and -
with [dash]
hex
– uses hex entities to encode the addressnone
– no obfuscating is usedhex
Enable this to use a Access Control List to restrict what the users of your wiki may do.
0
This has only an effect when useacl
is enabled. If this is enabled users are allowed to register themselves. Be sure the conf/users.auth
file is writable by the webserver if you enable this feature.
If openregister
is disabled people can't subscribe themselves to DokuWiki anymore. In this case the superuser is able to register new users through the admin page. A new menu item will appear there when openregister
was disabled.
1
DokuWiki supports two methods of password handling after a new user has been registered. The setting of this configuration variable determines which method is used:
1
)autopassword
to 1
.0
)autopasswd
to 0
.0
This specifies which system should be used to authenticate against. Currently, only the built-in plaintext (plain
) files are supported.
plain
Passwords should always be saved as an encrypted hash. DokuWiki supports multiple hash methods, which one it should use is defined by this option. What you choose here depends on your security needs and if you want to use an existing authentication database. DokuWiki is able to determine which method was used from an encrypted password, so you can always change the used method as long as your authentication backend supports this.
The following hash methods are available:
Option | Description |
---|---|
smd5 | Salted MD5 hashing |
md5 | Simple MD5 hashing (this was the method used in older Releases) |
sha1 | SHA1 hashing |
ssha | Salted SHA1 hashing (as used in LDAP) |
crypt | Unix crypt |
mysql | Password as used in MySQL before Version 4.1.1 |
my411 | Password as used in MySQL 4.1.1 or higher |
smd5
If a user signs up (using openregister
) he will automatically added to this group.
user
Specifies who has superuser rights in DokuWiki. Superusers have always all permissions regardless of ACL restrictions and are allowed to edit ACL restrictions (think root).
You can set either a username or the name of a group by prepending an @
char to the groupname.
!!not set!!
Enable this to use rewriting for nicer URLs. Either using the Apache mod_rewrite module or by letting DokuWiki rewrite the URLs itself-
0
You can set the following values:
Value | Info | Example URL |
---|---|---|
0 | No URL rewriting is used. This is the default. | http://example.com/dokuwiki/doku.php?wiki:syntax |
1 | URL rewriting is done with an Apache module. You need to edit the .htaccess file | http://example.com/dokuwiki/wiki:syntax |
2 | The rewriting is done by DokuWiki. | http://example.com/dokuwiki/doku.php/wiki:syntax |
The included .htaccess files has the right rules for 1, and are uncommented by default.
It seems the rewriting only works for standard characters while nonstandard ones like öäü for example mess up the system and can't be found. Is there a workaround or are there any plans to fix this?
If you enabled the rewrite option above, you can use this option to use a slash instead of a colon as namespace separator in URLs.
0
This variable determines the character that separates words in a page ID and that replaces characters not valid in a page ID.
The page ID is the component of the URL that specifies the page. For example, by default the link doesn't exist goes to the URL wiki.splitbrain.org/wiki:doesn_t_exist
. wiki:doesn_t_exist
is the page ID. The default sepchar is '_', so the apostrophe and the space each appear as an '_' in the link.
By changing sepchar to another character, you can change the '_' to another character. The valid sepchar characters are those that are valid in a page ID: letters, digits, underscore (_
), dash (-
), and dot (.
). The sepchar variable must contain exactly one character.
Be careful with this variable. By changing it you can make pages created under a previous sepchar inaccessible. When you create a new page, the page ID becomes the file name for the page. If you create pages with sepchar '_' and then later use sepchar '-', your links to those previously created pages will break because the links will change but the file names won't.
_
When this is enabled, all links are created as absolute URLs in the form http://server/path
. This was the default in previous releases. URLs relative to the Serverroot are now prefered.
0
This option is probably only useful in English Wikis. If set to 1
, plural forms of linked pages are tried automatically when if the singular form is not found (and the other way round). So pagenames and pagename would then both link automatically to the same existing page.
0
When set to 1
(enabled), old versions of files will be stored in compressed format (using gzip).
1
Configures the maximum age of a cached paged in seconds. See caching.
60*60*24
(one day)Configures if the cache is purged on adding a new page. See caching.
1
Defines the maximum age for lockfiles in seconds. See locking.
15*60
(15 Minutes)This option may contain an email address to which notifications about page adds and changes will be sent. No mails are sent when this is a blank string. To add more than one email address, use the comma to separate the entries (',').
This address will be used as sender address for all mails which are sent through DokuWiki. Make sure your Mailserver accepts the address you supply here. If you leave this empty the default PHP address will be used (usually webserveruser@webserverhostname)
For resizing images DokuWiki uses PHP's libGD if available. DokuWiki tries to detect the availability and version of libGD automatically. However, in older PHP versions, this does not work. You can force a version by setting this variable. Possible values are: '0
' for no libGD support; '1
' for libGD version 1.x; and '2
' for libGD 2 with autodetect.
By default DokuWiki uses PHP's libGD (see above) however ImageMagick's convert is more powerful but not always available. If it is installed on your server you can give it's path here and DokuWiki will use it instead of libGD.
Enables the optional Spell Checker (Check the page for requirements).
This configures the HTML TARGET value used for different link types. If a target is blank, then the link will open in the same window.
_blank
); all others are opened in the same window.Use this to configure a Web-Proxy to use for outbound connections. See proxy for details.
Enables the safemodehack - read the page for more info
FTP-Options for the safemodehack - read the page for more info
Allow registered users to subscribe to page changes via e-mail