FANDOM


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.



Listed alphabetically | Listed by function | Category:MediaWiki configuration settings



General Settings Edit

  • $wgCanonicalServer - Canonical URL of the server, to use in IRC feeds and notification e-mails.
  • $wgSitename - The name of the site. Should be changed
  • $wgVersion - Contains the current version of MediaWiki, as displayed to the user. You should not change this!



Paths Edit

  • $IP - The filesystem installation directory. Not in DefaultSettings.php.
  • $wgActionPaths - Paths for various user actions.  Used to 'pretty' URLs.
  • $wgAppleTouchIcon - Optional URL to an icon to use when bookmarking to the home screen on Apple handheld devices.
  • $wgDiff - Path to the GNU diff utility.
  • $wgDiff3 - Path to the GNU diff3 utility.
  • $wgLogo - The URL of the site logo.
  • $wgPhpCli - Executable name of PHP cli client (php/php5).



See also TeX for LaTeX specific path settings.

See also Uploads for file/image upload path settings.

See also Skins for skins path settings.



Global Objects Edit

  • $wgConf - Create a site configuration object. Not used for much in a default install.



Email settings Edit

See Also User Access: $wgEmailConfirmToEdit



  • $wgEmailAuthentication - Whether email authentication (confirmation) is needed. If set to false, the only email functionality available will be password reminders.
  • $wgEnableEmail - Set to true to enable the e-mail basic features: Password reminders, etc.
  • $wgNoReplyAddress - Dummy address which should be accepted during mail send action.
  • $wgSMTP - For using a direct (authenticated) SMTP server connection.



Email notification (Enotif) settings Edit

Actual notifications for each user are defined in the options. You can change defaults with $wgDefaultUserOptions.



  • $wgEnotifFromEditor - Email notifications appear to be coming from the page editor (not from Wiki server)
  • $wgEnotifMaxRecips - Maximum number of users to mail at once when using impersonal mail.
  • $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)
  • $wgUsersNotifiedOnAllChanges (formerly $wgUsersNotifedOnAllChanges!) - Array of usernames who will be sent a notification email for every change which occurs on a wiki



Database settings Edit

  • $wgDBAvgStatusPoll - Time before the server get a SHOW STATUS query under overload conditions.
  • $wgDBssl - Whether to use SSL in DB connection.
  • $wgLocalDatabases - Other wikis on this site, can be administered from a single developer account.



LoadBalancer settings Edit

  • $wgSlaveLagWarning - If lag is higher than this value, show a warning in some special pages (like watchlist).



MySQL-specificEdit

  • $wgDBmysql5 - Set to true to set MySQL connection into UTF-8 encoding



PostgreSQL-specific Edit

  • $wgDBmwschema - Schema that Postgres stores the MediaWiki tables in. Defaults to 'mediawiki'
  • $wgDBts2schema - Schema that the Tsearch2 tables live in for Postgres. Defaults to 'public'



SQLite-specific Edit



Shared DB settings Edit



Compressed Storage Support Edit

  • $wgCompressRevisions - If this is set on, all future revisions will be compressed on page save, but only if zlib support is available and enabled in PHP.



Localization Edit

  • $wgLanguageCode - Site language code. Should be one of the ./languages/messages/Messages(.*).php files.
  • $wgLegacyEncoding - Set this to eg 'ISO-8859-1' to perform character set conversion when loading old revisions not marked with utf-8 flag.



Timezone settingsEdit



Language-specificEdit

English
  • $wgAmericanDates - Enable for English module to print dates as eg 'May 12' instead of '12 May'.



Arabic/Hindi
  • $wgTranslateNumerals - For Hindi and Arabic use local numerals instead of Western style (0-9) numerals in interface.



Debug/logging Edit

See also: Manual:How to debug
  • $wgAggregateStatsID - Allows statistics to be aggregated over more than one wiki when using udp logging.
  • $wgDebugAPI - Enable API debugging by removing some restrictions like POST-only
  • $wgDebugLogFile - The file name of the debug log, or empty if disabled. wfDebug() appends to this file.
  • $wgDebugRedirects - Displays redirect location instead of actually redirecting to the target URL
  • $wgDevelopmentWarnings - Whether to throw PHP notices for some possible error conditions and for deprecated functions.
  • $wgLogQueries - enable logging of enquiries; requires Extension AskSql
  • $wgShowDebug - Display debug data at the bottom of the main content area.
  • $wgShowSQLErrors - Whether to show "We're sorry, but there has been a database error." pages.



Profiling Edit

  • $wgProfileLimit - Only record profiling info for pages that took longer than this



Site customization Edit

  • $wgBreakFrames - Break out of framesets. This can be used to prevent external sites from framing your site.
  • $wgCapitalLinks - Set this to false to avoid forcing the first letter of links to capitals.
  • $wgMaxRedirects - Max number of redirects to follow when resolving redirects.
  • $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.
  • $wgStyleVersion - Appended in the query string of static CSS and JS to clear client side cache when changing this.
  • $wgUrlProtocols - Defines the protocols which are supported and translated in HTML by the MediaWiki parser.



Ajax Edit

  • $wgAjaxWatch - Enable watching/unwatching pages using AJAX.



CSS/Js Edit



Resource loader Edit

See ResourceLoader for more information.

  • $wgResourceModules - Array of all extra defined modules that can later be loaded during the output.



Namespaces Edit



Output Edit

  • $wgHtml5Version - Defines the value of the version attribute in the <html> tag, if any.
  • $wgMimeType - The type to send in the Content-Type header.
  • $wgEnableCanonicalServerLink - Output a <link rel="canonical"> tag on every page indicating the canonical server which should be used, i.e. $wgServer or $wgCanonicalServer.



The following settings are only used if $wgHtml5 is set to "false" (removed since MW 1.22):

  • $wgDocType - The doc type to use in the <!DOCTYPE !> declaration.
  • $wgDTD - Specifies the DTD in the DOCTYPE declaration for page output.



Robot policiesEdit



Mobile support Edit



Site Statistics Edit

  • $wgArticleCountMethod - Method used to determine if a page in a content namespace should be counted as a valid article.
  • $wgDisableCounters - Disable view counter shown in the footer of an article/page as: "This page has been accessed X times"



Skins Edit

  • $wgFooterIcons - Abstract list of footer icons for skins in place of old copyrightico and poweredbyico code.
  • $wgUseCombinedLoginLink - Login / create account link behavior when it's possible for anonymous users to create an account.



Category Edit

  • $wgCategoryCollation - A version indicator for collations that will be stored in cl_collation for all new rows.
  • $wgCategoryMagicGallery - On category pages, show thumbnail gallery for images belonging to that category instead of listing them as articles.



Cache Edit

Main article: Manual:Cache
  • $wgCacheEpoch - Set this to current time to invalidate all prior cached pages.
  • $wgCachePrefix - Overwrite the caching key prefix with custom value.
  • $wgQueryCacheLimit - Number of rows to cache in 'querycache' table when miser mode is on.
  • $wgThumbnailEpoch - If rendered thumbnail files are older than this timestamp, they will be rerendered on demand as if the file didn't already exist.
  • $wgUseETag - Whether MediaWiki should send an ETag header.



See Interwiki for Interwiki cache settings.



Client side caching Edit



File Cache Edit

Setting for Server side file caching

  • $wgFileCacheDepth - Depth of the subdirectory hierarchy to be created under $wgFileCacheDirectory.
  • $wgUseFileCache - This will cache static pages for non-logged-in users to reduce database traffic on public sites.



Message Cache Edit

  • $wgAdaptiveMessageCache - Instead of caching everything, keep track which messages are requested and load only most used messages.



Sidebar Cache Edit



Parser Cache Edit

  • $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.
  • $wgRenderHashAppend - Append a configured value to the parser cache and the sitenotice cache keys.



Memcached settings Edit

Settings for configuring the Memcached memory-based object store (if you are using it) docs/memcached.txt has more details.

  • $wgMemCachedDebug - Will be set to false in Setup.php, if the server isn't working.



Interwiki Edit

  • $wgDisableHardRedirects - Disable redirects to special pages and interwiki redirects, which use a 302 and have no "redirected from" link.
  • $wgImportSources - List of interwiki prefixes for wikis we'll accept as sources for Special:Import (for sysops).
  • $wgRedirectSources - Regular expression to restrict URLs which will be displayed as 'redirected from' links.



Interwiki cache Edit

See interwiki cache for more information.

  • $wgInterwikiScopes - Used by getInterwikiCache() to retreive from interwiki database file.



Access Edit

Wiki locking, blocking/banning, and some other related settings.



  • $wgActions - Array of allowed values for the "action" parameter for normal pages.
  • $wgAutopromote - Conditions of automatic promotion of user to specific groups.
  • $wgAutopromoteOnce - Automatically add a usergroup to any user who matches certain conditions.
  • $wgSpamRegex - A regular expression pattern which stops a page from being saved.



See Manual:Preventing access for more methods and settings concerning access. See also Manual:User rights management for more information about $wgGroupPermissions, $wgAddGroups, $wgRemoveGroups, etc.



See User Access for User Access settings.



Rate limiter Edit

  • $wgRateLimits - Simple rate limiter options to brake edit floods.



API Edit

  • $wgEnableAPI - Enable direct access to the data API through api.php.
  • $wgEnableWriteAPI - Allow the API to be used to perform write operations (page edits, rollback, etc.) when an authorised user accesses it.
  • $wgCrossSiteAJAXdomainExceptions - Domains that should not be allowed to make AJAX requests, even if they match one of the domains allowed by $wgCrossSiteAJAXdomains



Wiki locking Edit

  • $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.



Reduction Edit

  • $wgAPIMaxDBRows - Maximum number of rows to scan in a DB query in the API.
  • $wgDisableSearchContext - Setting this 'false' enables display of additional information on specific date/page revisions in search results.  Requires Extension:LuceneSearch
  • $wgDisableSearchUpdate - If you've disabled search semi-permanently, this also disables updates to the table.
  • $wgEdititis - Display user edit counts in various prominent places.
  • $wgMiserMode - If true, disable database-intensive features
  • $wgShowHostnames - If set to true, exposes host names through API and HTML comments.



Uploads Edit

Uploads have to be specially set up to be secure.



  • $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.
  • $wgImgAuthDetails - Display reason access to uploaded file was denied to users(img_auth only)
  • $wgUploadBaseUrl - The base URL for uploaded images if shared upload directory isn't to be used



Shared uploads Edit

These settings are kept for backward compatibility, see $wgForeignFileRepos for the new setting, or $wgUseInstantCommons if you only need read access to images on Commons.

  • $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).



MIME types Edit

  • $wgJsMimeType - Media type (MIME type) to use for JavaScript scripts.
Warning Warning: This is not a configuration setting, but a global state variable. It should be used solely by thumb.php!
  • $wgVerifyMimeType - Determines if the mime type of uploaded files should be checked
  • $wgXMLMimeTypes - An array of XML mime types we can detect via MimeMagic.



See also Manual:Mime type detection



Images Edit

  • $wgIgnoreImageErrors - If true, inline scaled images will still produce <img> tags ready for output instead of showing an error message.
  • $wgImageLimits - Limit images on image description pages to a user-selectable limit.
  • $wgMaxImageArea - Don't thumbnail an image if it will use too much working memory.
  • $wgUseImageResize - Set $wgUseImageResize to true if you want to enable dynamic server side image resizing (Thumbnails)



See also Manual:Configuring file uploads



DjVuEdit

  • $wgDjvuTxt - Path of the djvutxt DJVU text extraction utility.



EXIFEdit

  • $wgShowEXIF - Determines whether EXIF metadata is to be displayed. Set to false for not showing data.
  • $wgUpdateCompatibleMetadata - Whether to automatically update the img_metadata field if the metadata field is outdated but compatible with the current version.



ImageMagickEdit

  • $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.



SVGEdit

  • $wgAllowTitlesInSVG - If true, <title> will be allowed in files with an "image/svg" MIME type.
  • $wgSVGMaxSize - Don't scale a SVG larger than this unless its native size is larger.



Thumbnail settingsEdit

  • $wgMaxAnimatedGifArea - Force thumbnailing of animated GIFs above this size to a single frame instead of an animated thumbnail.
  • $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.
  • $wgThumbUpright - Adjust width of upright images when parameter 'upright' is used.



Antivirus Edit

  • $wgAntivirusRequired - Determines if a failed virus scan (AV_SCAN_FAILED) will cause the file to be rejected.



Parser Edit

  • $wgMaxGeneratedPPNodeCount - A complexity limit on template expansion: the maximum number of nodes generated by Preprocessor::preprocessToObj()
  • $wgMaxPPNodeCount - A complexity limit on template expansion: the maximum number of nodes visited by PPFrame::expand()



HTML Edit

  • $wgRawHtml - Allow raw, unchecked HTML in <html>...</html> sections. 



TeX Edit

In MediaWiki 1.18 and later, these settings are used for the Math extension.



  • $wgMathCheckFiles - Check whether directory and file exist when generating math images.
  • $wgMathDirectory - The file system path of the directory containing LaTeX math images.
  • $wgMathPath - The URL base of the directory containing LaTeX math images.
  • $wgTexvc - Location of the texvc binary.
  • $wgUseTeX - Enables the use of <math> (TeX) tags (MediaWiki 1.17 and earlier only -- on 1.18 simply enable the Math extension)



See Math extension for further information.



Tidy Edit

Tidy is an open source tool that cleans up broken HTML. You can use this to ensure that broken HTML in articles doesn't affect the layout of your wiki. 



  • $wgDebugTidy - Put tidy warnings in HTML comments, only works for internal 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.
  • $wgValidateAllHtml - Validate the overall output using tidy and refuse to display the page if it's not valid.



See also Manual:Build Tidy from source.



Special pages Edit

  • $wgExportMaxHistory - Special:Export requests for history of pages with more revisions than this will be rejected.
  • $wgFilterLogTypes - Show/hide links on Special:Log will be shown for these log types
  • $wgLogActions - Lists the message key string for formatting individual events of each type and action when listed in the logs.
  • $wgLogHeaders - Lists the message key string for descriptive text to be shown at the op of each log type.
  • $wgLogNames - Lists the message key string for each log type.
  • $wgSecureLogin - Whether to let user authenticate using https when they come from http.
  • $wgSpecialPageGroups - List of special pages, followed by what subtitle they should go under at Special:SpecialPages



Recent changes Edit

See also Help:Recent changes and Manual:$wgDefaultUserOptions



  • $wgPutIPinRC - Log IP addresses in the recentchanges table.
  • $wgRCFilterByAge - Filter $wgRCLinkDays to avoid showing links for values higher than $wgRCMaxAge.
  • $wgRCMaxAge - Recentchanges items are periodically purged; entries older than this many seconds will go.
  • $wgShowUpdatedMarker - Show "Updated (since my last visit)" marker in RC view, watchlist and history.



UDP updates Edit

Send RC updates via UDP. See: Manual:Simple IRC RC Bot



  • $wgRCFeeds - Feed formatting and destination configuration



Users Edit

  • $wgActiveUserDays - The number of days a person must be idle before he is considered inactive
  • $wgAutoConfirmAge - Number of seconds an account is required to age before it's given the implicit 'autoconfirm' group membership.
  • $wgAutoConfirmCount - Number of edits an account requires before it's given the implicit 'autoconfirm' group membership.
  • $wgDefaultUserOptions - Settings added to this array will override the default settings for the user preferences used by anonymous visitors and newly created accounts.



Authentication Edit

  • $wgAllowPrefChange - Policies for how each preference is allowed to be changed, in the presence of external authentication.



User Access Edit

  • $wgGroupsAddToSelf - allow users to add themselves from specified groups via Special:Userrights



User agent Edit



Cookies Edit

  • $wgCookieHttpOnly - Set authentication cookies to httpOnly to prevent stealing by JS, in browsers that support this feature.
  • $wgCookiePath - Explicitly declared "path" for cookies at the cookie domain.



Feed Edit

  • $wgFeed - Toggle syndication feeds on and off.
  • $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.



Copyright Edit

  • $wgMaxCredits - Set this to the number of authors that you want to be credited below an article text.



Search Edit

  • $wgVectorUseSimpleSearch - For Vector skin only. Set true to use one icon search button. Set false to use separate Go & Search buttons.
  • $wgGoToEdit - Go button goes straight to the edit screen if the article doesn't exist.
  • $wgSearchForwardUrl - Set this to a URL to forward search requests to some external location.
  • $wgCountTotalSearchHits - Whether have the default search engine count total search matches to present in the Special:Search UI.



Jobs Edit

  • $wgJobRunRate - Speed of the background task job queue (e.g. update of links).



Proxies Edit

  • $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 Edit

These settings configure MediaWiki when using a caching HTTP proxy server. They apply to caching using Varnish as well as Squid.

  • $wgSquidServers - A list of proxy servers (ips if possible) to purge on changes.
  • $wgUseESI - If you run Squid3 with ESI support, enable this.
  • $wgUseSquid - Enable/disable support for a caching HTTP proxy.
  • $wgUseXVO - Send X-Vary-Options header for better caching (requires patched Squid).
  • $wgVaryOnXFP - Whether to add X-Forwarded-Proto to the Vary and X-Vary-Options headers for API requests and RSS/Atom feeds.



HTCP multicast purging Edit



Extensions Edit

  • $wgAvailableRights - A list of available rights, in addition to the ones defined by the core.
  • $wgExternalStores - External stores allow including content from non database sources following URL links.



Maintenance Scripts setting Edit

  • $wgCommandLineMode - Indicates whether MediaWiki is running in command-line mode. Should never be set manually!
  • $wgDBtestuser - Database username that has permission to create and drop the test databases only.



Miscellaneous settings Edit

  • $wgAllUnicodeFixes - Whether to always convert certain Unicode sequences to modern ones regardless of the content language.
  • $wgCompiledFiles - A list of files that should be compiled into a HipHop build, in addition to those listed in $wgAutoloadClasses.
  • $wgMaxShellMemory - Maximum amount of virtual memory available to shell processes under Linux, in KB.
  • $wgMaxShellTime - Maximum CPU time in seconds for shell processes under linux.
  • $wgMemoryLimit - The minimum amount of memory that MediaWiki "needs"; MediaWiki will try to raise PHP's memory limit if it's below this amount.
  • $wgUseTagFilter - Allow filtering by change tag in recentchanges, history, etc.




Language: English


 

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.