設定オプション

DokuWikiの特徴のほとんどは、様々な設定オプションを通して変更することができます。これらのオプション変更の簡単な方法は、設定マネージャーを使うことです。

このページは、有効な設定や可能な値を説明しています。すべてのデフォルトの値は、conf/dokuwiki.phpというファイルに格納されています。もし、設定を変更したい場合は、conf/local.phpというファイルを編集してください。このファイルは、後のアップグレードでも上書きされずに設定が保持されます。設定マネージャーもこのファイルを使用します。

conf/local.phpのサンプルです:

<?php
$conf['title']     = "Joe's Wiki";
$conf['useacl']    = 1;
$conf['superuser'] = 'joe';

設定ファイルにいくつかの注意があります。ファイルは、PHPコードの一部です。そのため、PHP文法で保持されます。それぞれの行は、セミコロンで終わっていなければなりません。複数の可変タイプがあります。

  • Numberは、数字で書きます。例: 9
  • Stringはシングルクォートかダブルクォートで括られている必要があります。例: 'foo bar'
  • Booleanは、truefalse、または10のどちらかです。
  • Arrayは、上記のタイプのいくつかが複合的に含まれます。

データ保管と権限

fmode

このオプションは、作成したいファイルのパーミッションを指定します。ここで設定する値は、8進法で指定します(数値は常に0から始まります)。デフォルトは、UNIXの0644(rw-r–r–)のパーミッションでファイルが作成されます。

  • Type: Number
  • Default: 0644

この設定は、Windowsサーバーには影響しません。

最初のゼロではない数値(上記のデフォルトは6)は、ユーザーのパーミッションを決定します。パーミッションはファイルの所有者です。2つ目の数値はグループのパーミッションで、最後の数値は、その他(つまり他の全部)のパーミッションです。正しい数字を入れるとパーミッションを変換します。ユーザーのキーは次のようになります:

  • 読む(Read)=4
  • 書く(Write)=2
  • 実行(Execute)=1

そして、上記のグループの数値を足し算します。従って、もしファイルを所有するユーザーに読み書きのパーミッションを与えるには、4+2=6の数字を指定します。 If you would want read and execute permissions (appropriate eg. for directories) for the group that the file belongs to, specify 4+1=5 as the second non-zero digit. The default permission value above is interpreted as read and write permissions for the user and only read permissions (number 4) for the group and others.

dmode

This option sets the permissions you want your directories to be created with. What you set here is the mode to set on your directories in octal (not a string, but a number always starting with 0). The default creates directories with unix permissions of 0755 (rwxr-xr-x, see fmode above for an explanation).

  • Type: Number
  • Default: 0755

This setting has no effect on Windows servers.

basedir

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!

  • Type: String
  • Default:

baseurl

URL to server including protocol - blank for autodetect

The path you should set here, is the path of server root. Eg. if your wiki is available at http://www.yourserver.com:port/dokuwiki/ you should set baseurl to http://www.yourserver.com:port which ending without slash.

  • Type: String
  • Default:

Note: The ':port' portion is relevant only if the web server is running on a non-standard port (i.e. not port 80). You can omit that portion if you are running on the standard port.

lang

This sets the language of the interface. See 他言語サポート.

  • Type: String
  • Default: en

savedir

This is the path where all files will be stored. This is a filesystem path relative to the basedir specified above. It needs to be writable by the webserver.

  • Type: String
  • Default: ./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

allowdebug

To make it simpler to answer support requests, DokuWiki can output a huge list of debug strings when requested (just append “/?do=debug”, without the “ characters, to the URL). This is useful to troubleshoot all kind of configuration problems when setting up the Wiki for the first time. But it reveals a lot of info about the server DokuWiki is running on as well.

:!: To be on the safe side you should disable this option and thus disabling the debug function right after your Wiki was set up successfully.

  • Type: Boolean
  • Default: 0

Display options

start

This is the name of the default page which is loaded when no page was given also known as “The Homepage” ;-).

  • Type: String
  • Default: start

title

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!

  • Type: String
  • Default: DokuWiki

template

The name of the template used by your DokuWiki installation. For more details refer to templates.

  • Type: String
  • Default: default

fullpath

Enable this to see the full filesystem path of the displayed document.

  • Type: boolean
  • Default: 0

recent

Defines the number of documents per page to show in the Recent changes.

  • Type: Number
  • Default: 20

Defines the number of recently visited pages to show in the breadcrumbs trail. Set to 0 to disable it.

  • Type: Number
  • Default: 10

youarehere

This enables an alternative kind of breadcrumbs displaying the hierarchy of namespaces a page is in. You may want to disable the standard breadcrumbs if you use this feature.

  • Type: Boolean
  • Default: 0

typography

Enable to convert certain character combinations to their typographically correct counterpart.

  • Type: Boolean
  • Default: 1

htmlok

Defines if embedding HTML using the <html> tags is allowed. This may break the layout and XHTML compliance if wrong HTML is inserted.

  • Type: Boolean
  • Default: 0

phpok

Defines if embedding PHP using the <php> tags is allowed. :!: This is a huge security problem when used on a freely accessible site!

  • Type: Boolean
  • Default: 0

dformat

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.

  • Type: String
  • Default: Y/m/d H:i

signature

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
  • Type: String
  • Default: --- //[[@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@//

maxtoclevel

Set this variable to the maximum number of heading levels to include in the automatically generated Table of Contents.

  • Type: Number (0-5)
  • Default: 3

maxseclevel

Set this variable to the maximum number of heading levels deep to create as separate, editable, sections.

  • Type: Number (0-5)
  • Default: 2

A value of 0 will disable the in-page section editing buttons.

camelcase

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.

  • Type: Boolean
  • Default: 0

deaccent

When this is set to 1, accented chars in page names will be replaced by their unaccented ASCII equivalents. Eg. ü becomes ue or á becomes a. When set 2, romanization of pagenames is turned on: symbols from non-latin alphabets are replaced with close ASCII equivalents. Setting the value to 0 turns off this feature altogether.

  • Type: Number (0-2)
  • Default: 1

useheading

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:

  • The title of the page, as shown in the browser or in search engine results.
  • The text for a link to the page, unless the link specification contains an explicit title.
  • The title of RSS feed entries for the page

For more information, read Using the first heading as the page name.

  • Type: Boolean
  • Default: 0

refcheck

Check for references before deleting media files.

  • Type: Boolean
  • Default: 1

refshow

How many references should be shown (5 is a good value).

  • Type: Boolean
  • Default: 5

Antispam features

usewordblock

Enables the use of a blacklist against WikiSpam.

  • Type: Boolean
  • Default: 1

indexdelay

When creating/modifying a page allow search engines to index it after this time (in seconds). This works by adding <meta name=“robots” content=“noindex,follow” /> in the output if the specified time hasn't elapsed.

  • Type: Number
  • Default: 60*60*24*5 (i.e. five days)

relnofollow

Use rel=“nofollow” for external links like this <a rel=“nofollow” …>.
More info on nofollow here and a different perspective here.

  • Type: Boolean
  • Default: 1

mailguard

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 address
  • none – no obfuscating is used
  • Type: String
  • Default: hex

Authentication Options

useacl

Enable this, to use an Access Control List for restricting what the users of your wiki may do.

  • Type: Boolean
  • Default: 0

openregister

This only has 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.

  • Type: Boolean
  • Default: 1

autopasswd

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. automatically generated passwords (1)
    The user specifies his email address and DokuWiki generates a password and sends it to him. To use this method, set autopassword to 1.
  2. user defined passwords (0)
    The registration form contains two fields where the new user can type in his desired password. No email is sent. To use this method set, autopasswd to 0.
  • Type: Boolean
  • Default: 1

authtype

This specifies which backend should be used to authenticate against.

DokuWiki supports several authentication backends. For full list see DokuWiki Manual, Chapter Authentication Methods.

  • Type: String
  • Default: plain

passcrypt

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
  • Type: String
  • Default: smd5

defaultgroup

If a user signs up (using openregister) he will automatically be added to this group.

  • Type : String
  • Default: user

superuser

Specifies who has superuser rights in DokuWiki. Superusers have always all permissions regardless of アクセスコントロール 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.

  • Type: String
  • Default: !!not set!!

Note: in the current release you need to encode all special chars in the user or groupname using the following table:

Space %20 ! %21 %22 # %23 $ %24 % %25 & %26 ' %27 ( %28 ) %29 * %2a
+ %2b , %2c - %2d . %2e / %2f : %3a ; %3b < %3c = %3d > %3e ? %3f
@ %40 [ %5b \ %5c ] %5d ^ %5e _ %5f ` %60 { %7b | %7c } %7d ~ %7e

Example: If the username is admin@foo.bar then you need to set the option to admin%40foo%2ebar. Do not encode the starting @ for groups.

profileconfirm

Require a user to confirm their current password when updating their Dokuwiki user profile.

  • Type: Boolean
  • Default: 1

resendpasswd

Allow users to have a new password generated and sent to them if they've lost their existing one. Only applies to ACL types where dokuwiki can change the password.

  • Type: Boolean
  • Default: 0
With ACL on (and userewrite=1, if that makes a difference) this does not work for me, as there are no pages which are visible publicly. Thus, when someone clicks on the Send new password link, they got a denied permissions page. To fix this, I rewrote inc/html.php so that the relevant link points directly to the wiki page resendpassword at the top of my wiki, rather than the current page, with action resendpwd. I put some text in this page, then made it readable by ALL. This way, the form to have the password resent is not hidden by the ACL.

Advanced options

updatecheck

Check for new release messages. See update check.

  • Type: Boolean
  • Default: 1

userewrite

Enable this to use rewriting for nicer URLs. Either using the Apache mod_rewrite module or by letting DokuWiki rewrite the URLs itself-

  • Type: Number
  • Default: 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

For detailed config options please refer to rewrite.

useslash

If you enabled the rewrite option above, you can use this option to use a slash instead of a colon as 名前空間 separator in URLs.

  • Type: Boolean
  • Default: 0

usedraft

Enable auto draft saving.

  • Type: Boolean
  • Default: 1

sepchar

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.

  • Type: Character (letter, digit, '_', '-', or '.')
  • Default: _

canonical

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.

  • Type: Boolean
  • Default: 0

autoplural

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 ページ名 would then both link automatically to the same existing page.

  • Type: Boolean
  • Default: 0

gzip_output

Pages are compressed when sending them over the network to browsers that can handle gzip or deflate content encoding. Disable this setting if compression is applied latter by an external tool (such as Apache's mod_gzip).

  • Type: Boolean
  • Default: 0

usegzip

When set to 1 (enabled), old versions of files will be stored in compressed format (using gzip).

  • Type: Boolean
  • Default: 1

cachetime

Configures the maximum age of a cached paged in seconds. See caching.

  • Type: Number
  • Default: 60*60*24 (one day)

locktime

Defines the maximum age for lockfiles in seconds. See ページのロック.

  • Type: Number
  • Default: 15*60 (15 Minutes)

fetchsize

Maximum size (bytes) fetch.php may download from extern. This is used to cache external images and resize them if needed. To disable this functionality completely just set this option to 0.

  • Type: Number
  • Default: 2*1024*1024 (2MB)

notify

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 (',').

  • Type: String
  • Default:

mailfrom

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)

  • Type: String
  • Default:

gdlib

For resizing 画像・メディアハンドリング 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.

  • Type: Number
  • Default: 2

im_convert

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.

  • Type: String
  • Default:

jpg_quality

This sets the compression quality of jpg's created when resizing images. Low values create smaller files, but can introduce jpg artifacts. The range is from 0 to 100.

  • Type: Number
  • Default: 70

spellchecker

Enables the optional スペルチェック (Check the page for requirements).

  • Type: Boolean
  • Default: 0

subscribers

Enables email notifications of changes to a specific page (similar to the notify option) . FIXME
If this option is enabled there will be an additional button for logged in persons “Subscribe Changes”. With the button they can decide if they want to be informed via email when the content of the pages changes.

  • Type: Boolean
  • Default: 0

compress

Enables simple whitespace and comment stripping in CSS and JavaScript files.

  • Type: Boolean
  • Default: 0

hidepages

This option accepts a Regular Expression to filter certain pages from all automatic listings (RSS, recent changes, search results, index). This is useful to exclude certain pages like the ones used in the sidebar templates. The regexp is matched against the full page ID with a leading colon. If it matches, the page is assumed to be a hidden one. This is a rather cosmetical option not a security one!

  • Type: String
  • Default:

send404

When someone follows a link to a page not existing yet, DokuWiki will send a usual 200 HTTP response. In a wiki this is a wanted behaviour, however if DokuWiki is used as a CMS system one might prefer to have DokuWiki answering with a 404 “not found” response. Enabling this option will cause this behaviour. Note: this will not change what content will be sent, only the HTTP status changes.

  • Type: Boolean
  • Default: false

sitemap

DokuWiki can automatically generate a XML sitemap suitable for the submission to the Google search engine. The option expects a number of days configuring how often the sitemap should be recreated. The default is not to create a sitemap. See sitemap for more info.

  • Type: number
  • Default: 0

rss_type

FIXME

  • Type: String
  • Default: 'rss1'
  • Options
    • 'rss' - RSS 0.91
    • 'rss1' - RSS 1.0
    • 'rss2' - RSS 2.0
    • 'atom' - Atom 0.3

rss_linkto

FIXME

  • Type: String
  • Default: 'diff'
  • Options
    • 'diff' - page showing revision differences
    • 'page' - the revised page itself
    • 'rev' - page showing all revisions
    • 'current' - most recent revision of page

rss_update

How often to update the RSS feed in seconds. Between updates the cached version of the RSS feed is used. An update interval of hour(s) will be sufficient for a slowly changing wiki.

  • Type: Number
  • Default: 60*5 (5 minutes)

target

This configures the HTML TARGET value used for different link types. The target value tells the web browser where to open the requested link. If a target is empty, then the link will open in the same window.

FIXME That's not the default as stated below

  • Type: Array
  • Default: All external and interwiki links are opened in an new window (_blank); all others are opened in the same window.

Possible keys for this array are :

  • wiki
  • interwiki
  • extern
  • media for uploaded files.
  • windows for windows shares.

Possible values for the target attribute :

  • _blank : open the link in a new window.
  • _self or empty string : open the link in the same window.
  • Other values such as _parent or _top or framename assume you are using a template with frames : in that situation, you should know what to put in this array.

syntax

FIXME

proxy

Use this to configure a Web-Proxy to use for outbound connections. See proxy for details.

  • Type: Array
  • Default: no proxy is used

safemodehack

Enables the safemodehack - read the page for more info

  • Type: Boolean
  • Default: 0

ftp

FTP-Options for the safemodehack - read the page for more info

  • Type: Array
  • Default: not used