Help:Configuration settings index
This is an index of all supported configuration options based on the DefaultSettings.php file. Never edit DefaultSettings; copy appropriate lines to LocalSettings.php instead and amend them as appropriate.
General Settings
$wgVersion
Contains the current version of MediaWiki, as displayed to the user.
- Default Value -
Current version string, e.g. '1.4.5'
$wgSitename
The name of the site. Should be changed
- Default Value -
'MediaWiki'
$wgMetaNamespace
The name used for the meta-namespace.
A value of FALSE means that $wgSitename will be used to define this namespace, otherwise the supplied value is used.
- Default Value -
FALSE
$wgMetaNamespaceTalk
Normally you can ignore this and it will be something like $wgMetaNamespace . "_talk". In some languages, you may want to set this manually for grammatical reasons. It is currently only respected by those languages where it might be relevant and where no automatic grammar converter exists.
- Default Value -
false
$wgServer
The base URL of the server, including protocol. (eg, "http://en.wikipedia.org")
- Default Value -
(dynamically created)
$wgServerName
The name of the server without the protocol. (eg, "en.wikipedia.org")
- Default Value -
(dynamically created)
Paths
$IP
The filesystem installation directory. Not in DefaultSettings.php.
$wgScriptPath
The base URL path.
- Default Value -
'/wiki'
$wgUsePathInfo
Whether to use 'pretty' URLs.
- Default Value -
(dynamically created)
$wgScript
The URL of index.php.
- Default Value -
"{$wgScriptPath}/index.php"
$wgRedirectScript
The URL of redirect.php, needed for backwards compatibility.
- Default Value -
"{$wgScriptPath}/redirect.php"
$wgStylePath
The URL of the skins directory.
- Default Value -
"{$wgScriptPath}/skins"
$wgStyleDirectory
The file system path to the skins directory.
- Default Value -
"{$IP}/skins"
$wgStyleSheetPath
The URL of the directory containing the stylesheets. Generally the skins directory.
- Default Value -
&$wgStylePath
$wgStyleSheetDirectory
The file system path of the directory containing the stylesheets. (Or the skins directory.)
- Default Value -
&$wgStyleDirectory
$wgArticlePath
The URL template used to create article links.
- Default Value -
"{$wgScript}?title=$1"
$wgActionPaths
To set 'pretty' URL paths for actions other than plain page views, add to this array. For instance:
'edit' => "$wgScriptPath/edit/$1"
There must be an appropriate script or rewrite rule in place to handle these URLs.
- Default Value -
array()
Added in 1.5
$wgLogo
The URL of the site logo.
- Default Value -
"{$wgUploadPath}/wiki.png"
$wgMathPath
The URL base of the directory containing LaTeX math images.
- Default Value -
"{$wgUploadPath}/math"
$wgMathDirectory
The file system path of the directory containing LaTeX math images.
- Default Value -
"{$wgUploadDirectory}/math"
$wgTmpDirectory
The URL of the temporary directory.
- Default Value -
"{$wgUploadDirectory}/tmp"
$wgUploadBaseUrl
- Default Value -
""
Uploads
$wgUploadPath
The URL of the upload directory.
- Default Value -
"{$wgScriptPath}/upload"
$wgUploadDirectory
The file system path of the upload directory.
- Default Value -
"{$IP}/upload"
$wgHashedUploadDirectory
If true, use the /a/ab/foo.png directory structure.
- Default Value -
true
Point the upload navigation link to an external URL. Useful if you want to use a shared repository by default without disabling local uploads
e.g.:
$wgUploadNavigationUrl = 'http://commons.wikimedia.org/wiki/Special:Upload';
- Default Value -
false
If you operate multiple wikis, you can define a shared upload path here. Uploads to this wiki will NOT be put there - they will be put into $wgUploadDirectory.
If $wgUseSharedUploads is set, the wiki will look in the shared repository if no file of the given name is found in the local repository (for [[Image:..]] and [[Media:..]] links). Thumbnails will also be looked for and generated in this directory.
If $wgUseSharedUploads is set, the wiki will look in the shared repository if no file of the given name is found in the local repository (for [[Image:..]], [[Media:..]] links). Thumbnails will also be looked for and generated in this directory.
- Default Value -
false
Full path on the web server where shared uploads can be found.
- Default Value -
"http://commons.wikimedia.org/shared/images"
Path on the file system where shared uploads can be found.
- Default Value -
"/var/www/wiki3/images"
Set this to false especially if you have a set of files that need to be accessible by all wikis, and you do not want to use the hash (path/a/aa/) directory layout.
See also $wgHashedUploadDirectory.
- Default Value -
true
set true if the repository uses latin1 filenames.
- Default Value -
false
DB name with metadata about shared directory. Set this to false if the uploads do not come from a wiki.
- Default Value -
false
Cache shared metadata in memcached. Don't do this if the commons wiki is in a different memcached domain.
- Default Value -
true
Email settings
$wgEmergencyContact
Site admin email address
- Default Value -
'wikiadmin@' . $wgServerName
$wgPasswordSender
Password reminder email address The address we should use as sender when a user is requesting his password.
- Default Value -
'Wikipedia Mail <apache@' . $wgServerName . '>'
$wgEnableEmail
Set to true to enable the e-mail basic features: Password reminders, etc. If sending e-mail on your server doesn't work, you might want to disable this.
- Default Value -
true
$wgEnableUserEmail
Set to true to enable user-to-user e-mail. This can potentially be abused, as it's hard to track.
- Default Value -
false
$wgSMTP
For using a direct (authenticated) SMTP server connection. Default to false or fill an array :
$wgSMTP = array( "host" => 'SMTP domain', "IDHost" => 'domain for MessageID', "port" => "25", "auth" => true/false, "username" => user, "password" => password );
See Mail::factory() for a full description of these settings. (Scroll down to the smtp parameter.)
Warning: This setting requires PEAR's Mail package to be installed.
- Default Value -
false
Database settings
$wgDBserver
Database host name or ip address.
- Default Value -
'localhost'
$wgDBname
Name of the database.
- Default Value -
'wikidb'
$wgDBconnection
- Default Value -
$wgDBuser
Database username.
- Default Value -
'wikiuser'
$wgDBtype
Use "mysql" for working code and "PostgreSQL" for development/broken code.
- Default Value -
"mysql"
$wgSearchType
Use "MyISAM" for MySQL native full text search, "Tsearch2" for PostgreSQL based search engine.
- Default Value -
"MyISAM"
$wgDBprefix
Table name prefix.
- Default Value -
$wgDBschema
On some databases this allows separate logical namespace for application data.
- Default Value -
'mediawiki'
Shared database for multiple wikis. Presently used for storing a user table for single sign-on. The server for this database must be the same as for the main database.
Make sure that the database user you set in $wgDBuser has read-access to that database. It might be sufficient to grant read-access to the user table only.
- EXPERIMENTAL!
The name of the shared database.
- Default Value -
null
$wgDBservers
Database load balancer. This is a two-dimensional array, an array of server info structures. Fields are:
- host
- Host name
- dbname
- Default database name
- user
- DB user
- password
- DB password
- type
- "mysql" or "pgsql"
- load
- ratio of DB_SLAVE load, must be >=0, the sum of all loads must be >0
- groupLoads
- array of load ratios, the key is the query group name. A query may belong to several groups, the most specific group defined here is used.
- flags
- bit field:
- DBO_DEFAULT -- turns on DBO_TRX only if !$wgCommandLineMode (recommended)
- DBO_DEBUG -- equivalent of $wgDebugDumpSql
- DBO_TRX -- wrap entire request in a transaction
- DBO_IGNORE -- ignore errors (not useful in LocalSettings.php)
- DBO_NOBUFFER -- turn off buffering (not useful in LocalSettings.php)
Leave at false to use the single-server variables above.
- Default Value -
false
$wgMasterWaitTimeout
How long to wait for a slave to catch up to the master.
- Default Value -
10
Sysop SQL queries
These settings are for sysops to make queries through Special:Askaql.
- Warning: Dangerous if not configured properly.
$wgAllowSysopQueries
Set to allow sysop queries.
- Default Value -
false
$wgDBsqluser
The SQL user used for queries.
- Default Value -
'sqluser'
$wgDBsqlpassword
The password for $wgDBsqluser.
- Default Value -
'sqlpass'
$wgDBpassword
The password for $wgDBuser.
- Default Value -
'userpass'
$wgSqlLogFile
- Default Value -
"{$wgUploadDirectory}/sqllog_mFhyRe6"
$wgDBerrorLog
File to log MySQL errors to.
- Default Value -
false
$wgDBminWordLen
- MySQL 3.x
- used to discard words that MySQL will not return any results for shorter values configure mysql directly.
- MySQL 4.x
- ignore it and configure mySQL.
See: http://dev.mysql.com/doc/mysql/en/Fulltext_Fine-tuning.html
- Default Value -
4
$wgDBtransactions
Set to true if using InnoDB tables.
- Default Value -
false
$wgDBmysql4
Set to true to use enhanced fulltext search.
- Default Value -
false
$wgSqlTimeout
- Default Value -
30
$wgLocalDatabases
Other wikis on this site, can be administered from a single developer account.
eg,
$wgLocalDatabases = array( (interwiki prefix) => (database name), 'WikiPedia' => 'wikipedia', 'Meta' => 'meta', 'WikiNews' => 'news' );
(Note: That is just an example, and does not reflect the real configuration)
- Default Value -
array()
Memcached settings
See docs/memcached.doc.
$wgMemCachedDebug
Will be set to false in Setup.php, if the server isn't working.
- Default Value -
false
$wgUseMemCached
Use memcache, using the servers set in $wgMemCachedServers.
- Default Value -
false
- Note (1.3, 1.4): plenty of code rely on this setting to indicate whether they should use the BagOStuff class (from $wgMemc) for caching. Meaning they can not use Turck MMCache or eAccelerator, because this setting is only set if memcache is used, not if $wgMemc is valid. 1.5 may fix this.
$wgMemCachedServers
- Default Value -
array( '127.0.0.1:11000' )
$wgSessionsInMemcached
- Default Value -
false
$wgLinkCacheMemcached
Cache links using object cache setting (memcache, Turck MMCache, eAccelerator, etc.)
- Warning: Not fully tested.
- Default Value -
false
$wgUseTurckShm
Use Turck MMCache shared memory. You can use this for persistent caching where your wiki runs on a single server. Enabled by default if Turck is installed. Mutually exclusive with memcached, memcached is used if both are specified.
- Default Value -
false
$wgUseEAccelShm
(1.5) You can use this for persistent caching where your wiki runs on a single server. Enabled by default if eAccelerator is installed. Mutually exclusive with memcached and Turck MMCache, the preference order being memcached first, Turck MMCache second, and eAccelerator third. Most of the code to support this is directly copied from the Turck code.
- Default Value -
false
Localization
$wgLanguageCode
Site language code. Should be one of the ./language/Language(.*).php files.
- Default Value -
'en'
$wgLanguageFile
Filename of a language file generated by dumpMessages.php.
- Default Value -
false
$wgInterwikiMagic
Treat language links as magic connectors, not inline links.
- Default Value -
true
$wgInputEncoding
The encoding of the input text.
- Note: LanguageUtf8.php normally overrides this unless you set $wgUseLatin1 to true.
- Default Value -
'ISO-8859-1'
$wgOutputEncoding
The encoding of the output text.
- Note: LanguageUtf8.php normally overrides this unless you set $wgUseLatin1 to true.
- Default Value -
'ISO-8859-1'
$wgUseLatin1
Enable ISO-8859-1 compatibility mode.
- Default Value -
false
$wgEditEncoding
- Default Value -
''
$wgLegacyEncoding
Set this to eg 'ISO-8859-1' to perform character set conversion when loading old revisions not marked with "utf-8" flag. Use this when converting wiki to UTF-8 without the burdensome mass conversion of old text data.
NOTE! This DOES NOT touch any fields other than old_text. Titles, comments, user names, etc still must be converted en masse in the database before continuing as a UTF-8 wiki.
- Default Value -
false
$wgMimeType
The type to send in the Content-Type header.
- Default Value -
'text/html'
$wgDocType
The doc type to use in the <!DOCTYPE !> declaration.
- Default Value -
'-//W3C//DTD XHTML 1.0 Transitional//EN'
$wgDTD
- Default Value -
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'
$wgUseDynamicDates
Enable to allow rewriting dates in page text. DOES NOT FORMAT CORRECTLY FOR MOST LANGUAGES.
- Default Value -
false
$wgAmericanDates
Enable for English module to print dates as eg 'May 12' instead of '12 May'.
- Default Value -
false
$wgTranslateNumerals
For Hindi and Arabic use local numerals instead of Western style (0-9) numerals in interface.
- Default Value -
true
$wgUseDatabaseMessages
Translation using MediaWiki: namespace This will increase load times by 25-60% unless memcached is installed.
Interface messages will be get from the database.
- Default Value -
true
$wgMsgCacheExpiry
When a message in cache expires (in seconds).
- Default Value -
86400
$wgPartialMessageCache
What does this do?
- Default Value -
false
$wgDisableLangConversion
Whether to enable language variant conversion. Currently only zh supports this function, to convert between Traditional and Simplified Chinese. This flag is meant to isolate the (untested) conversion code, so that if it breaks, only zh will be affected.
- Default Value -
false
$wgUseZhdaemon
Whether to use zhdaemon to perform Chinese text processing.
- Note: zhdaemon is under developement, so normally you don't want to use it unless for testing.
- Default Value -
false
$wgZhdaemonHost
The host which zhdaemon is on. This is only used if $wgUseZhdaemon is set.
- Default Value -
"localhost"
$wgZhdaemonPort
The port on $wgZhdaemonHost which zhdaemon is on. This is only used if $wgUseZhdaemon is set.
- Default Value -
2004
$wgLocaltimezone
Fake out the timezone that the server thinks it's in. This will be used for date display and not for what's stored in the DB. Leave to null to retain your server's OS-based timezone value. This is the same as the timezone.
Examples:
$wgLocaltimezone = 'GMT'; $wgLocaltimezone = 'PST8PDT'; $wgLocaltimezone = 'Europe/Sweden'; $wgLocaltimezone = 'CET';
- Default Value -
null
$wgForceUIMsgAsContentMsg
When translating messages with wfMsg(), it is not always clear what should be considered UI messages and what shoud be content messages.
For example, for regular wikipedia site like en, there should be only one 'mainpage', therefore when getting the link of 'mainpage', we should treate it as content of the site and call wfMsgForContent(), while for rendering the text of the link, we call wfMsg(). The code in default behaves this way. However, sites like common do offer different versions of 'mainpage' and the like for different languages. This array provides a way to override the default behavior. For example, to allow language specific mainpage and community portal, set
$wgForceUIMsgAsContentMsg = array( 'mainpage', 'portal-url' );
- Default Value -
array()
Debug/logging
$wgDebugLogFile
The file name of the debug log, or empty if disabled.
The debug log file should be not be publicly accessible if it is used, as it may contain private data.
- Default Value -
''
$wgDebugRedirects
What does this do?
- Default Value -
false
$wgDebugRawPage
"Avoid overlapping debug entries by leaving out CSS."
- Default Value -
false
$wgDebugComments
What does this do?
- Default Value -
false
$wgLogQueries
What does this do?
- Default Value -
false
$wgDebugDumpSql
What does this do?
- Default Value -
false
$wgShowSQLErrors
Whether to show "we're sorry, but there has been a database error" pages. Displaying errors aids in debugging, but may display information useful to an attacker.
- Default Value -
false
Profiling
$wgProfiling
Enable for more detailed by-function times in debug log
- Default Value -
false
$wgProfileLimit
Only record profiling info for pages that took longer than this
- Default Value -
0.0
$wgProfileOnly
Don't put non-profiling info into log file
- Default Value -
false
$wgProfileToDatabase
Log sums from profiling into "profiling" table in db.
- Default Value -
false
$wgProfileSampleRate
Only profile every n requests when profiling is turned on
- Default Value -
1
$wgProfileCallTree
If true, print a raw call tree instead of per-function report
- Default Value -
false
$wgDebugProfiling
Detects non-matching wfProfileIn/wfProfileOut calls
- Default Value -
false
$wgDebugFunctionEntry
Output debug message on every wfProfileIn/wfProfileOut
- Default Value -
0
$wgDebugSquid
Lots of debugging output from SquidUpdate.php
- Default Value -
false
$wgProfileToCommentUser
Put profiling data in HTML comments in the output file, for a given user only.
- Default Value -
false
Site customization
These are site-wide appearance settings.
$wgExtraSubtitle
The subtitle to appear under every title.
- Default Value -
$wgSiteSupportPage
A page where you users can receive donations.
This has been superceded in later versions; see the FAQ for the new, more flexible, system.
- Default Value -
''
Namespaces
| -2 | Media: |
| -1 | Special: |
| 0 | : |
| 1 | Talk: |
| 2 | User: |
| 3 | User talk: |
| 4 | JonnyBWiki: |
| 5 | JonnyBWiki talk: |
| 6 | File: |
| 7 | File talk: |
| 8 | MediaWiki: |
| 9 | MediaWiki talk: |
| 10 | Template: |
| 11 | Template talk: |
$wgNamespacesWithSubpages
Which namespaces should support subpages? (This excludes Media.)
- Default Value -
array( -1 => 0, 0 => 0, 1 => 1, 2 => 1, 3 => 1, 4 => 0, 5 => 1, 6 => 0, 7 => 1, 8 => 0, 9 => 1, 10 => 0, 11 => 1)
$wgNamespacesToBeSearchedDefault
Which namespaces should be searched? (This excludes Media.)
- Default Value -
array( -1 => 0, 0 => 1, 1 => 0, 2 => 0, 3 => 0, 4 => 0, 5 => 0, 6 => 0, 7 => 0, 8 => 0, 9 => 1, 10 => 0, 11 => 1 )
$wgExtraNamespaces
Additional namespaces. If the namespaces defined in Language.php and Namespace.php are insufficient, you can create new ones here, for example, to import Help files in other languages. PLEASE NOTE: Once you delete a namespace, the pages in that namespace will no longer be accessible. If you rename it, then you can access them through the new namespace name.
Custom namespaces should start at 100 and stop at 255 (hard limit set by database).
Example:
$wgExtraNamespaces = array(100 => "Hilfe", 101 => "Hilfe_Diskussion", 102 => "Aide", 103 => "Discussion_Aide" );
- Default Value -
NULL
$wgSiteNotice
If set, a bold ugly notice will show up at the top of every page.
- Default Value -
""
See also: MediaWiki:Sitenotice
$wgDefaultUserOptions
Settings added to this array will override the language globals for the user preferences used by anonymous visitors and newly created accounts.
| name | default | description |
|---|---|---|
| quickbar | 1 | |
| underline | 1 | |
| hover | 1 | |
| cols | 80 | |
| rows | 25 | |
| searchlimit | 20 | |
| contextlines | 5 | |
| contextchars | 50 | |
| skin | $wgDefaultSkin | |
| math | 1 | |
| rcdays | 7 | |
| rclimit | 50 | |
| highlightbroken | 1 | |
| numberheadings | 0 | |
| stubthreshold | 0 | |
| previewontop | 1 | |
| editsection | 1 | |
| editsectiononrightclick | 0 | |
| showtoc | 1 | Boolean. 1 is show the TOC, 0 is hide it. |
| showtoolbar | 1 | |
| date | 0 | |
| imagesize | 2 | |
| fancysig | 0 |
For instance, to disable section editing links:
$wgDefaultUserOptions['editsection'] = 0;
- Default Value -
array()
$wgAllowUserJs
Allow user Javascript page?
This enables a lot of neat customizations, but may increase security risk to users and server load.
- Default Value -
false
$wgAllowUserCss
Allow user Cascading Style Sheets (CSS)?
This enables a lot of neat customizations, but may increase security risk to users and server load.
- Default Value -
false
$wgUseSiteJs
Use the site's Javascript page?
- Default Value -
true
$wgUseSiteCss
Use the site's Cascading Style Sheets (CSS)?
- Default Value -
true
Navigation links for the user sidebar.
- 'text'
- the name of the MediaWiki message that contains the label of this link
- 'href'
- the name of the MediaWiki message that contains the link target of this link. Link targets starting with http are considered remote links. Ones not starting with http are considered as names of local wiki pages.
Note that the values are not the text itself, they are pages in the MediaWiki namespace.
- Default Value -
array (
array( 'text'=>'mainpage', 'href'=>'mainpage' ),
array( 'text'=>'portal', 'href'=>'portal-url' ),
array( 'text'=>'currentevents', 'href'=>'currentevents-url' ),
array( 'text'=>'recentchanges', 'href'=>'recentchanges-url' ),
array( 'text'=>'randompage', 'href'=>'randompage-url' ),
array( 'text'=>'help', 'href'=>'helppage' ),
array( 'text'=>'sitesupport', 'href'=>'sitesupport-url' ),
)
$wgNoFollowLinks
If true, external URL links in wiki text will be given the rel="nofollow" attribute as a hint to search engines that they should not be followed for ranking purposes as they are user-supplied and thus subject to spamming.
- Default Value -
true
Skins
| ID | Name |
|---|---|
| standard | Classic |
| nostalgia | Nostalgia |
| cologneblue | Cologne Blue |
| davinci | DaVinci |
| mono | Mono |
| monobook | MonoBook |
| myskin | MySkin |
| chick | Chick |
$wgDefaultSkin
The default skin.
- Default Value -
'monobook'
$wgSkipSkin
Specify the name of a skin that should not be presented in the list of available skins. Use for blacklisting a skin which you do not want to remove from the skins directory
- Default Value -
''
$wgSkipSkins
More of the same as $wgSkipSkin.
- Default Value -
array()
Category
$wgUseCategoryMagic
Should the category pseudo-namespace be used? (Set to true if categories are used, false if category is just another article.)
"Should [[Category:Dog]] on a page associate it with the category "Dog"? (a link to that category page will be added to the article, clicking it reveals a list of all articles in the category)."
- Default Value -
true
$wgUseCategoryBrowser
"Disable experimental dmoz-like category browsing. Output things like:
- Encyclopedia > Music > Style of Music > Jazz
FIXME: need fixing"
- Default Value -
false
$wgCategoryMagicGallery
On category pages, show thumbnail gallery for images belonging to that category instead of listing them as articles.
- Default Value -
true
Cache
$wgEnableParserCache
Keep parsed pages in a cache (objectcache table, turck, or memcached) to speed up output of the same page viewed by another user with the same options.
This can provide a significant speedup for medium to large pages, so you probably want to keep it on.
- Default Value -
true
Persistent Link Cache
Obsolete
$wgEnablePersistentLC
Obsolete, do not use!
- Default Value -
false
$wgCompressedPersistentLC
"Use gzcompressed blobs."
- Default Value -
true
$wgCachePages
Allow client-side caching of pages
- Default Value -
true
$wgCacheEpoch
Set this to current time to invalidate all prior cached pages. Affects both client- and server-side caching.
- Default Value -
'20030516000000'
$wgUseFileCache
This will cache static pages for non-logged-in users to reduce database traffic on public sites. Must set $wgShowIPinHeader = false.
- Default Value -
false
$wgFileCacheDirectory
- Default Value -
"{$wgUploadDirectory}/cache"
$wgUseGzip
When using the file cache, we can store the cached HTML gzipped to save disk space. Pages will then also be served compressed to clients that support it. THIS IS NOT COMPATIBLE with ob_gzhandler which is now enabled if supported in the default LocalSettings.php! If you enable this, remove that setting first.
Requires zlib support enabled in PHP.
- Default Value -
false
$wgUseWatchlistCache
Generate a watchlist once every hour or so.
- Default Value -
false
$wgWLCacheTimeout
The hour or so mentioned above.
- Default Value -
3600
$wgImageHtmlCacheExpiry
Set to a number of seconds to cache the HTML associated with an image. This is an emergency optimisation feature and will cause lots of problems. It is recommended that the expiry be very short and that the users be warned. Template:Default settings
Interwiki
$wgLocalInterwiki
The Interwiki prefix of this wiki. It should always changed in LocalSettings.php.
- Default Value -
'w'
$wgInterwikiExpiry
Expiry time for cache of interwiki table.
What is the unit?
- Default Value -
10800
Access
Wiki locking, user access options, blocking/banning, and some other related settings.
$wgReadOnlyFile
If this file is found, the database is locked for the reason given in the contents of the file.
- Default Value -
"{$wgUploadDirectory}/lock_yBgMBwiR"
$wgReadOnly
What does this do?
If set to a string (e.g., in LocalSettings.php), $wgReadOnly disallows editing, displaying the string given as the reason. Functionally the same as $wgReadOnlyFile, but using a variable instead of a file.
- Default Value -
false
$wgWhitelistEdit
If true, users must login to edit.
- Default Value -
false
- It's not 100% safe, there could be security hole using that one. Use at your own risks.
- NOTE: in 1.5 this doesn't seem to be working - try $wgGroupPermissions instead
$wgWhitelistRead
Pages anonymous user may see.
In the format of:
array ( "Main_Page", "Special:Userlogin", "Wikipedia:Help")
- Default Value -
false
- It's not 100% safe, there could be security hole using that one. Use at your own risks.
$wgWhitelistAccount
Types of accounts that can create new users. (1 for true, 0 for false)
- Default Value -
array ( 'user' => 1, 'sysop' => 1, 'developer' => 1 )
- It's not 100% safe, there could be security hole using that one. Use at your own risks.
$wgAllowAnonymousMinor
Allow anonymous users to mark changes as 'minor'
- Default Value -
false
$wgSysopUserBans
Allow sysops to ban logged-in users
- Default Value -
true
$wgSysopRangeBans
Allow sysops to ban IP ranges
- Default Value -
true
$wgDefaultBlockExpiry
Default expiry time in strtotime() format, or "infinite" for an infinite block.
- Default Value -
'24 hours'
$wgAutoblockExpiry
Number of seconds before autoblock entries expire
- Default Value -
86400
$wgAccountCreationThrottle
Number of accounts each IP address may create, 0 to disable. Requires memcached.
- Default Value -
0
$wgPasswordSalt
For compatibility with old installations set to false.
- Default Value -
true
$wgDisabledActions
Array of disabled article actions, e.g. view, edit, dublincore, delete, etc.
- Default Value -
array()
Rate limiter
$wgRateLimits
Simple rate limiter options to brake edit floods. Maximum number actions allowed in the given number of seconds; after that the violating client receives HTTP 500 error pages until the period elapses.
array( 4, 60 ) for a maximum of 4 hits in 60 seconds.
This option set is experimental and likely to change.
Requires memcached.
- Default Value -
array(
'edit' => array(
'anon' => null, // for any and all anonymous edits (aggregate)
'user' => null, // for each logged-in user
'newbie' => null, // for each recent account; overrides 'user'
'ip' => null, // for each anon and recent account
'subnet' => null, // ... with final octet removed
),
'move' => array(
'user' => null,
'newbie' => null,
'ip' => null,
'subnet' => null,
),
)
$wgRateLimitLog
Set to a filename to log rate limiter hits.
- Default Value -
null
Proxies
$wgBlockOpenProxies
Automatic open proxy test on edit.
- Default Value -
false
$wgProxyPorts
- Default Value -
array( 80, 81, 88, 1080, 3128, 6588, 8000, 8080, 8888, 65506 )
$wgProxyScriptPath
- Default Value -
"$IP/proxy_check.php"
$wgProxyMemcExpiry
- Default Value -
86400
$wgProxyList
Big list of banned IP addresses. In the keys not the values.
- Default Value -
array()
$wgProxyWhitelist
Proxy whitelist, list of addresses that are assumed to be non-proxy despite what the other methods might say
- Default Value -
array()
$wgEnableSorbs
Use http.dnsbl.sorbs.net to check for open proxies.
- Default Value -
true
$wgEnableOpm
Use opm.blitzed.org to check for open proxies. Not yet actually used.
- Default Value -
false
$wgSecretKey
This should always be customised in LocalSettings.php
- Default Value -
false
$wgProxyKey
Deprecated, replaced by $wgSecretKey.
- Default Value -
false
Squid
$wgCookieExpiration
- Default Value -
2592000
$wgUseSquid
Enable/disable Squid.
- Default Value -
false
$wgUseESI
If you run Squid3 with ESI support, enable this.
- Default Value -
false
$wgInternalServer
Internal server name as known to Squid, if different. eg:
$wgInternalServer = 'http://yourinternal.tld:8000';
- Default Value -
$wgServer
$wgSquidMaxage
Cache timeout for the squid, will be sent as s-maxage (without ESI) or Surrogate-Control (with ESI). Without ESI, you should strip out s-maxage in the Squid config.
18000 seconds = 5 hours, more cache hits with 2678400 = 31 days.
- Default Value -
18000
$wgSquidServers
A list of proxy servers (ips if possible) to purge on changes. Don't specify ports here (80 is default). eg:
$wgSquidServers = array('127.0.0.1');
- Default Value -
array()
$wgSquidServersNoPurge
Same as $wgSquidServers, except they aren't purged.
- Default Value -
array()
$wgMaxSquidPurgeTitles
Maximum number of titles to purge in any one client operation
- Default Value -
400
$wgSquidFastPurge
When purging, use persistent connections and don't wait for the response.
- Default Value -
true
Cookies
$wgCookieDomain
Set to set an explicit domain on the login cookies. eg, "justthis.domain.org" or ".any.subdomain.net"
- Default Value -
$wgCookiePath
- Default Value -
'/'
$wgDisableCookieCheck
- Default Value -
false
Reduction
$wgMiserMode
If true, disable database-intensive features
- Default Value -
false
$wgDisableQueryPages
Disable all query pages if miser mode is on, not just some.
- Default Value -
false
$wgDisableCounters
- Default Value -
false
$wgDisableTextSearch
Disables full text search.
- Default Value -
false
$wgDisableSearchUpdate
If you've disabled search semi-permanently, this also disables updates to the table. If you ever re-enable, be sure to rebuild the search table.
- Default Value -
false
$wgDisableAnonTalk
Disable talk pages for anonymous users (IPs).
- Default Value -
false
$wgUseDumbLinkUpdate
Do DELETE/INSERT for link updates instead of incremental.
- Default Value -
false
Uploads
Uploads have to be specially set up to be secure.
$wgDisableUploads
If set, disables the upload page and hides the link.
- Default Value -
true
$wgRemoteUploads
Set to true to enable the upload link while local uploads are disabled. Assumes that the special page link will be bounced to another server where uploads do work.
- Default Value -
false
$wgFileExtensions
This is the list of preferred extensions for uploading files. Uploading files with extensions not in this list will trigger a warning.
- Default Value -
array( 'png', 'gif', 'jpg', 'jpeg' )
$wgFileBlacklist
Files with these extensions will never be allowed as uploads.
- Default Value -
array(
# HTML may contain cookie-stealing JavaScript and web bugs
'html', 'htm',
# PHP scripts may execute arbitrary code on the server
'php', 'phtml', 'php3', 'php4', 'phps',
# Other types that may be interpreted by some servers
'shtml', 'jhtml', 'pl', 'py', 'cgi',
# May contain harmful executables for Windows victims
'exe', 'scr', 'dll', 'msi', 'vbs', 'bat', 'com', 'pif', 'cmd', 'vxd', 'cpl' )
$wgCheckFileExtensions
This is a flag to determine whether or not to check file extensions on upload.
- Default Value -
true
$wgStrictFileExtensions
If this is turned off, users may override the warning for files not covered by $wgFileExtensions.
- Default Value -
true
$wgUploadSizeWarning
Warn if uploaded files are larger than this.
- Default Value -
150000
MIME types
$wgVerifyMimeType
Determines if the mime type of uploaded files should be checked
- Default Value -
true
$wgMimeTypeFile
Sets the mime type definition file to use by MimeMagic.php. eg:
$wgMimeTypeFile= "/etc/mime.types"; $wgMimeTypeFile= NULL; #use built in defaults only.
- Default Value -
"includes/mime.types"
$wgMimeInfoFile
Sets the mime type info file to use by MimeMagic.php. eg:
$wgMimeInfoFile= NULL; #use built in defaults only.
- Default Value -
"includes/mime.info"
$wgLoadFileinfoExtension
Switch for loading the FileInfo extension by PECL at runtime. This should be used only if FileInfo is installed as a shared object / dynamic libary
- Default Value -
false
$wgMimeDetectorCommand
Sets an external mime detector program. The command must print only the mime type to standard output. The name of the file to process will be appended to the command given here. If not set or NULL, mime_content_type will be used if available.
eg:
$wgMimeDetectorCommand= "file -bi"
- Default Value -
NULL
$wgTrivialMimeDetection
Switch for trivial mime detection. Used by thumb.php to disable all fancy things, because only a few types of images are needed and file extensions can be trusted.
- Default Value -
false
Antivirus
$wgAntivirus
Internal name of virus scanner. This servers as a key to the $wgAntivirusSetup array.
Set this to NULL to disable virus scanning. If not null, every file uploaded will be scanned for viruses.
- Default Value -
NULL
$wgAntivirusSetup
Configuration for different virus scanners. This an associative array of associative arrays:
it contains on setup array per known scanner type. The entry is selected by $wgAntivirus, i.e. valid values for $wgAntivirus are the keys defined in this array.
The configuration array for each scanner contains the following keys: "command", "codemap", "messagepattern";
"command"- the full command to call the virus scanner - %f will be replaced with the name of the file to scan. If not present, the filename will be appended to the command. Note that this must be overwritten if the scanner is not in the system path; in that case, plase set
$wgAntivirusSetup[$wgAntivirus]['command']to the desired command with full path. "codemap"- a mapping of exit code to return codes of the
detectVirus()function in SpecialUpload.php.- An exit code mapped to
AV_SCAN_FAILEDcauses the function to consider the scan to be failed. This will pass the file if $wgAntivirusRequired is not set. - An exit code mapped to
AV_SCAN_ABORTEDcauses the function to consider the file to have an usupported format, which is probably imune to virusses. This causes the file to pass. - An exit code mapped to
AV_NO_VIRUSwill cause the file to pass, meaning no virus was found. - All other codes (like
AV_VIRUS_FOUND) will cause the function to report a virus.
- An exit code mapped to
- You may use
"*"as a key in the array to catch all exit codes not mapped otherwise. "messagepattern"- a perl regular expression to extract the meaningful part of the scanners output. The relevant part should be matched as group one (
\1). - If not defined or the pattern does not match, the full message is shown to the user.
- Default Value -
array(
#setup for clamav
'clamav' => array (
'command' => "clamscan --no-summary ",
'codemap'=> array (
"0"=> AV_NO_VIRUS, #no virus
"1"=> AV_VIRUS_FOUND, #virus found
"52"=> AV_SCAN_ABORTED, #unsupported file format (probably imune)
"*"=> AV_SCAN_FAILED, #else scan failed
),
'messagepattern'=> '/.*?:(.*)/sim',
),
#setup for f-prot
'f-prot' => array (
'command' => "f-prot ",
'codemap'=> array (
"0"=> AV_NO_VIRUS, #no virus
"3"=> AV_VIRUS_FOUND, #virus found
"6"=> AV_VIRUS_FOUND, #virus found
"*"=> AV_SCAN_FAILED, #else scan failed
),
'messagepattern'=> '/.*?Infection:(.*)$/m',
),
)
$wgAntivirusRequired
Determines if a failed virus scan (AV_SCAN_FAILED) will cause the file to be rejected.
- Default Value -
true
Parser
$wgAllowExternalImages
Whether to allow inline image pointing to other websites.
- Default Value -
true
TeX
To use inline TeX, you need to compile 'texvc' (in the 'math' subdirectory of the MediaWiki package and have latex, dvips, gs (ghostscript), and convert (ImageMagick) installed and available in the PATH.
Please see math/README for more information.
$wgUseTeX
Enables the use of <math> (TeX) tags.
- Default Value -
false
$wgTexvc
Location of the texvc binary.
Only used if $wgUseTeX is set.
- Default Value -
'./math/texvc'
HTML
$wgUserHtml
Allow limited user-specified HTML in wiki pages? It will be run through a whitelist for security. Set this to false if you want wiki pages to consist only of wiki markup. Note that replacements do not yet exist for all HTML constructs.
- Default Value -
true
$wgRawHtml
Allow raw, unchecked HTML in <html>...</html> sections. This is very dangerous on a publically editable site, so you can't enable it unless you've restricted editing to trusted users only with $wgWhitelistEdit.
- Default Value -
false
Tidy
$wgUseTidy
Use tidy to make sure HTML output is sane. This should only be enabled if $wgUserHtml is true.
tidy is a free tool that fixes broken HTML. See http://www.w3.org/People/Raggett/tidy/.
- Default Value -
false
$wgTidyBin
Should be set to the path of the tidy binary.
- Default Value -
'tidy'
$wgTidyConf
Should be set to the path of the tidy configuration file.
- Default Value -
$IP.'/extensions/tidy/tidy.conf'
$wgTidyOpts
Options passed to tidy on the command line.
- Default Value -
''
$wgTidyInternal
Controls the use of the PECL extension to use an inprocess tidy library instead of spawning a separate program. Normally you shouldn't need to override the setting except for debugging. To install, use 'pear install tidy' and add a line 'extension=tidy.so' to php.ini.
- Default Value -
function_exists( 'tidy_load_config' )
$wgUseXMLparser
Use XML parser?
- Default Value -
false
Images
$wgUseImageResize
Set $wgUseImageResize to true if you want to enable dynamic server side image resizing ("Thumbnails")
- Default Value -
false
$wgUseImageMagick
Resizing can be done using PHP's internal image libraries or using ImageMagick. The later supports more file formats than PHP, which only supports PNG, GIF, JPG, XBM and WBMP.
Set $wgUseImageMagick to true to use ImageMagick instead of the builtin functions.
- Default Value -
false
$wgImageMagickConvertCommand
Set to the command used to evoke ImageMagick.
- Default Value -
'/usr/bin/convert'
$wgSVGConverters
Scalable Vector Graphics (SVG) may be uploaded as images.
Since SVG support is not yet standard in browsers, it is necessary to rasterize SVGs to PNG as a fallback format.
An external program is required to perform this conversion:
- Default Value -
array(
'ImageMagick' => '$path/convert -background white -geometry $width $input $output',
'sodipodi' => '$path/sodipodi -z -w $width -f $input -e $output',
'inkscape' => '$path/inkscape -z -w $width -f $input -e $output',
'batik' => 'java -Djava.awt.headless=true -jar $path/batik-rasterizer.jar -w $width -d $output $input',
);
$wgSVGConverter
A key from $wgSVGConverters to use as converter.
- Default Value -
'ImageMagick'
$wgSVGConverterPath
If not in the executable PATH, specify.
- Default Value -
''
$wgImageHtmlCacheExpiry
Set to a number of seconds to cache the HTML associated with an image. This is an emergency optimisation feature and will cause lots of problems. It is recommended that the expiry be very short and that the users be warned.
- Default Value -
0
$wgImageLimits
Limit images on image description pages to a user-selectable limit. In order to reduce disk usage, limits can only be selected from a list. This is the list of settings the user can choose from.
- Default Value -
array (
array(320,240),
array(640,480),
array(800,600),
array(1024,768),
array(1280,1024),
array(10000,10000) )
$wgThumbnailScriptPath
Give a path here to use thumb.php for thumbnail generation on client request, instead of generating them on render and outputting a static URL. This is necessary if some of your apache servers don't have read/write access to the thumbnail path.
Example:
$wgThumbnailScriptPath = "{$wgScriptPath}/thumb.php";
- Default Value -
false
Same as $wgThumbnailScriptPath, but for shared uploads.
- Default Value -
false
Recent changes
$wgRCSeconds
Show seconds in Recent Changes.
- Default Value -
false
$wgPutIPinRC
Log IP addresses in the recentchanges table.
- Default Value -
false
$wgRCMaxAge
Recentchanges items are periodically purged; entries older than this many seconds will go.
Defaults to one week.
- Default Value -
7 * 24 * 3600
$wgUseRCPatrol
Use RC Patrolling to check for vandalism
- Default Value -
true
UDP updates
$wgRC2UDPAddress
- Default Value -
false
$wgRC2UDPPort
- Default Value -
false
$wgRC2UDPPrefix
- Default Value -
''
Copyright
$wgEnableDublinCoreRdf
- Default Value -
false
$wgEnableCreativeCommonsRdf
What does this do?
- Default Value -
false
$wgRightsPage
- Default Value -
NULL
$wgRightsUrl
- Default Value -
NULL
$wgRightsText
- Default Value -
NULL
$wgRightsIcon
- Default Value -
NULL
$wgCopyrightIcon
Set this to some HTML to override the rights icon with an arbitrary logo.
- Default Value -
NULL
$wgUseCopyrightUpload
Set this to true if you want detailed copyright information forms on Upload.
- Default Value -
false
$wgCheckCopyrightUpload
Set this to false if you want to disable checking that detailed copyright information values are not empty.
- Default Value -
true
Extensions
$wgSkinExtensionFunctions
- Default Value -
array()
$wgExtensionFunctions
- Default Value -
array()
$wgAuth
Authentication plugin. See AuthPlugin.php.
- Default Value -
null
$wgHooks
Global list of hooks.
Add a hook by doing:
$wgHooks['event_name'][] = $function;
or:
$wgHooks['event_name'][] = array($function, $data);
or:
$wgHooks['event_name'][] = array($object, 'method');
See hooks.doc for details.
- Default Value -
array()
$wgDisableInternalSearch
Disable internal search so that extensions can implement it.
- Default Value -
false
$wgSearchForwardUrl
Set this to a URL to forward search requests to some external location. If the URL includes '$1', this will be replaced with the URL-encoded search term.
For example, to forward to Google you'd have something like:
$wgSearchForwardUrl = 'http://www.google.com/search?q=$1' . '&domains=http://example.com' . '&sitesearch=http://example.com' . '&ie=utf-8&oe=utf-8';
- Default Value -
null
$wgExternalStores
External stores allow including content from non database sources following URL links
Short names of ExternalStore classes may be specified in an array here:
$wgExternalStores = array("http","file","custom")...
CAUTION: Access to database might lead to code execution
See ExternalStore.php.
- Default Value -
false
HTCP multicast purging
What does this do?
$wgHTCPPort
- Default Value -
4827
$wgHTCPMulticastTTL
- Default Value -
1
$wgHTCPMulticastAddress
Not used yet. Commented out.
- Default Value -
"224.0.0.85"
Miscellaneous settings
$wgShowIPinHeader
Show the IP in the user bar for anonymous users by default.
- Default Value -
true
$wgMaxNameChars
Maximum number of bytes in username.
- Default Value -
32
$wgUseData
What does this do?
- Default Value -
false
Removed since version 1.4.5
$wgUseOldExistenceCheck
"Use old prefill link method, for debugging only."
- Default Value -
false
$wgHitcounterUpdateFreq
Sets how often page counters should be updated, higher values are easier on the database. A value of 1 causes the counters to be updated on every hit, any higher value n cause them to update on average every n hits. Should be set to either 1 or something largish, eg 1000, for maximum efficiency.
- Default Value -
1
$wgAntiLockFlags
Anti-lock flags. This is a bitfield.
- ALF_PRELOAD_LINKS
- Preload links during link update for save.
- ALF_PRELOAD_EXISTENCE
- Preload cur_id during replaceLinkHolders
- Default Value -
0
$wgDiff3
Path to the GNU diff3 utility. If the file doesn't exist, edit conflicts will fall back to the old behaviour (no merging).
- Default Value -
'/usr/bin/diff3'
$wgCompressRevisions
We can also compress text in the old revisions table. If this is set on, old revisions will be compressed on page save if zlib support is available. Any compressed revisions will be decompressed on load regardless of this setting but will not be readable at all if zlib support is not available.
- Default Value -
false
$wgAllowRealName
Whether or not to allow real name fields.
- Default Value -
true
$wgExtraRandompageSQL
Filter for Special:Randompage. Part of a WHERE clause.
- Default Value -
false
$wgAllowPageInfo
Allow the "info" action, very inefficient at the moment.
- Default Value -
false
$wgMaxTocLevel
Maximum indent level of toc.
- Default Value -
999
$wgUseGeoMode
Recognise longitude/latitude coordinates.
- Default Value -
false
$wgUseValidation
Validation for print or other production versions
- Default Value -
false
$wgUseExternalDiffEngine
Use external C++ diff engine (module wikidiff from the extensions package).
- Default Value -
false
$wgFeedLimit
Set maximum number of results to return in syndication feeds (RSS, Atom) for eg Recentchanges, Newpages.
- Default Value -
50
$wgFeedCacheTimeout
Minimum timeout for cached Recentchanges feed, in seconds. A cached version will continue to be served out even if changes are made, until this many seconds runs out since the last render.
- Default Value -
60
$wgFeedDiffCutoff
When generating Recentchanges RSS/Atom feed, diffs will not be generated for pages larger than this size.
- Default Value -
32768
$wgEnableSOAP
Enable SOAP interface.
SOAP is a protocol for remote procedure calls (RPC) using HTTP as middleware. This interface can be used by bots or special clients to receive articles from a wiki.
Most bots use the normal HTTP interface and don't use SOAP. If unsure, set to false.
- Default Value -
false
$wgBrowserBlackList
Browser Blacklist for unicode non compliant browsers. Contains a list of regexps : "/regexp/" matching problematic browsers.
- Default Value -
array(
"/Mozilla\/4\.78 \[en\] \(X11; U; Linux/"
/**
* MSIE on Mac OS 9 is teh sux0r, converts þ to <thorn>, ð to <eth>, Þ to <THORN> and Ð to <ETH>
*
* Known useragents:
* - Mozilla/4.0 (compatible; MSIE 5.0; Mac_PowerPC)
* - Mozilla/4.0 (compatible; MSIE 5.15; Mac_PowerPC)
* - Mozilla/4.0 (compatible; MSIE 5.23; Mac_PowerPC)
* - [...]
*
* @link http://en.wikipedia.org/w/index.php?title=User%3A%C6var_Arnfj%F6r%F0_Bjarmason%2Ftestme&diff=12356041&oldid=12355864
* @link http://en.wikipedia.org/wiki/Template%3AOS9
*/
"/Mozilla\/4\.0 \(compatible; MSIE \d+\.\d+; Mac_PowerPC\)/"
)
See: Wikipedia:Template:OS9, [1] (No longer valid 17:19, 21 Jun 2005 (UTC))
$wgDisableHardRedirects
Disable redirects to special pages and interwiki redirects, which use a 302 and have no "redirected from" link.
- Default Value -
false
$wgCountCategorizedImagesAsUsed
On Special:Unusedimages, consider images "used" if they are put into a category. Default (false) is not to count those as used.
- Default Value -
false
$wgMakeDumpLinks
Produce hashed HTML article paths. Used internally, do not set.
- Default Value -
false
$wgCapitalLinks
Set this to false to avoid forcing the first letter of links to capitals. WARNING: may break links! This makes links COMPLETELY case-sensitive. Links appearing with a capital at the beginning of a sentence will not go to the same place as links in the middle of a sentence using a lowercase initial.
- Default Value -
true