Open main menu

MediaWiki β

Manual:Configuration settings

Language:Project:Language policy English  • dansk • Deutsch • español • français • Bahasa Indonesia • 日本語 • 한국어 • polski • português do Brasil • русский • 中文

This is an index of all supported configuration settings based on the DefaultSettings.php file.

Never edit DefaultSettings.php; copy appropriate lines to LocalSettings.php instead and amend them as appropriate.

If you can't find a configuration setting here, see if it is defined in DefaultSettings.php. The variable should have some documentation there.

Settings removed in versions of MediaWiki prior to 1.19 are no longer listed here. Please use the search box to find the relevant manual page (e.g. Manual:$wgAllowAnonymousMinor).
Listed alphabetically | Listed by function | Category:MediaWiki configuration settings

General Settings

  • $wgCanonicalServer – Canonical URL of the server, to use in IRC feeds, notification e-mails, etc.
  • $wgServer – The base URL of the server.
  • $wgServerName – The name of the server without the protocol.
  • $wgSitename – The name of the site.
  • $wgVersion – MediaWiki version number. You should not change this!


See also Uploads for file/image upload path settings.

See also Skins for skins path settings.

Global Objects

Email settings

See also User Access: $wgEmailConfirmToEdit

Email notification (Enotif) settings

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

Database settings

LoadBalancer settings





  • $wgDBmwschema – Schema that Postgres stores the MediaWiki tables in.


Shared DB settings

Compressed Storage Support

  • $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.
  • $wgDisableOutputCompression – Disable output compression (compression is enabled by default if zlib is available).


Timezone settings


  • $wgAmericanDates – Enable for English module to print dates as eg 'May 12' instead of '12 May'.
  • $wgTranslateNumerals – For Hindi and Arabic use local numerals instead of Western style (0-9) numerals in interface.


See also: Manual:How to debug


  • $wgDebugFunctionEntry (removed in 1.25) – Output debug message on every wfProfileIn/wfProfileOut
  • $wgDebugProfiling (removed in 1.23) – Detects non-matching wfProfileIn/wfProfileOut calls
  • $wgProfiler – Used to configure profiling of your MediaWiki installation.
  • $wgProfileCallTree (removed in 1.27) – If true, print a raw call tree instead of per-function report
  • $wgProfileLimit (deprecated in 1.25) – Only record profiling info for pages that took longer than this
  • $wgProfileOnly (deprecated in 1.23) – Don't put non-profiling info into log file
  • $wgProfilePerHost (removed in 1.27) – Should application server host be put into profiling table?
  • $wgProfileToDatabase (removed in 1.23) – Log sums from profiling into profiling table in db.
  • $wgUDPProfilerHost (removed in 1.27) – Host for UDP profiler.
  • $wgUDPProfilerPort (removed in 1.27) – Port for UDP profiler.

Site customization



Resource loader

See ResourceLoader for more information.



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

  • $wgDocType (removed in 1.22) – The doc type to use in the <!DOCTYPE !> declaration.
  • $wgDTD (removed in 1.22) – Specifies the DTD in the DOCTYPE declaration for page output.
  • $wgXhtmlDefaultNamespace (removed in 1.22) – Default XHTML namespace

Robot policies

Mobile support

Site Statistics




See: Interwiki for Interwiki cache settings.

Client side caching

File Cache

Settings for Server side file caching.

  • $wgFileCacheDepth – Depth of the subdirectory hierarchy to be created under $wgFileCacheDirectory.
  • $wgFileCacheDirectory – Directory where the cached page will be saved when using server-side caching.
  • $wgUseFileCache – This will cache static pages for non-logged-in users to reduce database traffic on public sites.

Message Cache

Sidebar Cache

Parser Cache

  • $wgEnableParserCache (deprecated in 1.26) – 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.
  • $wgParserCacheExpireTime – Expiration time (in seconds) of cached parser information
  • $wgParserCacheType – Parser cache setting.

Memcached settings

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


Interwiki cache

See interwiki cache for more information.


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

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

See User Access for User Access settings.

Rate limiter


Wiki locking

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



Uploads have to be specially set up to be secure.

Shared uploads

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

MIME types

  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
  • $wgMimeTypeBlacklist – Files with these mime types will never be allowed as uploads if $wgVerifyMimeType is enabled.
  • $wgXMLMimeTypes – An array of XML mime types we can detect via MimeMagic.

See also: Manual:Mime type detection


See also: Manual:Configuring file uploads



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


Set $wgUseImageMagick to true to use ImageMagick instead of the builtin functions.


Thumbnail settings




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


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. While Tidy itself is going to be replaced, the configuration settings can still be used for the replacements.

  • $wgTidyConfig – Configuration of the HTML postprocessing tool to use for fixing invalid HTML code.
  • $wgAlwaysUseTidy (deprecated in 1.26)
  • $wgDebugTidy – Put tidy warnings in HTML comments, only works for internal tidy.
  • $wgTidyBin (deprecated in 1.26) – Should be set to the path of the tidy binary.
  • $wgTidyConf (deprecated in 1.26) – Should be set to the path of the tidy configuration file.
  • $wgTidyInternal (deprecated in 1.20)- Controls the use of the PECL extension to use an inprocess tidy library instead of spawning a separate program.
  • $wgTidyOpts (deprecated in 1.26) – Options passed to tidy on the command line.
  • $wgUseTidy (deprecated in 1.26) – 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

Recent changes

See also Help:Recent changes and $wgDefaultUserOptions

UDP updates

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



User Access

User agent



  • $wgFeed – Toggle syndication feeds on and off.
  • $wgAdvertisedFeedTypes – Which feed types should be provided by default.
  • $wgFeedCacheTimeout – 'Minimum' timeout for cached Recentchanges feed, in seconds.
  • $wgFeedClasses – Available feeds objects.
  • $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.
  • $wgOverrideSiteFeed – Override the site's default rss/atom feed that appears on every page.






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

  • $wgInternalServer – Internal server name as known to Squid, if different.
  • $wgMaxSquidPurgeTitles (removed in 1.27) – Maximum number of titles to purge in any one client operation
  • $wgSquidPurgeUseHostHeader – Whether to use a Host header in purge requests sent to the proxy servers configured in $wgSquidServers.
  • $wgSquidMaxage – Cache timeout for the HTTP proxy.
  • $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 support for a caching HTTP proxy.
  • $wgUseXVO (removed in 1.27) – 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


Maintenance Scripts setting

Miscellaneous settings

  • $wgAjaxEditStash – Whether edits should be prepared via AJAX as users type edit summaries.
  • $wgAllUnicodeFixes – Whether to always convert certain Unicode sequences to modern ones regardless of the content language.
  • $wgAntiLockFlags (removed in 1.25) – Anti-lock flags.
  • $wgCompiledFiles (removed in 1.24) – A list of files that should be compiled into a HipHop build, in addition to those listed in $wgAutoloadClasses.
  • $wgGitRepositoryViewers – Map GIT revision numbers and repository URLs to their respective gitweb URLs in Special:Version
  • $wgGitBin – Path to the git binary.
  • $wgExternalDiffEngine – Use external C++ diff engine (module wikidiff from the extensions package).
  • $wgFixArabicUnicode – Set this to true to clean up archaic Unicode sequences in Arabic text.
  • $wgFixMalayalamUnicode – Set this to true to clean up archaic Unicode sequences in Malayalam text (Default true if $wgLanguageCode = "ml").
  • $wgLegacySchemaConversion (deprecated) – Option to speed up the conversion step for large sites when migrating the schema from 1.4 to 1.5.
  • $wgMaxShellFileSize – Maximum file size created by shell processes under Linux, in KB.
  • $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.
  • $wgPingback – Controls if MediaWiki should report back data about its installation from time to time to aid developers.
  • $wgPoolCounterConf – Configuration for processing pool control.
  • $wgShellLocale – Locale for LC_CTYPE.
  • $wgUseAutomaticEditSummaries – Whether MediaWiki should make automatic edit summaries.
  • $wgUseTagFilter – Allow filtering by change tag in recentchanges, history, etc.
  • $wgUseTrackbacks (removed in 1.19) – Whether to use trackbacks.

See also