Manual:Configuration Settings
From NeoWiki
This is an index of all supported configuration options based on the DefaultSettings.php
file.
Never edit DefaultSettings.php
; copy appropriate lines to LocalSettings.php
instead and amend them as appropriate.
General Settings
- $wgMetaNamespace - The name used for the meta-namespace.
- $wgMetaNamespaceTalk - The name used for the meta-namespace talk pages.
- $wgServer - The base URL of the server.
- $wgServerName - The name of the server without the protocol. (eg, en.wikipedia.org)
- $wgSitename - The name of the site. Should be changed
- $wgVersion - Contains the current version of MediaWiki, as displayed to the user.
Paths
- $IP - The filesystem installation directory. Not in DefaultSettings.php.
- $wgActionPaths - Paths for various user actions. Used to 'pretty' URLs.
- $wgArticlePath - The URL template used to create article links.
- $wgFavicon - The URL of the site favicon.
- $wgHashedUploadDirectory - If true, use the /a/ab/foo.png directory structure.
- $wgLogo - The URL of the site logo.
- $wgMathDirectory - The file system path of the directory containing LaTeX math images.
- $wgMathPath - The URL base of the directory containing LaTeX math images.
- $wgRedirectScript - The URL of redirect.php, needed for backwards compatibility.
- $wgScript - The URL of index.php.
- $wgScriptPath - The base URL path.
- $wgStyleDirectory - The file system path to the skins directory.
- $wgStylePath - The URL of the skins directory.
- $wgStyleSheetDirectory - The file system path of the directory containing the stylesheets.
- $wgStyleSheetPath - The URL of the directory containing the stylesheets.
- $wgTmpDirectory - The URL of the temporary directory.
- $wgUploadBaseUrl -
- $wgUsePathInfo - Whether to use 'pretty' URLs.
- $wgUploadDirectory - The file system path of the upload directory.
- $wgUploadNavigationUrl - Point the upload navigation link to an external URL.
- $wgUploadPath - The URL of the upload directory.
- $wgCacheSharedUploads - Cache shared metadata in memcached.
- $wgHashedSharedUploadDirectory - Whether to hash the shared upload directory.
- $wgSharedLatin1 - set true if the repository uses latin1 filenames.
- $wgSharedUploadDBname - DB name with metadata about shared directory.
- $wgSharedUploadDirectory - Path on the file system where shared uploads can be found.
- $wgSharedUploadPath - Full path on the web server where shared uploads can be found.
- $wgUseSharedUploads - Whether to look in the shared repository if no file of the given name is found in the local repository (for [[Image:..]], [[Media:..]] links).
- $wgFetchCommonsDescriptions - set this "true" if you want to integrate media-descriptions, stored in the commonswiki
Email settings
- $wgEmailAuthentication - Whether Email authentication (confirmation) is needed for that wiki for using any Email function (except password reminder which works independently from this setting)
- $wgEmergencyContact - Site admin email address
- $wgEnableEmail - Set to true to enable the e-mail basic features: Password reminders, etc.
- $wgEnableUserEmail - Set to true to enable user-to-user e-mail.
- $wgPasswordSender - Password reminder email address.
- $wgSMTP - For using a direct (authenticated) SMTP server connection.
Email notification (Enotif) settings
- $wgEnotifFromEditor - Email notifications appear to be coming from the page editor (not from Wiki server)
- $wgEnotifMinorEdits - Email notifications also for "minor edits" (user preference is shown and user needs to opt-in)
- $wgEnotifRevealEditorAddress - reply-to address of Email notifications may be filled with page editor's address (user preference is shown and user needs to opt-in)
- $wgEnotifUserTalk - Email notifications can be sent for first change on a user_talk page (user preference is shown and user needs to opt-in)
- $wgEnotifWatchlist - Email notifications can be sent for the first change on watched pages (user preference is shown and user needs to opt-in)
Database settings
- $wgDBconnection -
- $wgDBerrorLog - File to log MySQL errors to.
- $wgDBminWordLen - Used to discard words that MySQL will not return any results for shorter values configure mysql directly.
- $wgDBmwschema - Schema that Postgres stores the MediaWiki tables in. Defaults to 'mediawiki'
- $wgDBmysql4 - Set to true to use enhanced fulltext search.
- $wgDBname - Name of the database.
- $wgDBpassword - The password for $wgDBuser.
- $wgDBport - Database port.
- $wgDBprefix - Table name prefix.
- $wgDBschema - On some databases this allows separate logical namespace for application data.
- $wgDBserver - Database host name or ip address.
- $wgDBservers - Database load balancer.
- $wgDBtransactions - Set to true if using InnoDB tables.
- $wgDBts2schema - Schema that the Tsearch2 tables live in for Postgres. Defaults to 'public'
- $wgDBtype - Type of database.
- $wgDBuser - Database username.
- $wgLocalDatabases - Other wikis on this site, can be administered from a single developer account.
- $wgMasterWaitTimeout - How long to wait for a slave to catch up to the master.
- $wgSearchType - Type of DB search used.
- $wgSqlLogFile
- $wgSqlTimeout
- $wgSharedDB - The name of the shared database (currently for shared user table only).
Sysop SQL queries
These settings are for sysops to make queries through Special:Asksql.
- 18px Warning: Dangerous if not configured properly.
- $wgAllowSysopQueries - Set to allow sysop queries.
- $wgDBsqlpassword - The password for $wgDBsqluser.
- $wgDBsqluser - The SQL user used for queries.
Memcached settings
See docs/memcached.doc.
- $wgLinkCacheMemcached - Cache links using object cache setting (memcache, Turck MMCache, eAccelerator, etc.)
- $wgMemCachedDebug - Will be set to false in Setup.php, if the server isn't working.
- $wgMemCachedServers
- $wgSessionsInMemcached
- $wgUseEAccelShm - You can use this for persistent caching where your wiki runs on a single server. Use eAccelerator for shared memory.
- $wgUseMemCached - Use memcache, using the servers set in $wgMemCachedServers.
- $wgUseTurckShm - Use Turck MMCache shared memory.
- $wgUseMemCached - OBSOLETE : use "$wgMainCacheType = CACHE_MEMCACHED;" instead
Localization
- $wgAmericanDates - Enable for English module to print dates as eg 'May 12' instead of '12 May'.
- $wgDisableLangConversion - Whether to enable language variant conversion.
- $wgDocType - The doc type to use in the
<!DOCTYPE !>
declaration. - $wgDTD
- $wgEditEncoding
- $wgForceUIMsgAsContentMsg
- $wgInputEncoding - The encoding of the input text.
- $wgInterwikiMagic - Treat language links as magic connectors, not inline links.
- $wgLanguageCode - Site language code. Should be one of the ./language/Language(.*).php files.
- $wgLanguageFile - Filename of a language file generated by dumpMessages.php.
- $wgLegacyEncoding - Set this to eg 'ISO-8859-1' to perform character set conversion when loading old revisions not marked with utf-8 flag.
- $wgLocaltimezone - Fake out the timezone that the server thinks it's in.
- $wgMimeType - The type to send in the
Content-Type
header. - $wgMsgCacheExpiry - When a message in cache expires (in seconds).
- $wgOutputEncoding - The encoding of the output text.
- $wgPartialMessageCache
- $wgTranslateNumerals - For Hindi and Arabic use local numerals instead of Western style (0-9) numerals in interface.
- $wgUseDatabaseMessages - Translation using MediaWiki: namespace.
- $wgUseDynamicDates - Enable to allow rewriting dates in page text. DOES NOT FORMAT CORRECTLY FOR MOST LANGUAGES.
- $wgUseLatin1 - Enable ISO-8859-1 compatibility mode.
- $wgUseZhdaemon - Whether to use zhdaemon to perform Chinese text processing.
- $wgZhdaemonHost - The host which zhdaemon is on. This is only used if $wgUseZhdaemon is set.
- $wgZhdaemonPort - The port on $wgZhdaemonHost which zhdaemon is on.
Debug/logging
- $wgDebugComments - Include portions of log output in page HTML comment.
- $wgDebugDumpSql
- $wgDebugLogFile - The file name of the debug log, or empty if disabled. wfDebug() appends to this file.
- $wgDebugLogGroups - Selective debug logs on a group basis.
- $wgDebugRawPage - Avoid overlapping debug entries by leaving out CSS.
- $wgDebugRedirects
- $wgLogQueries
- $wgShowSQLErrors - Whether to show "We're sorry, but there has been a database error." pages.
Profiling
- $wgDebugFunctionEntry - Output debug message on every wfProfileIn/wfProfileOut
- $wgDebugProfiling - Detects non-matching wfProfileIn/wfProfileOut calls
- $wgDebugSquid - Lots of debugging output from SquidUpdate.php
- $wgProfileCallTree - If true, print a raw call tree instead of per-function report
- $wgProfileLimit - Only record profiling info for pages that took longer than this
- $wgProfileOnly - Don't put non-profiling info into log file
- $wgProfileSampleRate - Only profile every n requests when profiling is turned on
- $wgProfileToCommentUser - Put profiling data in HTML comments in the output file, for a given user only.
- $wgProfileToDatabase - Log sums from profiling into profiling table in db.
- $wgProfiling - Enable for more detailed by-function times in debug log
Site customization
These are site-wide appearance settings.
- $wgAjaxSearch
- $wgAllowUserCss - Allow user Cascading Style Sheets (CSS)
- $wgAllowUserJs - Allow user Javascript pages
- $wgDefaultUserOptions - Settings added to this array will override the language globals for the user preferences used by anonymous visitors and newly created accounts.
- $wgExtraSubtitle - The subtitle to appear under every title.
- $wgNavigationLinks - Navigation links for the user sidebar.
- $wgNoFollowLinks - If true, external URL links in wiki text will be given the
rel=nofollow
attribute. - $wgSiteNotice - A message to be displayed at the top of every page.
- $wgSiteSupportPage - A page where your users can donate.
- $wgUrlProtocols - Defines the protocols which are supported and translated in HTML by the mediawiki parser.
- $wgUseAjax
- $wgUseSiteCss - Use the site's Cascading Style Sheets (CSS)
- $wgUseSiteJs - Use the site's Javascript page
Namespaces
-2 | Media: |
-1 | Special: |
0 | : |
1 | Talk: |
2 | User: |
3 | User talk: |
4 | NeoWiki: |
5 | NeoWiki talk: |
6 | File: |
7 | File talk: |
8 | MediaWiki: |
9 | MediaWiki talk: |
10 | Template: |
11 | Template talk: |
12 | Help: |
13 | Help talk: |
14 | Category: |
15 | Category talk: |
- $wgExtraNamespaces - Additional namespaces.
- $wgNamespaceProtection - default protection levels for namespaces.
- $wgNamespaceRobotPolicies
- $wgNamespacesToBeSearchedDefault - Which namespaces should be searched?
- $wgNamespacesWithSubpages - Which namespaces should support subpages?
Page customizations
These are pages not existing in vanilla MediaWiki which interface definition files (in any language) expect to exist though. If you want to avoid broken links in the interface you may want to make sure that either they contain some helpful content or redirect/customize them to appropriate pages (either via redirects at the pages or via editing the pages defintions):
- MediaWiki:aboutpage
- MediaWiki:bugreportspage
- MediaWiki:copyrightpage
- MediaWiki:currentevents-url
- MediaWiki:disambiguationspage
- MediaWiki:disclaimerpage
- MediaWiki:edithelppage
- MediaWiki:faqpage
- MediaWiki:grouppage-bot
- MediaWiki:grouppage-bureaucrat
- MediaWiki:grouppage-sysop
- MediaWiki:helppage
- MediaWiki:mainpage
- MediaWiki:policy-url (new since revision 19724)
- MediaWiki:portal-url
- MediaWiki:privacypage
- MediaWiki:sitesupport-url
On your local System messages special page you can search for interface strings using these page definitions.
Skins
- $wgDefaultSkin - The default skin.
- $wgSkipSkin - Specify the name of a skin that should not be presented in the list of available skins.
- $wgSkipSkins - More of the same as $wgSkipSkin.
Category
- $wgCategoryMagicGallery - On category pages, show thumbnail gallery for images belonging to that category instead of listing them as articles.
- $wgUseCategoryBrowser - Disable experimental dmoz-like category browsing.
- $wgUseCategoryMagic - Should the category pseudo-namespace be used?
Cache
- $wgCacheEpoch - Set this to current time to invalidate all prior cached pages.
- $wgCachePages - Allow client-side caching of pages
- $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.
- $wgFileCacheDirectory
- $wgImageHtmlCacheExpiry - Set to a number of seconds to cache the HTML associated with an image.
- $wgUseFileCache - This will cache static pages for non-logged-in users to reduce database traffic on public sites.
- $wgUseGzip - Use GZip to store cached pages.
- $wgUseWatchlistCache - Generate a watchlist once every hour or so.
- $wgWLCacheTimeout - The hour or so mentioned above.
- $wgMainCacheType - Replaces $wgUseMemCached.
Persistent Link Cache
Obsolete
- $wgCompressedPersistentLC - Use gzcompressed blobs.
- $wgEnablePersistentLC - Obsolete, do not use!
Interwiki
- $wgEnableScaryTranscluding - Enable scary transclusion (transcluding from another wiki)
- $wgInterwikiCache
- $wgInterwikiExpiry - Expiry time for cache of interwiki table.
- $wgInterwikiFallbackSite
- $wgInterwikiScopes
- $wgLocalInterwiki - The Interwiki prefix of this wiki. It should always be changed in LocalSettings.php.
Access
Wiki locking, user access options, blocking/banning, and some other related settings.
- $wgAccountCreationThrottle - Number of accounts each IP address may create, 0 to disable. Requires memcached.
- $wgAllowAnonymousMinor - Allow anonymous users to mark changes as 'minor'
- $wgAutoblockExpiry - Number of seconds before autoblock entries expire
- $wgDefaultBlockExpiry - Default expiry time in strtotime() format, or infinite for an infinite block.
- $wgBlockAllowsUTEdit - Allow blocked users to edit their talk pages
- $wgDisabledActions - Array of disabled article actions, e.g. view, edit, dublincore, delete, etc.
- $wgGroupPermissions - Use this to set access rights for groups and users. See also m:Help:User rights
- $wgPasswordSalt - For compatibility with old installations set to false.
- $wgReadOnly - Disallows editing, displaying the string given as the reason.
- $wgReadOnlyFile - If this file is found, the database is locked for the reason given in the contents of the file.
- $wgSysopRangeBans - Allow sysops to ban IP ranges
- $wgSysopUserBans - Allow sysops to ban logged-in users
- $wgWhitelistAccount - Types of accounts that can create new users.
- $wgWhitelistEdit - If true, users must login to edit. (versions 1.4 and previous)
- $wgWhitelistRead - Pages anonymous user may see.
Rate limiter
- $wgRateLimitLog - Set to a filename to log rate limiter hits.
- $wgRateLimits - Simple rate limiter options to brake edit floods.
Proxies
- $wgBlockOpenProxies - Automatic open proxy test on edit.
- $wgEnableOpm - Use opm.blitzed.org to check for open proxies. Not yet actually used.
- $wgEnableSorbs - Use http.dnsbl.sorbs.net to check for open proxies.
- $wgProxyKey - Deprecated, replaced by $wgSecretKey.
- $wgProxyList - Big list of banned IP addresses. In the keys not the values.
- $wgProxyMemcExpiry
- $wgProxyPorts
- $wgProxyScriptPath
- $wgProxyWhitelist - Proxy whitelist, list of addresses that are assumed to be non-proxy despite what the other methods might say
- $wgSecretKey - This should always be customised in LocalSettings.php
Squid
- $wgInternalServer - Internal server name as known to Squid, if different.
- $wgMaxSquidPurgeTitles - Maximum number of titles to purge in any one client operation
- $wgSquidFastPurge - When purging, use persistent connections and don't wait for the response.
- $wgSquidMaxage - Cache timeout for the squid.
- $wgSquidServers - A list of proxy servers (ips if possible) to purge on changes.
- $wgSquidServersNoPurge - Same as $wgSquidServers, except they aren't purged.
- $wgUseESI - If you run Squid3 with ESI support, enable this.
- $wgUseSquid - Enable/disable Squid.
Cookies
- $wgCookieDomain - Set to set an explicit domain on the login cookies.
- $wgCookiePath
- $wgDisableCookieCheck
- $wgCookieExpiration
Reduction
- $wgDisableAnonTalk - Disable talk pages for anonymous users (IPs).
- $wgDisableCounters - Disable view counter shown in the footer of an article/page as: "This page has been accessed X times"
- $wgDisableQueryPages - Disable all query pages if miser mode is on, not just some.
- $wgDisableSearchUpdate - If you've disabled search semi-permanently, this also disables updates to the table.
- $wgDisableTextSearch - Disables full text search.
- $wgMiserMode - If true, disable database-intensive features
- $wgUseDumbLinkUpdate - Do
DELETE
/INSERT
for link updates instead of incremental. - $wgWantedPagesThreshold - Minimum number of links required before a page is listed on Special:Wantedpages
Uploads
Uploads have to be specially set up to be secure.
- $wgCheckFileExtensions - This is a flag to determine whether or not to check file extensions on upload.
- $wgEnableUploads - Enables uploads and shows link to upload page
- $wgDisableUploads - (Deprecated) Does opposite of $wgEnableUploads
- $wgFileBlacklist - Files with these extensions will never be allowed as uploads.
- $wgFileExtensions - This is the list of preferred extensions for uploading files. Uploading files with extensions not in this list will trigger a warning.
- $wgRemoteUploads - Set to true to enable the upload link while local uploads are disabled.
- $wgStrictFileExtensions - If this is turned off, users may override the warning for files not covered by $wgFileExtensions.
- $wgUploadSizeWarning - Warn if uploaded files are larger than this.
MIME types
- $wgLoadFileinfoExtension - Switch for loading the FileInfo extension by PECL at runtime.
- $wgMaxUploadSize - Maximum size for file uploads.
- $wgMimeDetectorCommand - Sets an external mime detector program.
- $wgMimeInfoFile - Sets the mime type info file to use by MimeMagic.php.
- $wgMimeTypeFile - Sets the mime type definition file to use by MimeMagic.php.
- $wgTrivialMimeDetection - Switch for trivial mime detection.
- $wgVerifyMimeType - Determines if the mime type of uploaded files should be checked
Antivirus
- $wgAntivirus - Internal name of virus scanner.
- $wgAntivirusRequired - Determines if a failed virus scan (
AV_SCAN_FAILED
) will cause the file to be rejected. - $wgAntivirusSetup - Configuration for different virus scanners.
Parser
- $wgAllowExternalImages - Whether to allow inline image pointing to other websites.
- $wgUseXMLparser - Use XML parser?
HTML
- $wgRawHtml - Allow raw, unchecked HTML in <html>...</html> sections.
- $wgUserHtml - Allow limited user-specified HTML in wiki pages?
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.
Tidy
- $wgTidyBin - Should be set to the path of the tidy binary.
- $wgTidyConf - Should be set to the path of the tidy configuration file.
- $wgTidyInternal - Controls the use of the PECL extension to use an inprocess tidy library instead of spawning a separate program.
- $wgTidyOpts - Options passed to tidy on the command line.
- $wgUseTidy - Use tidy to make sure HTML output is sane.
Images
- $wgFileStore - Indicates where deleted images are to be stored, if undeletion enabled.
- $wgImageHtmlCacheExpiry - Set to a number of seconds to cache the HTML associated with an image.
- $wgImageLimits - Limit images on image description pages to a user-selectable limit.
- $wgImageMagickConvertCommand - Set to the command used to evoke ImageMagick.
- $wgSaveDeletedFiles - Indicates that deleted images are to be stored for later undeletion.
- $wgSharedThumbnailScriptPath - Same as $wgThumbnailScriptPath, but for shared uploads.
- $wgSVGConverter - A key from $wgSVGConverters to use as converter.
- $wgSVGConverterPath - If not in the executable PATH, specify.
- $wgSVGConverters - Scalable Vector Graphics (SVG) may be uploaded as images.
- $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.
- $wgUseImageMagick - Resizing can be done using PHP's internal image libraries or using ImageMagick. The latter 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.
- $wgUseImageResize - Set $wgUseImageResize to true if you want to enable dynamic server side image resizing (Thumbnails)
- $wgShowEXIF - Determines whether EXIF metadata is to be displayed. Set to false for not showing data.
- parameters for upload path
Recent changes
- $wgAllowCategorizedRecentChanges - Allow to filter the recentchanges by a category or one of its sub(subsubsub...)categories
- $wgPutIPinRC - Log IP addresses in the recentchanges table.
- $wgRCMaxAge - Recentchanges items are periodically purged; entries older than this many seconds will go.
- $wgRCSeconds - Show seconds in Recent Changes.
- $wgUseRCPatrol - Use RC Patrolling to check for vandalism
UDP updates
Send RC updates via UDP. See: A Simple IRC RC bot
Copyright
- $wgCheckCopyrightUpload - Set this to false if you want to disable checking that detailed copyright information values are not empty.
- $wgCopyrightIcon - Set this to some HTML to override the copyrights icon with an arbitrary logo.
- $wgEnableCreativeCommonsRdf
- $wgEnableDublinCoreRdf
- $wgRightsIcon
- $wgRightsPage
- $wgRightsText
- $wgRightsUrl
- $wgUseCopyrightUpload - Set this to true if you want detailed copyright information forms on Upload.
Extensions
- $wgAuth - Authentication plugin. See AuthPlugin.php.
- $wgDisableInternalSearch - Disable internal search so that extensions can implement it.
- $wgExtensionFunctions
- $wgExternalStores - External stores allow including content from non database sources following URL links.
- $wgHooks - Global list of hooks.
- $wgSearchForwardUrl - Set this to a URL to forward search requests to some external location.
- $wgSkinExtensionFunctions
HTCP multicast purging
- $wgHTCPMulticastAddress - Not used yet. Commented out.
- $wgHTCPMulticastTTL
- $wgHTCPPort
Miscellaneous settings
- $wgAllowPageInfo - Allow the info action, very inefficient at the moment.
- $wgAllowRealName - Whether or not to allow real name fields.
- $wgAntiLockFlags - Anti-lock flags.
- $wgBrowserBlackList - Browser Blacklist for unicode non compliant browsers.
- $wgCapitalLinks - Set this to false to avoid forcing the first letter of links to capitals.
- $wgCompressRevisions - If this is set on, old revisions will be compressed on page save if zlib support is available.
- $wgCountCategorizedImagesAsUsed - On Special:Unusedimages, consider images used if they are put into a category.
- $wgDiff3 - Path to the GNU diff3 utility.
- $wgDisableHardRedirects - Disable redirects to special pages and interwiki redirects, which use a 302 and have no redirected from link.
- $wgEnableSOAP - Enable SOAP interface.
- $wgExtraRandompageSQL - Filter for Special:Randompage. Part of a WHERE clause.
- $wgFeedCacheTimeout - 'Minimum' timeout for cached Recentchanges feed, in seconds.
- $wgFeedDiffCutoff - When generating Recentchanges RSS/Atom feed, diffs will not be generated for pages larger than this size.
- $wgFeedLimit - Set maximum number of results to return in syndication feeds (RSS, Atom) for eg Recentchanges, Newpages.
- $wgHitcounterUpdateFreq - Sets how often page counters should be updated.
- $wgJobRunRate - Speed of the background task job queue (e.g. update of links)
- $wgLegalTitleChars - Override default list of illegal characters in page titles.
- $wgMakeDumpLinks - Produce hashed HTML article paths.
- $wgMaxNameChars - Maximum number of bytes in username.
- $wgMaxTocLevel - Maximum indent level of toc.
- $wgRedirectSources
- $wgRestrictionTypes
- $wgShowIPinHeader - Show the IP in the user bar for anonymous users by default.
- $wgSpamRegex - A regular expression pattern which stops a page from being saved.
- $wgUseData
- $wgUseExternalDiffEngine - Use external C++ diff engine (module wikidiff from the extensions package).
- $wgUseGeoMode - Recognise longitude/latitude coordinates.
- $wgUseOldExistenceCheck - Use old prefill link method, for debugging only.
- $wgUseTrackbacks
- $wgUseETag
- $wgUseTrackbacks - Not yet documentated (see m:Trackback)
- $wgUseValidation - Validation for print or other production versions