MediaWiki  1.27.3
DefaultSettings.php File Reference

Default values for MediaWiki configuration settings. More...

Go to the source code of this file.

Variables

bool $wgAssumeProxiesUseDefaultProtocolPorts = true
 When the wiki is running behind a proxy and this is set to true, assumes that the proxy exposes the wiki on the standard ports (443 for https and 80 for http). More...
 
 $wgCanonicalServer = false
 Canonical URL of the server, to use in IRC feeds and notification e-mails. More...
 
 $wgCapitalLinkOverrides = []
 
 $wgCapitalLinks = true
 Set this to false to avoid forcing the first letter of links to capitals. More...
 
 $wgConf = new SiteConfiguration
 wgConf hold the site configuration. More...
 
 $wgConfigRegistry
 Registry of factory functions to create config objects: The 'main' key must be set, and the value should be a valid callable. More...
 
 $wgContentNamespaces = [ NS_MAIN ]
 Array of namespaces which can be deemed to contain valid "content", as far as the site statistics are concerned. More...
 
 $wgNamespacesWithSubpages
 Which namespaces should support subpages? See Language.php for a list of namespaces. More...
 
 $wgRedirectSources = false
 If local interwikis are set up which allow redirects, set this regexp to restrict URLs which will be displayed as 'redirected from' links. More...
 
 $wgServer = WebRequest::detectServer()
 URL of the server. More...
 
 $wgServerName = false
 Server name. More...
 
 $wgSitename = 'MediaWiki'
 Name of the site. More...
 
 $wgTrackingCategories = []
 Array holding default tracking category names. More...
 
 $wgVersion = '1.27.3'
 MediaWiki version number. More...
 
 NS_USER
 
Script path settings
 $wgScriptPath = '/wiki'
 The path we should point to. More...
 
 $wgUsePathInfo
 Whether to support URLs like index.php/Page_title These often break when PHP is set up in CGI mode. More...
 
 $wgScriptExtension = '.php'
 The extension to append to script names by default. More...
 
URLs and file paths

These various web and file path variables are set to their defaults in Setup.php if they are not explicitly set from LocalSettings.php.

These will relatively rarely need to be set manually, unless you are splitting style sheets or images outside the main document root.

In this section, a "path" is usually a host-relative URL, i.e. a URL without the host part, that starts with a slash. In most cases a full URL is also acceptable. A "directory" is a local file path.

In both paths and directories, trailing slashes should not be included.

 $wgScript = false
 The URL path to index.php. More...
 
 $wgLoadScript = false
 The URL path to load.php. More...
 
 $wgStylePath = false
 The URL path of the skins directory. More...
 
 $wgStyleSheetPath = &$wgStylePath
 The URL path to index.php. More...
 
 $wgLocalStylePath = false
 The URL path of the skins directory. More...
 
 $wgExtensionAssetsPath = false
 The URL path of the extensions directory. More...
 
 $wgExtensionDirectory = "{$IP}/extensions"
 Filesystem extensions directory. More...
 
 $wgStyleDirectory = "{$IP}/skins"
 Filesystem stylesheets directory. More...
 
 $wgArticlePath = false
 The URL path for primary article page views. More...
 
 $wgUploadPath = false
 The URL path for the images directory. More...
 
 $wgUploadDirectory = false
 The filesystem path of the images directory. More...
 
 $wgFileCacheDirectory = false
 Directory where the cached page will be saved. More...
 
 $wgLogo = false
 The URL path of the wiki logo. More...
 
 $wgLogoHD = false
 Array with URL paths to HD versions of the wiki logo. More...
 
 $wgFavicon = '/favicon.ico'
 The URL path of the shortcut icon. More...
 
 $wgAppleTouchIcon = false
 The URL path of the icon for iPhone and iPod Touch web app bookmarks. More...
 
 $wgReferrerPolicy = false
 Value for the referrer policy meta tag. More...
 
 $wgTmpDirectory = false
 The local filesystem path to a temporary directory. More...
 
 $wgUploadBaseUrl = ''
 If set, this URL is added to the start of $wgUploadPath to form a complete upload URL. More...
 
 $wgUploadStashScalerBaseUrl = false
 To enable remote on-demand scaling, set this to the thumbnail base URL. More...
 
 $wgActionPaths = []
 To set 'pretty' URL paths for actions other than plain page views, add to this array. More...
 
Files and file uploads
 $wgEnableUploads = false
 Uploads have to be specially set up to be secure. More...
 
 $wgUploadStashMaxAge = 6 * 3600
 The maximum age of temporary (incomplete) uploaded files. More...
 
 $wgAllowImageMoving = true
 Allows to move images and other media files. More...
 
 $wgEnableAsyncUploads = false
 Enable deferred upload tasks that use the job queue. More...
 
 $wgIllegalFileChars = ":"
 These are additional characters that should be replaced with '-' in filenames. More...
 
 $wgDeletedDirectory = false
 What directory to place deleted uploads in. More...
 
 $wgImgAuthDetails = false
 Set this to true if you use img_auth and want the user to see details on why access failed. More...
 
 $wgImgAuthUrlPathMap = []
 Map of relative URL directories to match to internal mwstore:// base storage paths. More...
 
 $wgLocalFileRepo = false
 File repository structures. More...
 
 $wgForeignFileRepos = []
 
 $wgUseInstantCommons = false
 Use Commons as a remote file repository. More...
 
 $wgForeignUploadTargets = []
 Array of foreign file repo names (set in $wgForeignFileRepos above) that are allowable upload targets. More...
 
 $wgUploadDialog
 Configuration for file uploads using the embeddable upload dialog (https://www.mediawiki.org/wiki/Upload_dialog). More...
 
 $wgFileBackends = []
 File backend structure configuration. More...
 
 $wgLockManagers = []
 Array of configuration arrays for each lock manager. More...
 
 $wgShowEXIF = function_exists( 'exif_read_data' )
 Show Exif data, on by default if available. More...
 
 $wgUpdateCompatibleMetadata = false
 If to automatically update the img_metadata field if the metadata field is outdated but compatible with the current version. More...
 
 $wgUseSharedUploads = false
 If you operate multiple wikis, you can define a shared upload path here. More...
 
 $wgSharedUploadPath = "http://commons.wikimedia.org/shared/images"
 Full path on the web server where shared uploads can be found. More...
 
 $wgFetchCommonsDescriptions = false
 Fetch commons image description pages and display them on the local wiki? More...
 
 $wgSharedUploadDirectory = "/var/www/wiki3/images"
 Path on the file system where shared uploads can be found. More...
 
 $wgSharedUploadDBname = false
 DB name with metadata about shared directory. More...
 
 $wgSharedUploadDBprefix = ''
 Optional table prefix used in database. More...
 
 $wgCacheSharedUploads = true
 Cache shared metadata in memcached. More...
 
 $wgAllowCopyUploads = false
 Allow for upload to be copied from an URL. More...
 
 $wgCopyUploadsDomains = []
 A list of domains copy uploads can come from. More...
 
 $wgCopyUploadsFromSpecialUpload = false
 Enable copy uploads from Special:Upload. More...
 
 $wgCopyUploadProxy = false
 Proxy to use for copy upload requests. More...
 
 $wgCopyUploadTimeout = false
 Different timeout for upload by url This could be useful since when fetching large files, you may want a timeout longer than the default $wgHTTPTimeout. More...
 
 $wgMaxUploadSize = 1024 * 1024 * 100
 Max size for uploads, in bytes. More...
 
 $wgMinUploadChunkSize = 1024
 Minimum upload chunk size, in bytes. More...
 
 $wgUploadNavigationUrl = false
 Point the upload navigation link to an external URL Useful if you want to use a shared repository by default without disabling local uploads (use $wgEnableUploads = false for that). More...
 
 $wgUploadMissingFileUrl = false
 Point the upload link for missing files to an external URL, as with $wgUploadNavigationUrl. More...
 
 $wgThumbnailScriptPath = false
 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. More...
 
 $wgSharedThumbnailScriptPath = false
 
 $wgHashedUploadDirectory = true
 Set this to false if you do not want MediaWiki to divide your images directory into many subdirectories, for improved performance. More...
 
 $wgHashedSharedUploadDirectory = true
 Set the following 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. More...
 
 $wgRepositoryBaseUrl = "https://commons.wikimedia.org/wiki/File:"
 Base URL for a repository wiki. More...
 
 $wgFileExtensions = [ 'png', 'gif', 'jpg', 'jpeg', 'webp' ]
 This is the list of preferred extensions for uploading files. More...
 
 $wgFileBlacklist
 Files with these extensions will never be allowed as uploads. More...
 
 $wgMimeTypeBlacklist
 Files with these MIME types will never be allowed as uploads if $wgVerifyMimeType is enabled. More...
 
 $wgAllowJavaUploads = false
 Allow Java archive uploads. More...
 
 $wgCheckFileExtensions = true
 This is a flag to determine whether or not to check file extensions on upload. More...
 
 $wgStrictFileExtensions = true
 If this is turned off, users may override the warning for files not covered by $wgFileExtensions. More...
 
 $wgDisableUploadScriptChecks = false
 Setting this to true will disable the upload system's checks for HTML/JavaScript. More...
 
 $wgUploadSizeWarning = false
 Warn if uploaded files are larger than this (in bytes), or false to disable. More...
 
 $wgTrustedMediaFormats
 list of trusted media-types and MIME types. More...
 
 $wgMediaHandlers
 Plugins for media file type handling. More...
 
 $wgContentHandlers
 Plugins for page content model handling. More...
 
 CONTENT_MODEL_JAVASCRIPT
 Uploads have to be specially set up to be secure. More...
 
 $wgUseImageResize = true
 Whether to enable server-side image thumbnailing. More...
 
 $wgUseImageMagick = false
 Resizing can be done using PHP's internal image libraries or using ImageMagick or another third-party converter, e.g. More...
 
 $wgImageMagickConvertCommand = '/usr/bin/convert'
 The convert command shipped with ImageMagick. More...
 
 $wgMaxInterlacingAreas = []
 Array of max pixel areas for interlacing per MIME type. More...
 
 $wgSharpenParameter = '0x0.4'
 Sharpening parameter to ImageMagick. More...
 
 $wgSharpenReductionThreshold = 0.85
 Reduction in linear dimensions below which sharpening will be enabled. More...
 
 $wgImageMagickTempDir = false
 Temporary directory used for ImageMagick. More...
 
 $wgCustomConvertCommand = false
 Use another resizing converter, e.g. More...
 
 $wgJpegTran = '/usr/bin/jpegtran'
 used for lossless jpeg rotation More...
 
 $wgJpegPixelFormat = 'yuv420'
 At default setting of 'yuv420', JPEG thumbnails will use 4:2:0 chroma subsampling to reduce file size, at the cost of possible color fringing at sharp edges. More...
 
 $wgExiv2Command = '/usr/bin/exiv2'
 Some tests and extensions use exiv2 to manipulate the Exif metadata in some image formats. More...
 
 $wgExiftool = '/usr/bin/exiftool'
 Path to exiftool binary. More...
 
 $wgSVGConverters
 Scalable Vector Graphics (SVG) may be uploaded as images. More...
 
 $wgSVGConverter = 'ImageMagick'
 Pick a converter defined in $wgSVGConverters. More...
 
 $wgSVGConverterPath = ''
 If not in the executable PATH, specify the SVG converter path. More...
 
 $wgSVGMaxSize = 5120
 Don't scale a SVG larger than this. More...
 
 $wgSVGMetadataCutoff = 262144
 Don't read SVG metadata beyond this point. More...
 
 $wgAllowTitlesInSVG = false
 Disallow <title> element in SVG files. More...
 
 $wgMaxImageArea = 1.25e7
 The maximum number of pixels a source image can have if it is to be scaled down by a scaler that requires the full source image to be decompressed and stored in decompressed form, before the thumbnail is generated. More...
 
 $wgMaxAnimatedGifArea = 1.25e7
 Force thumbnailing of animated GIFs above this size to a single frame instead of an animated thumbnail. More...
 
 $wgTiffThumbnailType = false
 Browsers don't support TIFF inline generally... More...
 
 $wgThumbnailEpoch = '20030516000000'
 If rendered thumbnail files are older than this timestamp, they will be rerendered on demand as if the file didn't already exist. More...
 
 $wgAttemptFailureEpoch = 1
 Certain operations are avoided if there were too many recent failures, for example, thumbnail generation. More...
 
 $wgIgnoreImageErrors = false
 If set, inline scaled images will still produce "<img>" tags ready for output instead of showing an error message. More...
 
 $wgGenerateThumbnailOnParse = true
 Allow thumbnail rendering on page view. More...
 
 $wgShowArchiveThumbnails = true
 Show thumbnails for old images on the image description page. More...
 
 $wgEnableAutoRotation = null
 If set to true, images that contain certain the exif orientation tag will be rotated accordingly. More...
 
 $wgAntivirus = null
 Internal name of virus scanner. More...
 
 $wgAntivirusSetup
 Configuration for different virus scanners. More...
 
 $wgAntivirusRequired = true
 Determines if a failed virus scan (AV_SCAN_FAILED) will cause the file to be rejected. More...
 
 $wgVerifyMimeType = true
 Determines if the MIME type of uploaded files should be checked. More...
 
 $wgMimeTypeFile = 'includes/mime.types'
 Sets the MIME type definition file to use by MimeMagic.php. More...
 
 $wgMimeInfoFile = 'includes/mime.info'
 Sets the MIME type info file to use by MimeMagic.php. More...
 
 $wgMimeDetectorCommand = null
 Sets an external MIME detector program. More...
 
 $wgTrivialMimeDetection = false
 Switch for trivial MIME detection. More...
 
 $wgXMLMimeTypes
 Additional XML types we can allow via MIME-detection. More...
 
 $wgImageLimits
 Limit images on image description pages to a user-selectable limit. More...
 
 $wgThumbLimits
 Adjust thumbnails on image pages according to a user setting. More...
 
 $wgThumbnailBuckets = null
 When defined, is an array of image widths used as buckets for thumbnail generation. More...
 
 $wgThumbnailMinimumBucketDistance = 50
 When using thumbnail buckets as defined above, this sets the minimum distance to the bucket above the requested size. More...
 
 $wgUploadThumbnailRenderMap = []
 When defined, is an array of thumbnail widths to be rendered at upload time. More...
 
 $wgUploadThumbnailRenderMethod = 'jobqueue'
 The method through which the thumbnails will be prerendered for the entries in $wgUploadThumbnailRenderMap. More...
 
 $wgUploadThumbnailRenderHttpCustomHost = false
 When using the "http" wgUploadThumbnailRenderMethod, lets one specify a custom Host HTTP header. More...
 
 $wgUploadThumbnailRenderHttpCustomDomain = false
 When using the "http" wgUploadThumbnailRenderMethod, lets one specify a custom domain to send the HTTP request to. More...
 
 $wgUseTinyRGBForJPGThumbnails = false
 When this variable is true and JPGs use the sRGB ICC profile, swaps it for the more lightweight (and free) TinyRGB profile when generating thumbnails. More...
 
 $wgGalleryOptions
 Default parameters for the "<gallery>" tag. More...
 
 $wgThumbUpright = 0.75
 Adjust width of upright images when parameter 'upright' is used This allows a nicer look for upright images without the need to fix the width by hardcoded px in wiki sourcecode. More...
 
 $wgDirectoryMode = 0777
 Default value for chmoding of new directories. More...
 
 $wgResponsiveImages = true
 Generate and use thumbnails suitable for screens with 1.5 and 2.0 pixel densities. More...
 
DJVU settings
 $wgDjvuDump = null
 Path of the djvudump executable Enable this and $wgDjvuRenderer to enable djvu rendering example: $wgDjvuDump = 'djvudump';. More...
 
 $wgDjvuRenderer = null
 Path of the ddjvu DJVU renderer Enable this and $wgDjvuDump to enable djvu rendering example: $wgDjvuRenderer = 'ddjvu';. More...
 
 $wgDjvuTxt = null
 Path of the djvutxt DJVU text extraction utility Enable this and $wgDjvuDump to enable text layer extraction from djvu files example: $wgDjvuTxt = 'djvutxt';. More...
 
 $wgDjvuToXML = null
 Path of the djvutoxml executable This works like djvudump except much, much slower as of version 3.5. More...
 
 $wgDjvuPostProcessor = 'pnmtojpeg'
 Shell command for the DJVU post processor Default: pnmtojpeg, since ddjvu generates ppm output Set this to false to output the ppm file directly. More...
 
 $wgDjvuOutputExtension = 'jpg'
 File extension for the DJVU post processor output. More...
 
Email settings
 $wgEmergencyContact = false
 Site admin email address. More...
 
 $wgPasswordSender = false
 Sender email address for e-mail notifications. More...
 
 $wgPasswordSenderName = 'MediaWiki Mail'
 Sender name for e-mail notifications. More...
 
 $wgNoReplyAddress = false
 Reply-To address for e-mail notifications. More...
 
 $wgEnableEmail = true
 Set to true to enable the e-mail basic features: Password reminders, etc. More...
 
 $wgEnableUserEmail = true
 Set to true to enable user-to-user e-mail. More...
 
 $wgUserEmailUseReplyTo = false
 Set to true to put the sending user's email in a Reply-To header instead of From. More...
 
 $wgPasswordReminderResendTime = 24
 Minimum time, in hours, which must elapse between password reminder emails for a given account. More...
 
 $wgNewPasswordExpiry = 3600 * 24 * 7
 The time, in seconds, when an emailed temporary password expires. More...
 
 $wgUserEmailConfirmationTokenExpiry = 7 * 24 * 60 * 60
 The time, in seconds, when an email confirmation email expires. More...
 
 $wgPasswordExpirationDays = false
 The number of days that a user's password is good for. More...
 
 $wgPasswordExpireGrace = 3600 * 24 * 7
 If a user's password is expired, the number of seconds when they can still login, and cancel their password change, but are sent to the password change form on each login. More...
 
 $wgSMTP = false
 SMTP Mode. More...
 
 $wgAdditionalMailParams = null
 Additional email parameters, will be passed as the last argument to mail() call. More...
 
 $wgAllowHTMLEmail = false
 For parts of the system that have been updated to provide HTML email content, send both text and HTML parts as the body of the email. More...
 
 $wgEnotifFromEditor = false
 True: from page editor if s/he opted-in. More...
 
 $wgEmailAuthentication = true
 Require email authentication before sending mail to an email address. More...
 
 $wgEnotifWatchlist = false
 Allow users to enable email notification ("enotif") on watchlist changes. More...
 
 $wgEnotifUserTalk = false
 Allow users to enable email notification ("enotif") when someone edits their user talk page. More...
 
 $wgEnotifRevealEditorAddress = false
 Set the Reply-to address in notifications to the editor's address, if user allowed this in the preferences. More...
 
 $wgEnotifMinorEdits = true
 Send notification mails on minor edits to watchlist pages. More...
 
 $wgEnotifImpersonal = false
 Send a generic mail instead of a personalised mail for each user. More...
 
 $wgEnotifMaxRecips = 500
 Maximum number of users to mail at once when using impersonal mail. More...
 
 $wgEnotifUseRealName = false
 Use real name instead of username in e-mail "from" field. More...
 
 $wgUsersNotifiedOnAllChanges = []
 Array of usernames who will be sent a notification email for every change which occurs on a wiki. More...
 
Database settings
 $wgDBserver = 'localhost'
 Database host name or IP address. More...
 
 $wgDBport = 5432
 Database port number (for PostgreSQL and Microsoft SQL Server). More...
 
 $wgDBname = 'my_wiki'
 Name of the database. More...
 
 $wgDBuser = 'wikiuser'
 Database username. More...
 
 $wgDBpassword = ''
 Database user's password. More...
 
 $wgDBtype = 'mysql'
 Database type. More...
 
 $wgDBssl = false
 Whether to use SSL in DB connection. More...
 
 $wgDBcompress = false
 Whether to use compression in DB connection. More...
 
 $wgDBadminuser = null
 Separate username for maintenance tasks. More...
 
 $wgDBadminpassword = null
 Separate password for maintenance tasks. More...
 
 $wgSearchType = null
 Search type. More...
 
 $wgSearchTypeAlternatives = null
 Alternative search types Sometimes you want to support multiple search engines for testing. More...
 
 $wgDBprefix = ''
 Table name prefix. More...
 
 $wgDBTableOptions = 'ENGINE=InnoDB'
 MySQL table options to use during installation or update. More...
 
 $wgSQLMode = ''
 SQL Mode - default is turning off all modes, including strict, if set. More...
 
 $wgDBmwschema = null
 Mediawiki schema. More...
 
 $wgSQLiteDataDir = ''
 To override default SQLite data directory ($docroot/../data) More...
 
 $wgAllDBsAreLocalhost = false
 Make all database connections secretly go to localhost. More...
 
 $wgSharedDB = null
 Shared database for multiple wikis. More...
 
 $wgSharedPrefix = false
 
 $wgSharedTables = [ 'user', 'user_properties' ]
 
 $wgSharedSchema = false
 
 $wgDBservers = false
 Database load balancer This is a two-dimensional array, an array of server info structures Fields are: More...
 
 $wgLBFactoryConf = [ 'class' => 'LBFactorySimple' ]
 Load balancer factory configuration To set up a multi-master wiki farm, set the class here to something that can return a LoadBalancer with an appropriate master on a call to getMainLB(). More...
 
 $wgDataCenterUpdateStickTTL = 10
 After a state-changing request is done by a client, this determines how many seconds that client should keep using the master datacenter. More...
 
 $wgDBerrorLog = false
 File to log database errors to. More...
 
 $wgDBerrorLogTZ = false
 Timezone to use in the error log. More...
 
 $wgDBmysql5 = false
 Set to true to engage MySQL 4.1/5.0 charset-related features; for now will just cause sending of 'SET NAMES=utf8' on connect. More...
 
 $wgDBOracleDRCP = false
 Set true to enable Oracle DCRP (supported from 11gR1 onward) More...
 
 $wgLocalDatabases = []
 Other wikis on this site, can be administered from a single developer account. More...
 
 $wgSlaveLagWarning = 10
 If lag is higher than $wgSlaveLagWarning, show a warning in some special pages (like watchlist). More...
 
 $wgSlaveLagCritical = 30
 
 $wgDBWindowsAuthentication = false
 Use Windows Authentication instead of $wgDBuser / $wgDBpassword for MS SQL Server. More...
 
Text storage
 $wgCompressRevisions = false
 We can also compress text stored in the 'text' table. More...
 
 $wgExternalStores = []
 External stores allow including content from non database sources following URL links. More...
 
 $wgExternalServers = []
 An array of external MySQL servers. More...
 
array $wgDefaultExternalStore = false
 The place to put new revisions, false to put them in the local text table. More...
 
 $wgRevisionCacheExpiry = 0
 Revision text may be cached in $wgMemc to reduce load on external storage servers and object extraction overhead for frequently-loaded revisions. More...
 
Performance hacks and limits
 $wgMiserMode = false
 Disable database-intensive features. More...
 
 $wgDisableQueryPages = false
 Disable all query pages if miser mode is on, not just some. More...
 
 $wgQueryCacheLimit = 1000
 Number of rows to cache in 'querycache' table when miser mode is on. More...
 
 $wgWantedPagesThreshold = 1
 Number of links to a page required before it is deemed "wanted". More...
 
 $wgAllowSlowParserFunctions = false
 Enable slow parser functions. More...
 
 $wgAllowSchemaUpdates = true
 Allow schema updates. More...
 
 $wgMaxArticleSize = 2048
 Maximum article size in kilobytes. More...
 
 $wgMemoryLimit = "50M"
 The minimum amount of memory that MediaWiki "needs"; MediaWiki will try to raise PHP's memory limit if it's below this amount. More...
 
 $wgTransactionalTimeLimit = 120
 The minimum amount of time that MediaWiki needs for "slow" write request, particularly ones with multiple non-atomic writes that should be as transactional as possible; MediaWiki will call set_time_limit() if needed. More...
 
Cache settings
 $wgCacheDirectory = false
 Directory for caching data in the local filesystem. More...
 
 $wgMainCacheType = CACHE_NONE
 Main cache type. More...
 
 $wgMessageCacheType = CACHE_ANYTHING
 The cache type for storing the contents of the MediaWiki namespace. More...
 
 $wgParserCacheType = CACHE_ANYTHING
 The cache type for storing article HTML. More...
 
 $wgSessionCacheType = CACHE_ANYTHING
 The cache type for storing session data. More...
 
 $wgLanguageConverterCacheType = CACHE_ANYTHING
 The cache type for storing language conversion tables, which are used when parsing certain text and interface messages. More...
 
 $wgObjectCaches
 Advanced object cache configuration. More...
 
 $wgMainWANCache = false
 Main Wide-Area-Network cache type. More...
 
 $wgWANObjectCaches
 Advanced WAN object cache configuration. More...
 
 $wgMainStash = 'db-replicated'
 Main object stash type. More...
 
 $wgParserCacheExpireTime = 86400
 The expiry time for the parser cache, in seconds. More...
 
 $wgSessionsInMemcached = true
 Deprecated alias for $wgSessionsInObjectCache. More...
 
 $wgSessionsInObjectCache = true
 
 $wgObjectCacheSessionExpiry = 3600
 The expiry time to use for session storage, in seconds. More...
 
 $wgSessionHandler = null
 
string $wgPHPSessionHandling = 'enable'
 Whether to use PHP session handling ($_SESSION and session_*() functions) More...
 
 $wgMemCachedDebug = false
 If enabled, will send MemCached debugging information to $wgDebugLogFile. More...
 
 $wgMemCachedServers = [ '127.0.0.1:11211' ]
 The list of MemCached servers and port numbers. More...
 
 $wgMemCachedPersistent = false
 Use persistent connections to MemCached, which are shared across multiple requests. More...
 
 $wgMemCachedTimeout = 500000
 Read/write timeout for MemCached server communication, in microseconds. More...
 
 $wgUseLocalMessageCache = false
 Set this to true to maintain a copy of the message cache on the local server. More...
 
 $wgAdaptiveMessageCache = false
 Instead of caching everything, only cache those messages which have been customised in the site content language. More...
 
 $wgLocalisationCacheConf
 Localisation cache configuration. More...
 
 $wgCachePages = true
 Allow client-side caching of pages. More...
 
 $wgCacheEpoch = '20030516000000'
 Set this to current time to invalidate all prior cached pages. More...
 
 $wgGitInfoCacheDirectory = false
 Directory where GitInfo will look for pre-computed cache files. More...
 
 $wgStyleVersion = '303'
 Bump this number when changing the global style sheets and JavaScript. More...
 
 $wgUseFileCache = false
 This will cache static pages for non-logged-in users to reduce database traffic on public sites. More...
 
 $wgFileCacheDepth = 2
 Depth of the subdirectory hierarchy to be created under $wgFileCacheDirectory. More...
 
 $wgEnableParserCache = true
 Kept for extension compatibility; see $wgParserCacheType. More...
 
 $wgRenderHashAppend = ''
 Append a configured value to the parser cache and the sitenotice key so that they can be kept separate for some class of activity. More...
 
 $wgEnableSidebarCache = false
 If on, the sidebar navigation links are cached for users with the current language set. More...
 
 $wgSidebarCacheExpiry = 86400
 Expiry time for the sidebar cache, in seconds. More...
 
 $wgUseGzip = false
 When using the file cache, we can store the cached HTML gzipped to save disk space. More...
 
 $wgUseETag = false
 Whether MediaWiki should send an ETag header. More...
 
 $wgClockSkewFudge = 5
 Clock skew or the one-second resolution of time() can occasionally cause cache problems when the user requests two pages within a short period of time. More...
 
 $wgInvalidateCacheOnLocalSettingsChange = true
 Invalidate various caches when LocalSettings.php changes. More...
 
int bool $wgExtensionInfoMTime = false
 When loading extensions through the extension registration system, this can be used to invalidate the cache. More...
 
HTTP proxy (CDN) settings

Many of these settings apply to any HTTP proxy used in front of MediaWiki, although they are referred to as Squid settings for historical reasons.

Achieving a high hit ratio with an HTTP proxy requires special configuration. See https://www.mediawiki.org/wiki/Manual:Squid_caching for more details.

 $wgUseSquid = false
 Enable/disable CDN. More...
 
 $wgUseESI = false
 If you run Squid3 with ESI support, enable this (default:false): More...
 
 $wgUseKeyHeader = false
 Send the Key HTTP header for better caching. More...
 
 $wgVaryOnXFP = false
 Add X-Forwarded-Proto to the Vary and Key headers for API requests and RSS/Atom feeds. More...
 
 $wgInternalServer = false
 Internal server name as known to CDN, if different. More...
 
 $wgSquidMaxage = 18000
 Cache TTL for the CDN sent as s-maxage (without ESI) or Surrogate-Control (with ESI). More...
 
 $wgCdnMaxageLagged = 30
 Cache timeout for the CDN when DB slave lag is high. More...
 
 $wgCdnReboundPurgeDelay = 0
 If set, any SquidPurge call on a URL or URLs will send a second purge no less than this many seconds later via the job queue. More...
 
 $wgCdnMaxageSubstitute = 60
 Cache timeout for the CDN when a response is known to be wrong or incomplete (due to load) More...
 
 $wgForcedRawSMaxage = 300
 Default maximum age for raw CSS/JS accesses. More...
 
 $wgSquidServers = []
 List of proxy servers to purge on changes; default port is 80. More...
 
 $wgSquidServersNoPurge = []
 As above, except these servers aren't purged on page changes; use to set a list of trusted proxies, etc. More...
 
 $wgSquidPurgeUseHostHeader = true
 Whether to use a Host header in purge requests sent to the proxy servers configured in $wgSquidServers. More...
 
 $wgHTCPRouting = []
 Routing configuration for HTCP multicast purging. More...
 
 $wgHTCPMulticastTTL = 1
 HTCP multicast TTL. More...
 
 $wgUsePrivateIPs = false
 Should forwarded Private IPs be accepted? More...
 
Language, regional and character encoding settings
 $wgLanguageCode = 'en'
 Site language code. More...
 
 $wgLangObjCacheSize = 10
 Language cache size, or really how many languages can we handle simultaneously without degrading to crawl speed. More...
 
 $wgGrammarForms = []
 Some languages need different word forms, usually for different cases. More...
 
 $wgInterwikiMagic = true
 Treat language links as magic connectors, not inline links. More...
 
 $wgHideInterlanguageLinks = false
 Hide interlanguage links from the sidebar. More...
 
 $wgExtraInterlanguageLinkPrefixes = []
 List of additional interwiki prefixes that should be treated as interlanguage links (i.e. More...
 
 $wgExtraLanguageNames = []
 List of language names or overrides for default names in Names.php. More...
 
 $wgDummyLanguageCodes
 List of language codes that don't correspond to an actual language. More...
 
 $wgEditEncoding = ''
 Character set for use in the article edit box. More...
 
 $wgFixArabicUnicode = true
 Set this to true to replace Arabic presentation forms with their standard forms in the U+0600-U+06FF block. More...
 
 $wgFixMalayalamUnicode = true
 Set this to true to replace ZWJ-based chillu sequences in Malayalam text with their Unicode 5.1 equivalents. More...
 
 $wgAllUnicodeFixes = false
 Set this to always convert certain Unicode sequences to modern ones regardless of the content language. More...
 
 $wgLegacyEncoding = false
 Set this to eg 'ISO-8859-1' to perform character set conversion when loading old revisions not marked with "utf-8" flag. More...
 
 $wgBrowserBlackList
 Browser Blacklist for unicode non compliant browsers. More...
 
 $wgLegacySchemaConversion = false
 If set to true, the MediaWiki 1.4 to 1.5 schema conversion will create stub reference rows in the text table instead of copying the full text of all current entries from 'cur' to 'text'. More...
 
 $wgAmericanDates = false
 Enable dates like 'May 12' instead of '12 May', if the default date format is 'dmy or mdy'. More...
 
 $wgTranslateNumerals = true
 For Hindi and Arabic use local numerals instead of Western style (0-9) numerals in interface. More...
 
 $wgUseDatabaseMessages = true
 Translation using MediaWiki: namespace. More...
 
 $wgMsgCacheExpiry = 86400
 Expiry time for the message cache key. More...
 
 $wgMaxMsgCacheEntrySize = 10000
 Maximum entry size in the message cache, in bytes. More...
 
 $wgDisableLangConversion = false
 Whether to enable language variant conversion. More...
 
 $wgDisableTitleConversion = false
 Whether to enable language variant conversion for links. More...
 
 $wgDefaultLanguageVariant = false
 Default variant code, if false, the default will be the language code. More...
 
 $wgDisabledVariants = []
 Disabled variants array of language variant conversion. More...
 
 $wgVariantArticlePath = false
 Like $wgArticlePath, but on multi-variant wikis, this provides a path format that describes which parts of the URL contain the language variant. More...
 
 $wgLoginLanguageSelector = false
 Show a bar of language selection links in the user login and user registration forms; edit the "loginlanguagelinks" message to customise these. More...
 
 $wgForceUIMsgAsContentMsg = []
 When translating messages with wfMessage(), it is not always clear what should be considered UI messages and what should be content messages. More...
 
 $wgLocaltimezone = null
 Fake out the timezone that the server thinks it's in. More...
 
 $wgLocalTZoffset = null
 Set an offset from UTC in minutes to use for the default timezone setting for anonymous users and new user accounts. More...
 
Output format and skin settings
 $wgMimeType = 'text/html'
 The default Content-Type header. More...
 
 $wgJsMimeType = null
 Previously used as content type in HTML script tags. More...
 
 $wgXhtmlDefaultNamespace = null
 The default xmlns attribute. More...
 
 $wgHtml5 = true
 Previously used to determine if we should output an HTML5 doctype. More...
 
 $wgHtml5Version = null
 Defines the value of the version attribute in the <html> tag, if any. More...
 
 $wgHTMLFormAllowTableFormat = true
 Temporary variable that allows HTMLForms to be rendered as tables. More...
 
 $wgUseMediaWikiUIEverywhere = false
 Temporary variable that applies MediaWiki UI wherever it can be supported. More...
 
 $wgXhtmlNamespaces = []
 Permit other namespaces in addition to the w3.org default. More...
 
 $wgSiteNotice = ''
 Site notice shown at the top of each page. More...
 
 $wgSiteSupportPage = ''
 If this is set, a "donate" link will appear in the sidebar. More...
 
 $wgValidateAllHtml = false
 Validate the overall output using tidy and refuse to display the page if it's not valid. More...
 
 $wgDefaultSkin = 'vector'
 Default skin, for new users and anonymous visitors. More...
 
 $wgFallbackSkin = 'fallback'
 Fallback skin used when the skin defined by $wgDefaultSkin can't be found. More...
 
 $wgSkipSkins = []
 Specify the names of skins that should not be presented in the list of available skins in user preferences. More...
 
 $wgSkipSkin = ''
 
 $wgAllowUserJs = false
 Allow user Javascript page? This enables a lot of neat customizations, but may increase security risk to users and server load. More...
 
 $wgAllowUserCss = false
 Allow user Cascading Style Sheets (CSS)? This enables a lot of neat customizations, but may increase security risk to users and server load. More...
 
 $wgAllowUserCssPrefs = true
 Allow user-preferences implemented in CSS? This allows users to customise the site appearance to a greater degree; disabling it will improve page load times. More...
 
 $wgUseSiteJs = true
 Use the site's Javascript page? More...
 
 $wgUseSiteCss = true
 Use the site's Cascading Style Sheets (CSS)? More...
 
 $wgBreakFrames = false
 Break out of framesets. More...
 
 $wgEditPageFrameOptions = 'DENY'
 The X-Frame-Options header to send on pages sensitive to clickjacking attacks, such as edit pages. More...
 
 $wgApiFrameOptions = 'DENY'
 Disallow framing of API pages directly, by setting the X-Frame-Options header. More...
 
 $wgDisableOutputCompression = false
 Disable output compression (enabled by default if zlib is available) More...
 
 $wgExperimentalHtmlIds = false
 Should we allow a broader set of characters in id attributes, per HTML5? If not, use only HTML 4-compatible IDs. More...
 
 $wgFooterIcons
 Abstract list of footer icons for skins in place of old copyrightico and poweredbyico code You can add new icons to the built in copyright or poweredby, or you can create a new block. More...
 
 poweredby
 The default Content-Type header. More...
 
 $wgUseCombinedLoginLink = false
 Login / create account link behavior when it's possible for anonymous users to create an account. More...
 
 $wgEdititis = false
 Display user edit counts in various prominent places. More...
 
 $wgSend404Code = true
 Some web hosts attempt to rewrite all responses with a 404 (not found) status code, mangling or hiding MediaWiki's output. More...
 
 $wgShowRollbackEditCount = 10
 The $wgShowRollbackEditCount variable is used to show how many edits can be rolled back. More...
 
 $wgEnableCanonicalServerLink = false
 Output a <link rel="canonical"> tag on every page indicating the canonical server which should be used, i.e. More...
 
 $wgMangleFlashPolicy = true
 When OutputHandler is used, mangle any output that contains <cross-domain-policy>. More...
 
ResourceLoader settings
 $wgResourceModules = []
 Client-side resource modules. More...
 
 $wgResourceModuleSkinStyles = []
 Skin-specific styles for resource modules. More...
 
 $wgResourceLoaderSources = []
 Extensions should register foreign module sources here. More...
 
 $wgResourceBasePath = null
 The default 'remoteBasePath' value for instances of ResourceLoaderFileModule. More...
 
 $wgResourceLoaderMaxage
 Maximum time in seconds to cache resources served by ResourceLoader. More...
 
 $wgResourceLoaderDebug = false
 The default debug mode (on/off) for of ResourceLoader requests. More...
 
 $wgResourceLoaderMinifierStatementsOnOwnLine = false
 Put each statement on its own line when minifying JavaScript. More...
 
 $wgResourceLoaderMinifierMaxLineLength = 1000
 Maximum line length when minifying JavaScript. More...
 
 $wgIncludeLegacyJavaScript = false
 Whether to ensure the mediawiki.legacy library is loaded before other modules. More...
 
 $wgLegacyJavaScriptGlobals = true
 Whether or not to assign configuration variables to the global window object. More...
 
 $wgResourceLoaderMaxQueryLength = false
 If set to a positive number, ResourceLoader will not generate URLs whose query string is more than this many characters long, and will instead use multiple requests with shorter query strings. More...
 
 $wgResourceLoaderValidateJS = true
 If set to true, JavaScript modules loaded from wiki pages will be parsed prior to minification to validate it. More...
 
 $wgResourceLoaderValidateStaticJS = false
 If set to true, statically-sourced (file-backed) JavaScript resources will be parsed for validity before being bundled up into ResourceLoader modules. More...
 
 $wgResourceLoaderLESSVars
 Global LESS variables. More...
 
 $wgResourceLoaderLESSImportPaths
 Default import paths for LESS modules. More...
 
 $wgResourceLoaderStorageEnabled = false
 Whether ResourceLoader should attempt to persist modules in localStorage on browsers that support the Web Storage API. More...
 
 $wgResourceLoaderStorageVersion = 1
 Cache version for client-side ResourceLoader module storage. More...
 
 $wgAllowSiteCSSOnRestrictedPages = false
 Whether to allow site-wide CSS (MediaWiki:Common.css and friends) on restricted pages like Special:UserLogin or Special:Preferences where JavaScript is disabled for security reasons. More...
 
Page title and interwiki link settings
 $wgMetaNamespace = false
 Name of the project namespace. More...
 
 $wgMetaNamespaceTalk = false
 Name of the project talk namespace. More...
 
 $wgExtraNamespaces = []
 Additional namespaces. More...
 
 $wgExtraGenderNamespaces = []
 Same as above, but for namespaces with gender distinction. More...
 
 $wgNamespaceAliases = []
 Namespace aliases. More...
 
 $wgLegalTitleChars = " %!\"$&'()*,\\-.\\/0-9:;=?@A-Z\\\\^_`a-z~\\x80-\\xFF+"
 Allowed title characters – regex character class Don't change this unless you know what you're doing. More...
 
 $wgLocalInterwiki = false
 The interwiki prefix of the current wiki, or false if it doesn't have one. More...
 
 $wgLocalInterwikis = []
 Array for multiple $wgLocalInterwiki values, in case there are several interwiki prefixes that point to the current wiki. More...
 
 $wgInterwikiExpiry = 10800
 Expiry time for cache of interwiki table. More...
 
Interwiki caching settings.
bool array string $wgInterwikiCache = false
 Interwiki cache, either as an associative array or a path to a constant database (.cdb) file. More...
 
 $wgInterwikiScopes = 3
 Specify number of domains to check for messages. More...
 
 $wgInterwikiFallbackSite = 'wiki'
 Fallback site, if unable to resolve from cache. More...
 
SiteStore caching settings.
 $wgSitesCacheFile = false
 Specify the file location for the Sites json cache file. More...
 

Detailed Description

Default values for MediaWiki configuration settings.

NEVER EDIT THIS FILE

To customize your installation, edit "LocalSettings.php". If you make changes here, they will be lost on next upgrade of MediaWiki!

In this file, variables whose default values depend on other variables are set to false. The actual default value of these variables will only be set in Setup.php, taking into account any custom settings performed in LocalSettings.php.

Documentation is in the source and on: https://www.mediawiki.org/wiki/Manual:Configuration_settings

Warning
Note: this (and other things) will break if the autoloader is not enabled. Please include includes/AutoLoader.php before including this file.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. http://www.gnu.org/copyleft/gpl.html

Definition in file DefaultSettings.php.

Variable Documentation

$wgActionPaths = []

To set 'pretty' URL paths for actions other than plain page views, add to this array.

Example:
Set pretty URL for the edit action:
1 'edit' => "$wgScriptPath/edit/$1"

There must be an appropriate script or rewrite rule in place to handle these URLs.

Since
1.5

Definition at line 366 of file DefaultSettings.php.

$wgAdaptiveMessageCache = false

Instead of caching everything, only cache those messages which have been customised in the site content language.

This means that MediaWiki:Foo/ja is ignored if MediaWiki:Foo doesn't exist. This option is probably only useful for translatewiki.net.

Definition at line 2429 of file DefaultSettings.php.

Referenced by MessageCache\loadFromDB().

$wgAdditionalMailParams = null

Additional email parameters, will be passed as the last argument to mail() call.

Definition at line 1637 of file DefaultSettings.php.

Referenced by UserMailer\sendInternal().

$wgAllDBsAreLocalhost = false

Make all database connections secretly go to localhost.

Fool the load balancer thinking there is an arbitrarily large cluster of servers to connect to. Useful for debugging.

Definition at line 1831 of file DefaultSettings.php.

Referenced by GetSlaveServer\execute(), and DatabaseMysqlBase\open().

$wgAllowCopyUploads = false

Allow for upload to be copied from an URL.

The timeout for copy uploads is set by $wgCopyUploadTimeout. You have to assign the user right 'upload_by_url' to a user group, to use this.

Definition at line 713 of file DefaultSettings.php.

Referenced by UploadFromUrl\isEnabled().

$wgAllowHTMLEmail = false

For parts of the system that have been updated to provide HTML email content, send both text and HTML parts as the body of the email.

Definition at line 1643 of file DefaultSettings.php.

Referenced by UserMailer\send().

$wgAllowImageMoving = true

Allows to move images and other media files.

Definition at line 388 of file DefaultSettings.php.

Referenced by MWNamespace\isMovable().

$wgAllowJavaUploads = false

Allow Java archive uploads.

This is not recommended for public wikis since a maliciously-constructed applet running on the same domain as the wiki can steal the user's cookies.

Definition at line 887 of file DefaultSettings.php.

Referenced by UploadBase\verifyPartialFile().

$wgAllowSchemaUpdates = true

Allow schema updates.

Definition at line 2147 of file DefaultSettings.php.

Referenced by UpdateMediaWiki\execute().

$wgAllowSiteCSSOnRestrictedPages = false

Whether to allow site-wide CSS (MediaWiki:Common.css and friends) on restricted pages like Special:UserLogin or Special:Preferences where JavaScript is disabled for security reasons.

As it is possible to execute JavaScript through CSS, setting this to true opens up a potential security hole. Some sites may "skin" their wiki by using site-wide CSS, causing restricted pages to look unstyled and different from the rest of the site.

Since
1.25

Definition at line 3770 of file DefaultSettings.php.

$wgAllowSlowParserFunctions = false

Enable slow parser functions.

Definition at line 2142 of file DefaultSettings.php.

Referenced by CoreParserFunctions\register().

$wgAllowTitlesInSVG = false

Disallow <title> element in SVG files.

MediaWiki will reject HTMLesque tags in uploaded files due to idiotic browsers which can not perform basic stuff like MIME detection and which are vulnerable to further idiots uploading crap files as images.

When this directive is on, "<title>" will be allowed in files with an "image/svg+xml" MIME type. You should leave this disabled if your web server is misconfigured and doesn't send appropriate MIME types for SVG images.

Definition at line 1128 of file DefaultSettings.php.

Referenced by UploadBase\detectScript().

$wgAllowUserCss = false

Allow user Cascading Style Sheets (CSS)? This enables a lot of neat customizations, but may increase security risk to users and server load.

Definition at line 3265 of file DefaultSettings.php.

Referenced by EditPage\getPreviewText(), and EditPage\showHeader().

$wgAllowUserCssPrefs = true

Allow user-preferences implemented in CSS? This allows users to customise the site appearance to a greater degree; disabling it will improve page load times.

Definition at line 3272 of file DefaultSettings.php.

$wgAllowUserJs = false

Allow user Javascript page? This enables a lot of neat customizations, but may increase security risk to users and server load.

Definition at line 3258 of file DefaultSettings.php.

Referenced by EditPage\getPreviewText(), and EditPage\showHeader().

$wgAllUnicodeFixes = false

Set this to always convert certain Unicode sequences to modern ones regardless of the content language.

This has a small performance impact.

See $wgFixArabicUnicode and $wgFixMalayalamUnicode for conversion details.

Since
1.17

Definition at line 2919 of file DefaultSettings.php.

Referenced by Language\normalize().

$wgAmericanDates = false

Enable dates like 'May 12' instead of '12 May', if the default date format is 'dmy or mdy'.

Definition at line 2993 of file DefaultSettings.php.

$wgAntivirus = null

Internal name of virus scanner.

This serves 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.

Definition at line 1223 of file DefaultSettings.php.

Referenced by UploadBase\detectVirus().

$wgAntivirusRequired = true

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

Definition at line 1277 of file DefaultSettings.php.

Referenced by UploadBase\detectVirus().

$wgAntivirusSetup
Initial value:
= [
# setup for clamav
'clamav' => [
'command' => 'clamscan --no-summary '

Configuration for different virus scanners.

This an associative array of associative arrays. It contains one 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" is 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, please set $wgAntivirusSetup[$wgAntivirus]['command'] to the desired command with full path.

"codemap" is a mapping of exit code to return codes of the detectVirus function in SpecialUpload.

  • An exit code mapped to AV_SCAN_FAILED causes 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_ABORTED causes the function to consider the file to have an unsupported format, which is probably immune to viruses. This causes the file to pass.
  • An exit code mapped to AV_NO_VIRUS will 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.
  • You may use "*" as a key in the array to catch all exit codes not mapped otherwise.

"messagepattern" is 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.

Definition at line 1259 of file DefaultSettings.php.

Referenced by UploadBase\detectVirus().

$wgApiFrameOptions = 'DENY'

Disallow framing of API pages directly, by setting the X-Frame-Options header.

Since the API returns CSRF tokens, allowing the results to be framed can compromise your user's account security. Options are:

  • 'DENY': Do not allow framing. This is recommended for most wikis.
  • 'SAMEORIGIN': Allow framing by pages on the same domain.
  • false: Allow all framing. Note: $wgBreakFrames will override this for human formatted API output.

Definition at line 3321 of file DefaultSettings.php.

$wgAppleTouchIcon = false

The URL path of the icon for iPhone and iPod Touch web app bookmarks.

Defaults to no icon.

Since
1.12

Definition at line 308 of file DefaultSettings.php.

$wgArticlePath = false

The URL path for primary article page views.

This path should contain $1, which is replaced by the article title.

Defaults to "{$wgScript}/$1" or "{$wgScript}?title=$1", depending on $wgUsePathInfo.

Definition at line 255 of file DefaultSettings.php.

bool $wgAssumeProxiesUseDefaultProtocolPorts = true

When the wiki is running behind a proxy and this is set to true, assumes that the proxy exposes the wiki on the standard ports (443 for https and 80 for http).

Since
1.26

Definition at line 91 of file DefaultSettings.php.

Referenced by WebRequest\detectServer().

$wgAttemptFailureEpoch = 1

Certain operations are avoided if there were too many recent failures, for example, thumbnail generation.

Bump this value to invalidate all memory of failed operations and thus allow further attempts to resume. This is useful when a cause for the failures has been found and fixed.

Definition at line 1182 of file DefaultSettings.php.

Referenced by wfGenerateThumbnail().

$wgBreakFrames = false

Break out of framesets.

This can be used to prevent clickjacking attacks, or to prevent external sites from framing your site with ads.

Definition at line 3288 of file DefaultSettings.php.

$wgBrowserBlackList
Initial value:
= [
'/^Mozilla\/2\.[^ ]+ [^(]*?\((?!compatible).*; [UIN]/',
'/^Mozilla\/3\.[^ ]+ [^(]*?\((?!compatible).*; [UIN]/',
'/^Mozilla\/4\.[^ ]+ [^(]*?\((?!compatible).*; [UIN]/',
'/^Mozilla\/4\.0 \(compatible; MSIE \d+\.\d+; Mac_PowerPC\)/',
'/^Mozilla\/4\.0 \(compatible; MSIE 6.0; Windows NT 5.0; Google Wireless Transcoder;\)/'
]

Browser Blacklist for unicode non compliant browsers.

Contains a list of regexps : "/regexp/" matching problematic browsers. These browsers will be served encoded unicode in the edit box instead of real unicode.

Definition at line 2938 of file DefaultSettings.php.

Referenced by EditPage\checkUnicodeCompliantBrowser().

$wgCacheDirectory = false

Directory for caching data in the local filesystem.

Should not be accessible from the web.

Note: if multiple wikis share the same localisation cache directory, they must all have the same set of extensions. You can set a directory just for the localisation cache using $wgLocalisationCacheConf['storeDirectory'].

Definition at line 2183 of file DefaultSettings.php.

Referenced by LCStoreStaticArray\__construct(), LCStoreCDB\__construct(), and LocalisationCache\__construct().

$wgCacheEpoch = '20030516000000'

Set this to current time to invalidate all prior cached pages.

Affects both client-side and server-side caching. You can get the current date on your server by using the command:

*   date +%Y%m%d%H%M%S
* 

Definition at line 2474 of file DefaultSettings.php.

Referenced by AjaxResponse\checkLastModified(), CacheTime\expired(), ParserCache\get(), ParserCache\getKey(), and FileCacheBase\isCacheGood().

$wgCachePages = true

Allow client-side caching of pages.

Definition at line 2464 of file DefaultSettings.php.

Referenced by AjaxResponse\checkLastModified().

$wgCacheSharedUploads = true

Cache shared metadata in memcached.

Don't do this if the commons wiki is in a different memcached domain

Definition at line 706 of file DefaultSettings.php.

$wgCanonicalServer = false

Canonical URL of the server, to use in IRC feeds and notification e-mails.

Must be fully qualified, even if $wgServer is protocol-relative.

Defaults to $wgServer, expanded to a fully qualified http:// URL if needed.

Since
1.18

Definition at line 118 of file DefaultSettings.php.

Referenced by IRCColourfulRCFeedFormatter\getLine(), MachineReadableRCFeedFormatter\getLine(), and DBConnectionError\searchForm().

$wgCapitalLinkOverrides = []
Since
1.16 - This can now be set per-namespace. Some special namespaces (such as Special, see MWNamespace::$alwaysCapitalizedNamespaces for the full list) must be true by default (and setting them has no effect), due to various things that require them to be so. Also, since Talk namespaces need to directly mirror their associated content namespaces, the values for those are ignored in favor of the subject namespace's setting. Setting for NS_MEDIA is taken automatically from NS_FILE.
Example:
1 $wgCapitalLinkOverrides[ NS_FILE ] = false;

Definition at line 3993 of file DefaultSettings.php.

Referenced by MWNamespace\isCapitalized(), and MWNamespaceTest\testIsCapitalizedWithWgCapitalLinkOverrides().

$wgCapitalLinks = true

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.

Definition at line 3977 of file DefaultSettings.php.

Referenced by ParserTest\addArticle(), XmlDumpWriter\caseSetting(), NamespaceConflictChecker\checkAll(), CapsCleanup\execute(), MWNamespace\isCapitalized(), and MWNamespaceTest\testIsCapitalizedWithWgCapitalLinks().

$wgCdnMaxageLagged = 30

Cache timeout for the CDN when DB slave lag is high.

See also
$wgSquidMaxage
Since
1.27

Definition at line 2651 of file DefaultSettings.php.

$wgCdnMaxageSubstitute = 60

Cache timeout for the CDN when a response is known to be wrong or incomplete (due to load)

See also
$wgSquidMaxage
Since
1.27

Definition at line 2674 of file DefaultSettings.php.

$wgCdnReboundPurgeDelay = 0

If set, any SquidPurge call on a URL or URLs will send a second purge no less than this many seconds later via the job queue.

This requires delayed job support. This should be safely higher than the 'max lag' value in $wgLBFactoryConf, so that slave lag does not cause page to be stuck in stales states in CDN.

This also fixes race conditions in two-tiered CDN setups (e.g. cdn2 => cdn1 => MediaWiki). If a purge for a URL reaches cdn2 before cdn1 and a request reaches cdn2 for that URL, it will populate the response from the stale cdn1 value. When cdn1 gets the purge, cdn2 will still be stale. If the rebound purge delay is safely higher than the time to relay a purge to all nodes, then the rebound puge will clear cdn2 after cdn1 was cleared.

Since
1.27

Definition at line 2667 of file DefaultSettings.php.

Referenced by CdnCacheUpdate\doUpdate().

$wgCheckFileExtensions = true

This is a flag to determine whether or not to check file extensions on upload.

Warning
Setting this to false is insecure for public wikis.

Definition at line 894 of file DefaultSettings.php.

Referenced by UploadBase\checkWarnings(), StreamFile\contentTypeFromPath(), and UploadBase\getTitle().

$wgClockSkewFudge = 5

Clock skew or the one-second resolution of time() can occasionally cause cache problems when the user requests two pages within a short period of time.

This variable adds a given number of seconds to vulnerable timestamps, thereby giving a grace period.

Definition at line 2554 of file DefaultSettings.php.

Referenced by User\newTouchedTimestamp().

$wgCompressRevisions = false

We can also compress text stored in the 'text' table.

If this is set on, new 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.

Definition at line 2057 of file DefaultSettings.php.

Referenced by Revision\compressRevisionText().

$wgConf = new SiteConfiguration

wgConf hold the site configuration.

Not used for much in a default install.

Since
1.5

Definition at line 62 of file DefaultSettings.php.

Referenced by JobQueueGroup\getCachedConfigVar(), and WikiMap\getWikiReferenceFromWgConf().

$wgConfigRegistry
Initial value:
= [
'main' => 'GlobalVarConfig::newInstance'
]

Registry of factory functions to create config objects: The 'main' key must be set, and the value should be a valid callable.

Since
1.23

Definition at line 70 of file DefaultSettings.php.

$wgContentHandlers
Initial value:
= [
CONTENT_MODEL_WIKITEXT => 'WikitextContentHandler'
const CONTENT_MODEL_WIKITEXT
Definition: Defines.php:277

Plugins for page content model handling.

Each entry in the array maps a model id to a class name or callback that creates an instance of the appropriate ContentHandler subclass.

Since
1.21

Definition at line 963 of file DefaultSettings.php.

Referenced by ContentHandler\getAllContentFormats(), ContentHandler\getContentModels(), ContentHandler\getForModelID(), EditPageTest\setUp(), ApiEditPageTest\setUp(), TestPageProps\setUp(), RevisionStorageTest\setUp(), RevisionStorageTest\tearDown(), and TestPageProps\tearDown().

$wgContentNamespaces = [ NS_MAIN ]

Array of namespaces which can be deemed to contain valid "content", as far as the site statistics are concerned.

Useful if additional namespaces also contain "content" which should be considered when generating a count of the number of articles in the wiki.

Definition at line 4037 of file DefaultSettings.php.

Referenced by Title\canUseNoindex(), RebuildFileCache\execute(), MWNamespace\getContentNamespaces(), MWNamespace\isContent(), MWNamespaceTest\testGetContentNamespaces(), and MWNamespaceTest\testIsContentAdvanced().

$wgCopyUploadProxy = false

Proxy to use for copy upload requests.

Since
1.20

Definition at line 733 of file DefaultSettings.php.

Referenced by UploadFromUrl\reallyFetchFile().

$wgCopyUploadsDomains = []

A list of domains copy uploads can come from.

Since
1.20

Definition at line 720 of file DefaultSettings.php.

Referenced by UploadFromUrl\isAllowedHost().

$wgCopyUploadsFromSpecialUpload = false

Enable copy uploads from Special:Upload.

$wgAllowCopyUploads must also be true. If $wgAllowCopyUploads is true, but this is false, you will only be able to perform copy uploads from the API or extensions (e.g. UploadWizard).

Definition at line 727 of file DefaultSettings.php.

$wgCopyUploadTimeout = false

Different timeout for upload by url This could be useful since when fetching large files, you may want a timeout longer than the default $wgHTTPTimeout.

False means fallback to default.

Since
1.22

Definition at line 743 of file DefaultSettings.php.

Referenced by UploadFromUrl\reallyFetchFile().

$wgCustomConvertCommand = false

Use another resizing converter, e.g.

GraphicMagick s will be replaced with the source path, d with the destination w and h will be replaced with the width and height.

Example for GraphicMagick:
1 $wgCustomConvertCommand = "gm convert %s -resize %wx%h %d"

Leave as false to skip this.

Definition at line 1032 of file DefaultSettings.php.

Referenced by BitmapHandler\getScalerType(), and BitmapHandler\transformCustom().

$wgDataCenterUpdateStickTTL = 10

After a state-changing request is done by a client, this determines how many seconds that client should keep using the master datacenter.

This avoids unexpected stale or 404 responses due to replication lag.

Since
1.27

Definition at line 1946 of file DefaultSettings.php.

$wgDBadminpassword = null

Separate password for maintenance tasks.

Leave as null to use the default.

Definition at line 1779 of file DefaultSettings.php.

Referenced by Maintenance\finalSetup().

$wgDBadminuser = null

Separate username for maintenance tasks.

Leave as null to use the default.

Definition at line 1774 of file DefaultSettings.php.

Referenced by Maintenance\finalSetup().

$wgDBcompress = false

Whether to use compression in DB connection.

This setting is only used $wgLBFactoryConf['class'] is set to 'LBFactorySimple' and $wgDBservers is an empty array; otherwise the DBO_COMPRESS flag must be set in the 'flags' option of the database connection to achieve the same functionality.

Definition at line 1769 of file DefaultSettings.php.

Referenced by LBFactorySimple\newMainLB().

$wgDBerrorLog = false

File to log database errors to.

Definition at line 1951 of file DefaultSettings.php.

Referenced by MediaWiki\Logger\LegacyLogger\destination(), and MediaWiki\Logger\LegacyLogger\shouldEmit().

$wgDBerrorLogTZ = false

Timezone to use in the error log.

Defaults to the wiki timezone ($wgLocaltimezone).

A list of usable timezones can found at: http://php.net/manual/en/timezones.php

Examples:
1 $wgDBerrorLogTZ = 'UTC';
2 $wgDBerrorLogTZ = 'GMT';
3 $wgDBerrorLogTZ = 'PST8PDT';
4 $wgDBerrorLogTZ = 'Europe/Sweden';
5 $wgDBerrorLogTZ = 'CET';
Since
1.20

Definition at line 1971 of file DefaultSettings.php.

Referenced by MediaWiki\Logger\LegacyLogger\formatAsWfLogDBError().

$wgDBmwschema = null

Mediawiki schema.

Definition at line 1819 of file DefaultSettings.php.

Referenced by DatabaseBase\__construct(), and DatabaseMssql\tableExists().

$wgDBmysql5 = false

Set to true to engage MySQL 4.1/5.0 charset-related features; for now will just cause sending of 'SET NAMES=utf8' on connect.

Warning
THIS IS EXPERIMENTAL!

May break if you're not using the table defs from mysql5/tables.sql. May break if you're upgrading an existing wiki if set differently. Broken symptoms likely to include incorrect behavior with page titles, usernames, comments etc containing non-ASCII characters. Might also cause failures on the object cache and other things.

Even correct usage may cause failures with Unicode supplementary characters (those not in the Basic Multilingual Plane) unless MySQL has enhanced their Unicode support.

Definition at line 1989 of file DefaultSettings.php.

Referenced by DatabaseMysqlBase\connectInitCharset(), and DatabaseMysqli\mysqlConnect().

$wgDBname = 'my_wiki'

Name of the database.

Definition at line 1734 of file DefaultSettings.php.

$wgDBOracleDRCP = false

Set true to enable Oracle DCRP (supported from 11gR1 onward)

To use this feature set to true and use a datasource defined as POOLED (i.e. in tnsnames definition set server=pooled in connect_data block).

Starting from 11gR1 you can use DCRP (Database Resident Connection Pool) that maintains established sessions and reuses them on new connections.

Not completely tested, but it should fall back on normal connection in case the pool is full or the datasource is not configured as pooled. And the other way around; using oci_pconnect on a non pooled datasource should produce a normal connection.

When it comes to frequent shortlived DB connections like with MW Oracle tends to s***. The problem is the driver connects to the database reasonably fast, but establishing a session takes time and resources. MW does not rely on session state (as it does not use features such as package variables) so establishing a valid session is in this case an unwanted overhead that just slows things down.

Warning
EXPERIMENTAL!

Definition at line 2018 of file DefaultSettings.php.

Referenced by DatabaseOracle\open().

$wgDBport = 5432

Database port number (for PostgreSQL and Microsoft SQL Server).

Definition at line 1729 of file DefaultSettings.php.

Referenced by DatabaseMssql\open().

$wgDBservers = false

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: DB type
  • load: Ratio of DB_SLAVE load, must be >=0, the sum of all loads must be >0. If this is zero for any given server, no normal query traffic will be sent to it. It will be excluded from lag checks in maintenance scripts. The only way it can receive traffic is if groupLoads is used.
  • 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_NOBUFFER – turn off buffering (not useful in LocalSettings.php)
    • DBO_PERSISTENT – enables persistent database connections
    • DBO_SSL – uses SSL/TLS encryption in database connections, if available
    • DBO_COMPRESS – uses internal compression in database connections, if available
  • max lag: (optional) Maximum replication lag before a slave will taken out of rotation

These and any other user-defined properties will be assigned to the mLBInfo member variable of the Database object.

Leave at false to use the single-server variables above. If you set this variable, the single-server variables will generally be ignored (except perhaps in some command-line scripts).

The first server listed in this array (with key 0) will be the master. The rest of the servers will be slaves. To prevent writes to your slaves due to accidental misconfiguration or MediaWiki bugs, set read_only=1 on all your slaves in my.cnf. You can set read_only mode at runtime using:

1 SET @@read_only=1;

Since the effect of writing to a slave is so damaging and difficult to clean up, we at Wikimedia set read_only=1 in my.cnf on all our DB servers, even our masters, and then set read_only=0 on masters at runtime.

Definition at line 1926 of file DefaultSettings.php.

Referenced by Maintenance\finalSetup(), and LBFactorySimple\newMainLB().

$wgDBssl = false

Whether to use SSL in DB connection.

This setting is only used $wgLBFactoryConf['class'] is set to 'LBFactorySimple' and $wgDBservers is an empty array; otherwise the DBO_SSL flag must be set in the 'flags' option of the database connection to achieve the same functionality.

Definition at line 1759 of file DefaultSettings.php.

Referenced by LBFactorySimple\newMainLB().

$wgDBTableOptions = 'ENGINE=InnoDB'

MySQL table options to use during installation or update.

Definition at line 1806 of file DefaultSettings.php.

Referenced by UpdateLogging\execute().

$wgDBWindowsAuthentication = false

Use Windows Authentication instead of $wgDBuser / $wgDBpassword for MS SQL Server.

Definition at line 2042 of file DefaultSettings.php.

Referenced by DatabaseMssql\open(), and MssqlInstaller\openConnection().

array $wgDefaultExternalStore = false

The place to put new revisions, false to put them in the local text table.

Part of a URL, e.g. DB://cluster1

Can be an array instead of a single string, to enable data distribution. Keys must be consecutive integers, starting at zero.

Example:
1 $wgDefaultExternalStore = array( 'DB://cluster1', 'DB://cluster2' );

Definition at line 2102 of file DefaultSettings.php.

Referenced by MediaWikiTestCase\getExternalStoreDatabaseConnections(), ExternalStoreDB\getSlave(), Revision\insertOn(), ExternalStore\insertToDefault(), and MediaWikiTestCase\isUsingExternalStoreDB().

$wgDefaultSkin = 'vector'

Default skin, for new users and anonymous visitors.

Registered users may change this to any one of the other available skins in their preferences.

Definition at line 3232 of file DefaultSettings.php.

Referenced by User\getDefaultOptions(), Skin\normalizeKey(), and ResourceFileCache\useFileCache().

$wgDeletedDirectory = false

What directory to place deleted uploads in.

Defaults to "{$wgUploadDirectory}/deleted".

Definition at line 409 of file DefaultSettings.php.

$wgDirectoryMode = 0777

Default value for chmoding of new directories.

Definition at line 1457 of file DefaultSettings.php.

$wgDisabledVariants = []

Disabled variants array of language variant conversion.

Example:
1 $wgDisabledVariants[] = 'zh-mo';
2 $wgDisabledVariants[] = 'zh-my';

Definition at line 3041 of file DefaultSettings.php.

Referenced by LanguageConverter\__construct().

$wgDisableLangConversion = false
$wgDisableOutputCompression = false

Disable output compression (enabled by default if zlib is available)

Definition at line 3326 of file DefaultSettings.php.

Referenced by wfOutputHandler().

$wgDisableQueryPages = false

Disable all query pages if miser mode is on, not just some.

Definition at line 2127 of file DefaultSettings.php.

$wgDisableTitleConversion = false

Whether to enable language variant conversion for links.

Definition at line 3025 of file DefaultSettings.php.

Referenced by LanguageConverter\findVariantLink(), and ParserOptions\initialiseFromUser().

$wgDisableUploadScriptChecks = false

Setting this to true will disable the upload system's checks for HTML/JavaScript.

Warning
THIS IS VERY DANGEROUS on a publicly editable site, so USE $wgGroupPermissions TO RESTRICT UPLOADING to only those that you trust

Definition at line 910 of file DefaultSettings.php.

Referenced by UploadBase\verifyFile(), and UploadBase\verifyPartialFile().

$wgDjvuDump = null

Path of the djvudump executable Enable this and $wgDjvuRenderer to enable djvu rendering example: $wgDjvuDump = 'djvudump';.

Definition at line 1481 of file DefaultSettings.php.

Referenced by DjVuSupport\__construct(), DjVuHandler\isEnabled(), DjVuSupport\isEnabled(), and DjVuImage\retrieveMetaData().

$wgDjvuOutputExtension = 'jpg'

File extension for the DJVU post processor output.

Definition at line 1523 of file DefaultSettings.php.

Referenced by DjVuHandler\getThumbType().

$wgDjvuPostProcessor = 'pnmtojpeg'

Shell command for the DJVU post processor Default: pnmtojpeg, since ddjvu generates ppm output Set this to false to output the ppm file directly.

Definition at line 1518 of file DefaultSettings.php.

Referenced by DjVuHandler\doTransform().

$wgDjvuRenderer = null

Path of the ddjvu DJVU renderer Enable this and $wgDjvuDump to enable djvu rendering example: $wgDjvuRenderer = 'ddjvu';.

Definition at line 1488 of file DefaultSettings.php.

Referenced by DjVuSupport\__construct(), DjVuHandler\doTransform(), DjVuHandler\isEnabled(), and DjVuSupport\isEnabled().

$wgDjvuToXML = null

Path of the djvutoxml executable This works like djvudump except much, much slower as of version 3.5.

For now we recommend you use djvudump instead. The djvuxml output is probably more stable, so we'll switch back to it as soon as they fix the efficiency problem. http://sourceforge.net/tracker/index.php?func=detail&aid=1704049&group_id=32953&atid=406583

Example:
1 $wgDjvuToXML = 'djvutoxml';

Definition at line 1511 of file DefaultSettings.php.

Referenced by DjVuSupport\__construct(), DjVuHandler\isEnabled(), DjVuSupport\isEnabled(), and DjVuImage\retrieveMetaData().

$wgDjvuTxt = null

Path of the djvutxt DJVU text extraction utility Enable this and $wgDjvuDump to enable text layer extraction from djvu files example: $wgDjvuTxt = 'djvutxt';.

Definition at line 1495 of file DefaultSettings.php.

Referenced by DjVuSupport\__construct(), DjVuSupport\isEnabled(), and DjVuImage\retrieveMetaData().

$wgDummyLanguageCodes
Initial value:
= [
'als' => 'gsw'

List of language codes that don't correspond to an actual language.

These codes are mostly left-offs from renames, or other legacy things. This array makes them not appear as a selectable language on the installer, and excludes them when running the transstat.php script.

Definition at line 2863 of file DefaultSettings.php.

Referenced by Language\factory(), WebInstallerLanguage\getLanguageSelector(), and WikiStatsOutput\heading().

$wgEditEncoding = ''

Character set for use in the article edit box.

Language-specific encodings may be defined.

This historic feature is one of the first that was added by former MediaWiki team leader Brion Vibber, and is used to support the Esperanto x-system.

Definition at line 2886 of file DefaultSettings.php.

Referenced by LanguageEo\initEncoding(), Language\recodeForEdit(), and Language\recodeInput().

$wgEdititis = false

Display user edit counts in various prominent places.

Definition at line 3396 of file DefaultSettings.php.

$wgEditPageFrameOptions = 'DENY'

The X-Frame-Options header to send on pages sensitive to clickjacking attacks, such as edit pages.

This prevents those pages from being displayed in a frame or iframe. The options are:

  • 'DENY': Do not allow framing. This is recommended for most wikis.
  • 'SAMEORIGIN': Allow framing by pages on the same domain. This can be used to allow framing within a trusted domain. This is insecure if there is a page on the same domain which allows framing of arbitrary URLs.
  • false: Allow all framing. This opens up the wiki to XSS attacks and thus full compromise of local user accounts. Private wikis behind a corporate firewall are especially vulnerable. This is not recommended.

For extra safety, set $wgBreakFrames = true, to prevent framing on all pages, not just edit pages.

Definition at line 3309 of file DefaultSettings.php.

$wgEmailAuthentication = true

Require email authentication before sending mail to an email address.

This is highly recommended. It prevents MediaWiki from being used as an open spam relay.

Definition at line 1662 of file DefaultSettings.php.

Referenced by Autopromote\checkCondition(), SpecialPageFactory\getPageList(), User\isEmailConfirmationPending(), User\isEmailConfirmed(), User\setEmailWithConfirmation(), and TitlePermissionTest\testUserBlock().

$wgEmergencyContact = false

Site admin email address.

Defaults to "wikiadmin@$wgServerName".

Definition at line 1539 of file DefaultSettings.php.

$wgEnableAsyncUploads = false

Enable deferred upload tasks that use the job queue.

Only enable this if job runners are set up for both the 'AssembleUploadChunks' and 'PublishStashedFile' job types.

Note
If you use suhosin, this setting is incompatible with suhosin.session.encrypt.

Definition at line 398 of file DefaultSettings.php.

$wgEnableAutoRotation = null

If set to true, images that contain certain the exif orientation tag will be rotated accordingly.

If set to null, try to auto-detect whether a scaler is available that can rotate.

Definition at line 1216 of file DefaultSettings.php.

Referenced by BitmapHandler\autoRotateEnabled().

$wgEnableCanonicalServerLink = false

Output a <link rel="canonical"> tag on every page indicating the canonical server which should be used, i.e.

$wgServer or $wgCanonicalServer. Since detection of the current server is unreliable, the link is sent unconditionally.

Definition at line 3428 of file DefaultSettings.php.

$wgEnableEmail = true

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.

Definition at line 1569 of file DefaultSettings.php.

Referenced by User\canSendEmail(), LoginSignupSpecialPage\getFakeTemplate(), SpecialPageFactory\getPageList(), and User\setEmailWithConfirmation().

$wgEnableParserCache = true

Kept for extension compatibility; see $wgParserCacheType.

Deprecated:
1.26

Definition at line 2510 of file DefaultSettings.php.

$wgEnableSidebarCache = false

If on, the sidebar navigation links are cached for users with the current language set.

This can save a touch of load on a busy site by shaving off extra message lookups.

However it is also fragile: changing the site configuration, or having a variable $wgArticlePath, can produce broken links that don't update as expected.

Definition at line 2527 of file DefaultSettings.php.

Referenced by Skin\buildSidebar(), and RebuildMessages\execute().

$wgEnableUploads = false

Uploads have to be specially set up to be secure.

Definition at line 378 of file DefaultSettings.php.

Referenced by EditPage\getEditToolbar(), UploadBase\isEnabled(), Linker\makeBrokenImageLinkObj(), ImagePage\openShowImage(), and ImagePage\uploadLinksBox().

$wgEnableUserEmail = true

Set to true to enable user-to-user e-mail.

This can potentially be abused, as it's hard to track.

Definition at line 1575 of file DefaultSettings.php.

Referenced by SpecialBlock\canBlockEmail(), User\canSendEmail(), and LoginSignupSpecialPage\getFakeTemplate().

$wgEnotifFromEditor = false

True: from page editor if s/he opted-in.

False: Enotif mails appear to come from $wgEmergencyContact

Definition at line 1649 of file DefaultSettings.php.

Referenced by EmailNotification\composeCommonMailtext().

$wgEnotifImpersonal = false

Send a generic mail instead of a personalised mail for each user.

This always uses UTC as the time zone, and doesn't include the username.

For pages with many users watching, this can significantly reduce mail load. Has no effect when using sendmail rather than SMTP.

Definition at line 1695 of file DefaultSettings.php.

Referenced by EmailNotification\compose(), EmailNotification\composeCommonMailtext(), and EmailNotification\sendMails().

$wgEnotifMaxRecips = 500

Maximum number of users to mail at once when using impersonal mail.

Should match the limit on your mail server.

Definition at line 1701 of file DefaultSettings.php.

Referenced by UserMailer\sendInternal().

$wgEnotifMinorEdits = true

Send notification mails on minor edits to watchlist pages.

This is enabled by default. User talk notifications are affected by this, $wgEnotifUserTalk, and the nominornewtalk user right.

Definition at line 1686 of file DefaultSettings.php.

Referenced by EmailNotification\actuallyNotifyOnPageChange(), and EmailNotification\notifyOnPageChange().

$wgEnotifRevealEditorAddress = false

Set the Reply-to address in notifications to the editor's address, if user allowed this in the preferences.

Definition at line 1679 of file DefaultSettings.php.

Referenced by EmailNotification\composeCommonMailtext().

$wgEnotifUseRealName = false

Use real name instead of username in e-mail "from" field.

Definition at line 1706 of file DefaultSettings.php.

Referenced by EmailNotification\composeCommonMailtext(), EmailNotification\sendPersonalised(), and MailAddress\toString().

$wgEnotifUserTalk = false

Allow users to enable email notification ("enotif") when someone edits their user talk page.

Definition at line 1673 of file DefaultSettings.php.

Referenced by EmailNotification\actuallyNotifyOnPageChange(), EmailNotification\canSendUserTalkEmail(), and EmailNotification\notifyOnPageChange().

$wgEnotifWatchlist = false

Allow users to enable email notification ("enotif") on watchlist changes.

Definition at line 1667 of file DefaultSettings.php.

Referenced by EmailNotification\actuallyNotifyOnPageChange().

$wgExiftool = '/usr/bin/exiftool'

Path to exiftool binary.

Used for lossless ICC profile swapping.

Since
1.26

Definition at line 1073 of file DefaultSettings.php.

Referenced by ExifBitmapHandler\swapICCProfile(), and ExifBitmapTest\testSwappingICCProfile().

$wgExiv2Command = '/usr/bin/exiv2'

Some tests and extensions use exiv2 to manipulate the Exif metadata in some image formats.

Definition at line 1066 of file DefaultSettings.php.

Referenced by RandomImageGenerator\getImageWriteMethod(), and RandomImageGenerator\writeImageWithApi().

$wgExperimentalHtmlIds = false

Should we allow a broader set of characters in id attributes, per HTML5? If not, use only HTML 4-compatible IDs.

This option is for testing – when the functionality is ready, it will be on by default with no option.

Currently this appears to work fine in all browsers, but it's disabled by default because it normalizes id's a bit too aggressively, breaking preexisting content (particularly Cite). See bug 27733, bug 27694, bug 27474.

Definition at line 3337 of file DefaultSettings.php.

Referenced by Sanitizer\escapeId(), and Parser\formatHeadings().

$wgExtensionAssetsPath = false

The URL path of the extensions directory.

Defaults to "{$wgResourceBasePath}/extensions".

Since
1.16

Definition at line 232 of file DefaultSettings.php.

Referenced by ResourceLoaderFileModule\extractBasePaths(), and ParserTest\setUp().

$wgExtensionDirectory = "{$IP}/extensions"

Filesystem extensions directory.

Defaults to "{$IP}/extensions".

Since
1.25

Definition at line 239 of file DefaultSettings.php.

Referenced by Installer\getExistingLocalSettings().

int bool $wgExtensionInfoMTime = false

When loading extensions through the extension registration system, this can be used to invalidate the cache.

A good idea would be to set this to one file, you can just touch that one to invalidate the cache

Example:
1 $wgExtensionInfoMtime = filemtime( "$IP/LocalSettings.php" );

If set to false, the mtime for each individual JSON file will be checked, which can be slow if a large number of extensions are being loaded.

Definition at line 2582 of file DefaultSettings.php.

Referenced by ExtensionRegistry\queue().

$wgExternalServers = []

An array of external MySQL servers.

Example:
Create a cluster named 'cluster1' containing three servers:
1 $wgExternalServers = array(
2  'cluster1' => array( 'srv28', 'srv29', 'srv30' )
3 );

Used by LBFactorySimple, may be ignored if $wgLBFactoryConf is set to another class.

Definition at line 2086 of file DefaultSettings.php.

Referenced by LBFactorySimple\newExternalLB().

$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:

1 $wgExternalStores = array("http","file","custom")...

CAUTION: Access to database might lead to code execution

Definition at line 2070 of file DefaultSettings.php.

Referenced by ExternalStore\getStoreObject().

$wgExtraGenderNamespaces = []

Same as above, but for namespaces with gender distinction.

Note: the default form for the namespace should also be set using $wgExtraNamespaces for the same index.

Since
1.18

Definition at line 3828 of file DefaultSettings.php.

Referenced by Language\getGenderNsText(), Language\getNamespaceAliases(), and Language\needsGenderDistinction().

$wgExtraInterlanguageLinkPrefixes = []

List of additional interwiki prefixes that should be treated as interlanguage links (i.e.

placed in the sidebar). Notes:

  • This will not do anything unless the prefixes are defined in the interwiki map.
  • The display text for these custom interlanguage links will be fetched from the system message "interlanguage-link-xyz" where xyz is the prefix in this array.
  • A friendly name for each site, used for tooltip text, may optionally be placed in the system message "interlanguage-link-sitename-xyz" where xyz is the prefix in this array.

Definition at line 2850 of file DefaultSettings.php.

Referenced by Parser\replaceInternalLinks2(), and ParserTest\setUp().

$wgExtraLanguageNames = []

List of language names or overrides for default names in Names.php.

Definition at line 2855 of file DefaultSettings.php.

$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. You can also override the namespace names of existing namespaces. Extensions should use the CanonicalNamespaces hook or extension.json.

Warning
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 to avoid conflicting with standard namespaces, and should always follow the even/odd main/talk pattern.

Example:
1 $wgExtraNamespaces = array(
2  100 => "Hilfe",
3  101 => "Hilfe_Diskussion",
4  102 => "Aide",
5  103 => "Discussion_Aide"
6 );
Todo:
Add a note about maintenance/namespaceDupes.php

Definition at line 3820 of file DefaultSettings.php.

Referenced by MWNamespace\getCanonicalNamespaces(), Language\getNamespaces(), Language\needsGenderDistinction(), EditPageTest\setUp(), ApiEditPageTest\setUp(), TestPageProps\setUp(), RevisionStorageTest\setUp(), ParserTest\setUp(), RevisionStorageTest\tearDown(), and TestPageProps\tearDown().

$wgFallbackSkin = 'fallback'

Fallback skin used when the skin defined by $wgDefaultSkin can't be found.

Since
1.24

Definition at line 3239 of file DefaultSettings.php.

Referenced by Skin\normalizeKey().

$wgFavicon = '/favicon.ico'

The URL path of the shortcut icon.

Since
1.6

Definition at line 301 of file DefaultSettings.php.

Referenced by LocalRepo\getInfo().

$wgFetchCommonsDescriptions = false

Fetch commons image description pages and display them on the local wiki?

Definition at line 684 of file DefaultSettings.php.

$wgFileBackends = []

File backend structure configuration.

This is an array of file backend configuration arrays. Each backend configuration has the following parameters:

  • 'name' : A unique name for the backend
  • 'class' : The file backend class to use
  • 'wikiId' : A unique string that identifies the wiki (container prefix)
  • 'lockManager' : The name of a lock manager (see $wgLockManagers)

See FileBackend::__construct() for more details. Additional parameters are specific to the file backend class used. These settings should be global to all wikis when possible.

There are two particularly important aspects about each backend:

  • a) Whether it is fully qualified or wiki-relative. By default, the paths of files are relative to the current wiki, which works via prefixing them with the current wiki ID when accessed. Setting 'wikiId' forces the backend to be fully qualified by prefixing all paths with the specified value instead. This can be useful if multiple wikis need to share the same data. Note that 'name' is not part of any prefix and thus should not be relied upon for namespacing.
  • b) Whether it is only defined for some wikis or is defined on all wikis in the wiki farm. Defining a backend globally is useful if multiple wikis need to share the same data. One should be aware of these aspects when configuring a backend for use with any basic feature or plugin. For example, suppose an extension stores data for different wikis in different directories and sometimes needs to access data from a foreign wiki's directory in order to render a page on given wiki. The extension would need a fully qualified backend that is defined on all wikis in the wiki farm.

Definition at line 627 of file DefaultSettings.php.

Referenced by FileBackendGroup\initFromGlobals(), StoreBatchTest\setUp(), FileBackendTest\setUp(), and NewParserTest\setupGlobals().

$wgFileBlacklist
Initial value:
= [
# HTML may contain cookie-stealing JavaScript and web bugs
'html', 'htm', 'js', 'jsb', 'mhtml', 'mht', 'xhtml', 'xht',
# PHP scripts may execute arbitrary code on the server
'php', 'phtml', 'php3', 'php4', 'php5', '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' ]

Files with these extensions will never be allowed as uploads.

An array of file extensions to blacklist. You should append to this array if you want to blacklist additional files.

Definition at line 855 of file DefaultSettings.php.

Referenced by StreamFile\contentTypeFromPath(), UploadStash\getExtensionForPath(), and UploadBase\getTitle().

$wgFileCacheDepth = 2

Depth of the subdirectory hierarchy to be created under $wgFileCacheDirectory.

The subdirectories will be named based on the MD5 hash of the title. A value of 0 means all cache files will be put directly into the main file cache directory.

Definition at line 2504 of file DefaultSettings.php.

Referenced by FileCacheBase\hashSubdirectory().

$wgFileCacheDirectory = false

Directory where the cached page will be saved.

Defaults to "{$wgUploadDirectory}/cache".

Definition at line 272 of file DefaultSettings.php.

Referenced by FileCacheBase\baseCacheDirectory(), and PruneFileCache\execute().

$wgFileExtensions = [ 'png', 'gif', 'jpg', 'jpeg', 'webp' ]

This is the list of preferred extensions for uploading files.

Uploading files with extensions not in this list will trigger a warning.

Warning
If you add any OpenOffice or Microsoft Office file formats here, such as odt or doc, and untrusted users are allowed to upload files, then your wiki will be vulnerable to cross-site request forgery (CSRF).

Definition at line 848 of file DefaultSettings.php.

Referenced by DjVuSupport\__construct(), UploadBase\checkWarnings(), StreamFile\contentTypeFromPath(), and UploadBase\getTitle().

$wgFixArabicUnicode = true

Set this to true to replace Arabic presentation forms with their standard forms in the U+0600-U+06FF block.

This only works if $wgLanguageCode is set to "ar".

Note that pages with titles containing presentation forms will become inaccessible, run maintenance/cleanupTitles.php to fix this.

Definition at line 2896 of file DefaultSettings.php.

Referenced by LanguageAr\normalize().

$wgFixMalayalamUnicode = true

Set this to true to replace ZWJ-based chillu sequences in Malayalam text with their Unicode 5.1 equivalents.

This only works if $wgLanguageCode is set to "ml". Note that some clients (even new clients as of 2010) do not support these characters.

If you enable this on an existing wiki, run maintenance/cleanupTitles.php to fix any ZWJ sequences in existing page titles.

Definition at line 2907 of file DefaultSettings.php.

Referenced by LanguageMl\normalize().

$wgFooterIcons
Initial value:
= [
"copyright" => [
"copyright" => []

Abstract list of footer icons for skins in place of old copyrightico and poweredbyico code You can add new icons to the built in copyright or poweredby, or you can create a new block.

Though note that you may need to add some custom css to get good styling of new blocks in monobook. vector and modern should work without any special css.

$wgFooterIcons itself is a key/value array. The key is the name of a block that the icons will be wrapped in. The final id varies by skin; Monobook and Vector will turn poweredby into f-poweredbyico while Modern turns it into mw_poweredby. The value is either key/value array of icons or a string. In the key/value array the key may or may not be used by the skin but it can be used to find the icon and unset it or change the icon if needed. This is useful for disabling icons that are set by extensions. The value should be either a string or an array. If it is a string it will be output directly as html, however some skins may choose to ignore it. An array is the preferred format for the icon, the following keys are used:

  • src: An absolute url to the image to use for the icon, this is recommended but not required, however some skins will ignore icons without an image
  • srcset: optional additional-resolution images; see HTML5 specs
  • url: The url to use in the a element around the text or icon, if not set an a element will not be outputted
  • alt: This is the text form of the icon, it will be displayed without an image in skins like Modern or if src is not set, and will otherwise be used as the alt="" for the image. This key is required.
  • width and height: If the icon specified by src is not of the standard size you can specify the size of image to use with these keys. Otherwise they will default to the standard 88x31.
    Todo:
    Reformat documentation.

Definition at line 3369 of file DefaultSettings.php.

Referenced by Skin\getCopyrightIcon(), and SkinTemplate\prepareQuickTemplate().

$wgForcedRawSMaxage = 300

Default maximum age for raw CSS/JS accesses.

300 seconds = 5 minutes.

Definition at line 2681 of file DefaultSettings.php.

$wgForceUIMsgAsContentMsg = []

When translating messages with wfMessage(), it is not always clear what should be considered UI messages and what should be content messages.

For example, for the English Wikipedia, there should be only one 'mainpage', so when getting the link for 'mainpage', we should treat it as site content and call ->inContentLanguage()->text(), but for rendering the text of the link, we call ->text(). The code behaves this way by default. However, sites like the Wikimedia Commons do offer different versions of 'mainpage' and the like for different languages. This array provides a way to override the default behavior.

Example:
To allow language-specific main page and community portal:
1 $wgForceUIMsgAsContentMsg = array( 'mainpage', 'portal-url' );

Definition at line 3088 of file DefaultSettings.php.

Referenced by Message\getTitle(), and Message\inContentLanguage().

$wgForeignFileRepos = []
$wgForeignUploadTargets = []

Array of foreign file repo names (set in $wgForeignFileRepos above) that are allowable upload targets.

These wikis must have some method of authentication (i.e. CentralAuth), and be CORS-enabled for this wiki.

Example: $wgForeignUploadTargets = array( 'shared' );

Definition at line 536 of file DefaultSettings.php.

$wgGalleryOptions
Initial value:
= [
'imagesPerRow' => 0

Default parameters for the "<gallery>" tag.

Definition at line 1438 of file DefaultSettings.php.

$wgGenerateThumbnailOnParse = true

Allow thumbnail rendering on page view.

If this is false, a valid thumbnail URL is still output, but no file will be created at the target location. This may save some time if you have a thumb.php or 404 handler set up which is faster than the regular webserver(s).

Definition at line 1204 of file DefaultSettings.php.

$wgGitInfoCacheDirectory = false

Directory where GitInfo will look for pre-computed cache files.

If false, $wgCacheDirectory/gitinfo will be used.

Definition at line 2480 of file DefaultSettings.php.

Referenced by GitInfo\getCacheFilePath().

$wgHashedSharedUploadDirectory = true

Set the following 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.

Definition at line 828 of file DefaultSettings.php.

$wgHashedUploadDirectory = true

Set this to false if you do not want MediaWiki to divide your images directory into many subdirectories, for improved performance.

It's almost always good to leave this enabled. In previous versions of MediaWiki, some users set this to false to allow images to be added to the wiki by simply copying them into $wgUploadDirectory and then running maintenance/rebuildImages.php to register them in the database. This is no longer recommended, use maintenance/importImages.php instead.

Note
That this variable may be ignored if $wgLocalFileRepo is set.
Todo:
Deprecate the setting and ultimately remove it from Core.

Definition at line 821 of file DefaultSettings.php.

$wgHideInterlanguageLinks = false

Hide interlanguage links from the sidebar.

Definition at line 2835 of file DefaultSettings.php.

Referenced by SkinTemplate\getLanguages().

$wgHTCPMulticastTTL = 1

HTCP multicast TTL.

See also
$wgHTCPRouting

Definition at line 2779 of file DefaultSettings.php.

Referenced by CdnCacheUpdate\HTCPPurge().

$wgHTCPRouting = []

Routing configuration for HTCP multicast purging.

Add elements here to enable HTCP and determine which purges are sent where. If set to an empty array, HTCP is disabled.

Each key in this array is a regular expression to match against the purged URL, or an empty string to match all URLs. The purged URL is matched against the regexes in the order specified, and the first rule whose regex matches is used, all remaining rules will thus be ignored.

Example configuration to send purges for upload.wikimedia.org to one
multicast group and all other purges to another:
1 $wgHTCPRouting = array(
2  '|^https?://upload\\.wikimedia\\.org|' => array(
3  'host' => '239.128.0.113',
4  'port' => 4827,
5  ),
6  '' => array(
7  'host' => '239.128.0.112',
8  'port' => 4827,
9  ),
10 );

You can also pass an array of hosts to send purges too. This is useful when you have several multicast groups or unicast address that should receive a given purge. Multiple hosts support was introduced in MediaWiki 1.22.

Example of sending purges to multiple hosts:
1 $wgHTCPRouting = array(
2  '' => array(
3  // Purges to text caches using multicast
4  array( 'host' => '239.128.0.114', 'port' => '4827' ),
5  // Purges to a hardcoded list of caches
6  array( 'host' => '10.88.66.1', 'port' => '4827' ),
7  array( 'host' => '10.88.66.2', 'port' => '4827' ),
8  array( 'host' => '10.88.66.3', 'port' => '4827' ),
9  ),
10 );
Since
1.22

$wgHTCPRouting replaces $wgHTCPMulticastRouting that was introduced in 1.20. For back compatibility purposes, whenever its array is empty $wgHTCPMutlicastRouting will be used as a fallback if it not null.

See also
$wgHTCPMulticastTTL

Definition at line 2773 of file DefaultSettings.php.

Referenced by PurgeChangedPages\execute(), PurgeChangedFiles\execute(), CdnCacheUpdate\HTCPPurge(), and CdnCacheUpdate\purge().

$wgHtml5 = true

Previously used to determine if we should output an HTML5 doctype.

This is no longer used as we always output HTML5 now. For compatibility with extensions that still check the value of this config it's value is now forced to true by Setup.php.

Deprecated:
since 1.22

Definition at line 3163 of file DefaultSettings.php.

$wgHtml5Version = null

Defines the value of the version attribute in the <html> tag, if any.

If your wiki uses RDFa, set it to the correct value for RDFa+HTML5. Correct current values are 'HTML+RDFa 1.0' or 'XHTML+RDFa 1.0'. See also http://www.w3.org/TR/rdfa-in-html/#document-conformance

Since
1.16

Definition at line 3173 of file DefaultSettings.php.

Referenced by Html\htmlHeader().

$wgHTMLFormAllowTableFormat = true

Temporary variable that allows HTMLForms to be rendered as tables.

Table based layouts cause various issues when designing for mobile. This global allows skins or extensions a means to force non-table based rendering. Setting to false forces form components to always render as div elements.

Since
1.24

Definition at line 3182 of file DefaultSettings.php.

$wgIgnoreImageErrors = false

If set, inline scaled images will still produce "<img>" tags ready for output instead of showing an error message.

This may be useful if errors are transitory, especially if the site is configured to automatically render thumbnails on request.

On the other hand, it may obscure error conditions from debugging. Enable the debug log or the 'thumbnail' log group to make sure errors are logged to a file for review.

Definition at line 1195 of file DefaultSettings.php.

Referenced by File\generateAndSaveThumb(), and File\transformErrorOutput().

$wgIllegalFileChars = ":"

These are additional characters that should be replaced with '-' in filenames.

Definition at line 403 of file DefaultSettings.php.

$wgImageLimits
Initial value:
= [
[ 320, 240 ],
[ 640, 480 ],
[ 800, 600 ],
[ 1024, 768 ],
[ 1280, 1024 ]
]

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. The user preference is saved as an array offset in the database, by default the offset is set with $wgDefaultUserOptions['imagesize']. Make sure you change it if you alter the array (see bug 8858). This is the list of settings the user can choose from:

Definition at line 1337 of file DefaultSettings.php.

Referenced by ImagePage\getImageLimitsFromOption(), and ImagePage\getThumbSizes().

$wgImageMagickConvertCommand = '/usr/bin/convert'
$wgImageMagickTempDir = false

Temporary directory used for ImageMagick.

The directory must exist. Leave this set to false to let ImageMagick decide for itself.

Definition at line 1018 of file DefaultSettings.php.

Referenced by BitmapHandler\transformImageMagick().

$wgImgAuthDetails = false

Set this to true if you use img_auth and want the user to see details on why access failed.

Definition at line 414 of file DefaultSettings.php.

$wgImgAuthUrlPathMap = []

Map of relative URL directories to match to internal mwstore:// base storage paths.

For img_auth.php requests, everything after "img_auth.php/" is checked to see if starts with any of the prefixes defined here. The prefixes should not overlap. The prefix that matches has a corresponding storage path, which the rest of the URL is assumed to be relative to. The file at that path (or a 404) is send to the client.

Example: $wgImgAuthUrlPathMap['/timeline/'] = 'mwstore://local-fs/timeline-render/'; The above maps ".../img_auth.php/timeline/X" to "mwstore://local-fs/timeline-render/". The name "local-fs" should correspond by name to an entry in $wgFileBackends.

See also
$wgFileBackends

Definition at line 430 of file DefaultSettings.php.

$wgIncludeLegacyJavaScript = false

Whether to ensure the mediawiki.legacy library is loaded before other modules.

Deprecated:
since 1.26: Always declare dependencies.

Definition at line 3630 of file DefaultSettings.php.

Referenced by ResourceLoaderStartUpModule\getLegacyModules().

$wgInternalServer = false

Internal server name as known to CDN, if different.

Example:
1 $wgInternalServer = 'http://yourinternal.tld:8000';

Definition at line 2635 of file DefaultSettings.php.

Referenced by Title\getInternalURL().

bool array string $wgInterwikiCache = false

Interwiki cache, either as an associative array or a path to a constant database (.cdb) file.

This data structure database is generated by the dumpInterwiki maintenance script (which lives in the WikimediaMaintenance repository) and has key formats such as the following:

  • dbname:key - a simple key (e.g. enwiki:meta)
  • _sitename:key - site-scope key (e.g. wiktionary:meta)
  • __global:key - global-scope key (e.g. __global:meta)
  • __sites:dbname - site mapping (e.g. __sites:enwiki)

Sites mapping just specifies site name, other keys provide "local url" data layout.

Definition at line 3924 of file DefaultSettings.php.

Referenced by Interwiki\fetch(), Interwiki\getAllPrefixes(), and Interwiki\getCacheValue().

$wgInterwikiExpiry = 10800

Expiry time for cache of interwiki table.

Definition at line 3899 of file DefaultSettings.php.

Referenced by Interwiki\load().

$wgInterwikiFallbackSite = 'wiki'

Fallback site, if unable to resolve from cache.

Definition at line 3937 of file DefaultSettings.php.

Referenced by Interwiki\getAllPrefixesCached(), and Interwiki\getInterwikiCacheEntry().

$wgInterwikiMagic = true

Treat language links as magic connectors, not inline links.

Definition at line 2830 of file DefaultSettings.php.

Referenced by ParserOptions\initialiseFromUser().

$wgInterwikiScopes = 3

Specify number of domains to check for messages.

  • 1: Just wiki(db)-level
  • 2: wiki and global levels
  • 3: site levels

Definition at line 3932 of file DefaultSettings.php.

Referenced by Interwiki\getAllPrefixesCached(), and Interwiki\getInterwikiCacheEntry().

$wgInvalidateCacheOnLocalSettingsChange = true

Invalidate various caches when LocalSettings.php changes.

This is equivalent to setting $wgCacheEpoch to the modification time of LocalSettings.php, as was previously done in the default LocalSettings.php file.

On high-traffic wikis, this should be set to false, to avoid the need to check the file modification time, and to avoid the performance impact of unnecessary cache invalidations.

Definition at line 2565 of file DefaultSettings.php.

$wgJpegPixelFormat = 'yuv420'

At default setting of 'yuv420', JPEG thumbnails will use 4:2:0 chroma subsampling to reduce file size, at the cost of possible color fringing at sharp edges.

See https://en.wikipedia.org/wiki/Chroma_subsampling

Supported values: false - use scaling system's default (same as pre-1.27 behavior) 'yuv444' - luma and chroma at same resolution 'yuv422' - chroma at 1/2 resolution horizontally, full vertically 'yuv420' - chroma at 1/2 resolution in both dimensions

This setting is currently supported only for the ImageMagick backend; others may default to 4:2:0 or 4:4:4 or maintaining the source file's sampling in the thumbnail.

Since
1.27

Definition at line 1060 of file DefaultSettings.php.

Referenced by BitmapHandler\transformImageMagick(), and BitmapHandler\transformImageMagickExt().

$wgJpegTran = '/usr/bin/jpegtran'

used for lossless jpeg rotation

Since
1.21

Definition at line 1039 of file DefaultSettings.php.

Referenced by JpegHandler\rotate().

$wgJsMimeType = null

Previously used as content type in HTML script tags.

This is now ignored since HTML5 doesn't require a MIME type for script tags (javascript is the default). It was also previously used by RawAction to determine the ctype query parameter value that will result in a javascript response.

Deprecated:
since 1.22

Definition at line 3145 of file DefaultSettings.php.

Referenced by SkinTemplate\prepareQuickTemplate().

$wgLangObjCacheSize = 10

Language cache size, or really how many languages can we handle simultaneously without degrading to crawl speed.

Definition at line 2814 of file DefaultSettings.php.

Referenced by Language\factory().

$wgLanguageCode = 'en'

Site language code.

See languages/data/Names.php for languages supported by MediaWiki out of the box. Not all languages listed there have translations, see languages/messages/ for the list of languages with some localisation.

Warning: Don't use language codes listed in $wgDummyLanguageCodes like "no" for Norwegian (use "nb" instead), or things will break unexpectedly.

This defines the default interface language for all users, but users can change it in their preferences.

This also defines the language of pages in the wiki. The content is wrapped in a html element with lang=XX attribute. This behavior can be overridden via hooks, see Title::getPageLanguage.

Definition at line 2808 of file DefaultSettings.php.

Referenced by CheckLanguageCLI\__construct(), CliInstaller\__construct(), ContentHandlerTest\dataGetPageLanguage(), ForeignAPIRepo\fetchImageQuery(), MessageCache\figureMessage(), RebuildLocalisationCache\finalSetup(), WebInstaller\getAcceptLanguage(), Language\getFallbacksIncludingSiteLanguage(), ChangesFeed\getFeedObject(), FeedItem\getLanguage(), ResourceLoaderContext\getLanguage(), MessageCache\getMessagePageName(), Title\getPageLanguage(), Parser\getVariableValue(), Xml\languageSelector(), MessageCache\loadFromDB(), HTMLFileCache\loadFromFileCache(), XmlDumpWriter\openStream(), MessageCache\replace(), RequestContext\sanitizeLangCode(), MediaWikiLangTestCase\setUp(), WebInstaller\setupLanguage(), and ResourceFileCache\useFileCache().

$wgLanguageConverterCacheType = CACHE_ANYTHING

The cache type for storing language conversion tables, which are used when parsing certain text and interface messages.

For available types see $wgMainCacheType.

Since
1.20

Definition at line 2235 of file DefaultSettings.php.

Referenced by PHPUnitMaintClass\finalSetup(), and LanguageConverter\loadTables().

$wgLBFactoryConf = [ 'class' => 'LBFactorySimple' ]

Load balancer factory configuration To set up a multi-master wiki farm, set the class here to something that can return a LoadBalancer with an appropriate master on a call to getMainLB().

The class identified here is responsible for reading $wgDBservers, $wgDBserver, etc., so overriding it may cause those globals to be ignored.

The LBFactoryMulti class is provided for this purpose, please see includes/db/LBFactoryMulti.php for configuration information.

Definition at line 1938 of file DefaultSettings.php.

Referenced by LBFactory\disableBackend(), Maintenance\finalSetup(), and LBFactory\singleton().

$wgLegacyEncoding = false

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 a wiki from MediaWiki 1.4 or earlier 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.

Definition at line 2931 of file DefaultSettings.php.

Referenced by Revision\decompressRevisionText().

$wgLegacyJavaScriptGlobals = true

Whether or not to assign configuration variables to the global window object.

If this is set to false, old code using deprecated variables will no longer work.

Example of legacy code:
1 {,js}
2  if ( window.wgRestrictionEdit ) { ... }
or:
1 {,js}
2  if ( wgIsArticle ) { ... }

Instead, one needs to use mw.config.

Example using mw.config global configuration:
1 {,js}
2  if ( mw.config.exists('wgRestrictionEdit') ) { ... }
or:
1 {,js}
2  if ( mw.config.get('wgIsArticle') ) { ... }

Definition at line 3657 of file DefaultSettings.php.

$wgLegacySchemaConversion = false

If set to true, the MediaWiki 1.4 to 1.5 schema conversion will create stub reference rows in the text table instead of copying the full text of all current entries from 'cur' to 'text'.

This will speed up the conversion step for large sites, but requires that the cur table be kept around for those revisions to remain viewable.

This option affects the updaters only. Any present cur stub revisions will be readable at runtime regardless of this setting.

Definition at line 2987 of file DefaultSettings.php.

Referenced by MysqlUpdater\doSchemaRestructuring().

$wgLegalTitleChars = " %!\"$&'()*,\\-.\\/0-9:;=?@A-Z\\\\^_`a-z~\\x80-\\xFF+"

Allowed title characters – regex character class Don't change this unless you know what you're doing.

Problematic punctuation:

  • []{}|# Are needed for link syntax, never enable these
  • <> Causes problems with HTML escaping, don't use
  • % Enabled by default, minor problems with path to query rewrite rules, see below
  • + Enabled by default, but doesn't work with path to query rewrite rules, corrupted by apache
  • ? Enabled by default, but doesn't work with path to PATH_INFO rewrites

All three of these punctuation problems can be avoided by using an alias, instead of a rewrite rule of either variety.

The problem with % is that when using a path to query rewrite rule, URLs are double-unescaped: once by Apache's path conversion code, and again by PHP. So %253F, for example, becomes "?". Our code does not double-escape to compensate for this, indeed double escaping would break if the double-escaped title was passed in the query string rather than the path. This is a minor security issue because articles can be created such that they are hard to view or edit.

In some rare cases you may wish to remove + for compatibility with old links.

Theoretically 0x80-0x9F of ISO 8859-1 should be disallowed, but this breaks interlanguage links

Definition at line 3877 of file DefaultSettings.php.

Referenced by Title\legalChars().

$wgLoadScript = false

The URL path to load.php.

Defaults to "{$wgScriptPath}/load.php".

Since
1.17

Definition at line 210 of file DefaultSettings.php.

$wgLocalDatabases = []

Other wikis on this site, can be administered from a single developer account.

Array numeric key => database name

Definition at line 2025 of file DefaultSettings.php.

Referenced by RebuildMessages\execute(), ClearInterwikiCache\execute(), CleanupSpam\execute(), JobQueueAggregator\findPendingWikiQueues(), LocalIdLookup\isAttached(), and UserRightsProxy\validDatabase().

$wgLocalFileRepo = false

File repository structures.

$wgLocalFileRepo is a single repository structure, and $wgForeignFileRepos is an array of such structures. Each repository structure is an associative array of properties configuring the repository.

Properties required for all repos:

  • class The class name for the repository. May come from the core or an extension. The core repository classes are FileRepo, LocalRepo, ForeignDBRepo. FSRepo is also supported for backwards compatibility.
  • name A unique name for the repository (but $wgLocalFileRepo should be 'local'). The name should consist of alpha-numeric characters.
  • backend A file backend name (see $wgFileBackends).

For most core repos:

  • zones Associative array of zone names that each map to an array with: container : backend container name the zone is in directory : root path within container for the zone url : base URL to the root of the zone urlsByExt : map of file extension types to base URLs (useful for using a different cache for videos) Zones default to using "<repo name>-<zone name>" as the container name and default to using the container root as the zone's root directory. Nesting of zone locations within other zones should be avoided.
  • url Public zone URL. The 'zones' settings take precedence.
  • hashLevels The number of directory levels for hash-based division of files
  • thumbScriptUrl The URL for thumb.php (optional, not recommended)
  • transformVia404 Whether to skip media file transformation on parse and rely on a 404 handler instead.
  • initialCapital Equivalent to $wgCapitalLinks (or $wgCapitalLinkOverrides[NS_FILE], determines whether filenames implicitly start with a capital letter. The current implementation may give incorrect description page links when the local $wgCapitalLinks and initialCapital are mismatched.
  • pathDisclosureProtection May be 'paranoid' to remove all parameters from error messages, 'none' to leave the paths in unchanged, or 'simple' to replace paths with placeholders. Default for LocalRepo is 'simple'.
  • fileMode This allows wikis to set the file mode when uploading/moving files. Default is 0644.
  • directory The local filesystem directory where public files are stored. Not used for some remote repos.
  • thumbDir The base thumbnail directory. Defaults to "<directory>/thumb".
  • thumbUrl The base thumbnail URL. Defaults to "<url>/thumb".
  • isPrivate Set this if measures should always be taken to keep the files private. One should not trust this to assure that the files are not web readable; the server configuration should be done manually depending on the backend.

These settings describe a foreign MediaWiki installation. They are optional, and will be ignored for local repositories:

  • descBaseUrl URL of image description pages, e.g. https://en.wikipedia.org/wiki/File:
  • scriptDirUrl URL of the MediaWiki installation, equivalent to $wgScriptPath, e.g. https://en.wikipedia.org/w
  • scriptExtension Script extension of the MediaWiki installation, equivalent to $wgScriptExtension, e.g. ".php5". Defaults to ".php".
  • articleUrl Equivalent to $wgArticlePath, e.g. https://en.wikipedia.org/wiki/$1
  • fetchDescription Fetch the text of the remote file description page. Equivalent to $wgFetchCommonsDescriptions.
  • abbrvThreshold File names over this size will use the short form of thumbnail names. Short thumbnail names only have the width, parameters, and the extension.

ForeignDBRepo:

  • dbType, dbServer, dbUser, dbPassword, dbName, dbFlags equivalent to the corresponding member of $wgDBservers
  • tablePrefix Table prefix, the foreign wiki's $wgDBprefix
  • hasSharedCache True if the wiki's shared cache is accessible via the local $wgMemc

ForeignAPIRepo:

  • apibase Use for the foreign API's URL
  • apiThumbCacheExpiry How long to locally cache thumbs for

If you leave $wgLocalFileRepo set to false, Setup will fill in appropriate values. Otherwise, set $wgLocalFileRepo to a repository structure as described above. If you set $wgUseInstantCommons to true, it will add an entry for Commons. If you set $wgForeignFileRepos to an array of repository structures, those will be searched after the local file repo. Otherwise, you will only have access to local media files.

See also
Setup.php for an example usage and default initialization.

Definition at line 514 of file DefaultSettings.php.

Referenced by ForeignAPIRepo\__construct(), FileBackendGroup\initFromGlobals(), ParserTest\setUp(), and RepoGroup\singleton().

$wgLocalInterwiki = false

The interwiki prefix of the current wiki, or false if it doesn't have one.

Deprecated:
since 1.23; use $wgLocalInterwikis instead

Definition at line 3884 of file DefaultSettings.php.

$wgLocalInterwikis = []

Array for multiple $wgLocalInterwiki values, in case there are several interwiki prefixes that point to the current wiki.

If $wgLocalInterwiki is set, its value is prepended to this array, for backwards compatibility.

Note, recent changes feeds use only the first entry in this array (or $wgLocalInterwiki, if it is set). See $wgRCFeeds

Definition at line 3894 of file DefaultSettings.php.

Referenced by IRCColourfulRCFeedFormatter\getLine(), Title\getMediaWikiTitleCodec(), and ParserTest\setUp().

$wgLocalisationCacheConf
Initial value:
= [
'class' => 'LocalisationCache'

Localisation cache configuration.

Associative array with keys: class: The class to use. May be overridden by extensions.

store: The location to store cache data. May be 'files', 'array', 'db' or 'detect'. If set to "files", data will be in CDB files. If set to "db", data will be stored to the database. If set to "detect", files will be used if $wgCacheDirectory is set, otherwise the database will be used. "array" is an experimental option that uses PHP files that store static arrays.

storeClass: The class name for the underlying storage. If set to a class name, it overrides the "store" setting.

storeDirectory: If the store class puts its data in files, this is the directory it will use. If this is false, $wgCacheDirectory will be used.

manualRecache: Set this to true to disable cache updates on web requests. Use maintenance/rebuildLocalisationCache.php instead.

Definition at line 2453 of file DefaultSettings.php.

Referenced by UpdateMediaWiki\afterFinalSetup(), RebuildLocalisationCache\execute(), PHPUnitMaintClass\finalSetup(), DumpIterator\finalSetup(), Language\getLocalisationCache(), and DatabaseUpdater\purgeCache().

$wgLocalStylePath = false

The URL path of the skins directory.

Should not point to an external domain. Defaults to "{$wgScriptPath}/skins".

Since
1.17

Definition at line 225 of file DefaultSettings.php.

$wgLocaltimezone = null

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 variable is currently used only for signature formatting and for local time/date parser variables ({{LOCALTIME}} etc.)

Timezones can be translated by editing MediaWiki messages of type timezone-nameinlowercase like timezone-utc.

A list of usable timezones can found at: http://php.net/manual/en/timezones.php

Examples:
1 $wgLocaltimezone = 'UTC';
2 $wgLocaltimezone = 'GMT';
3 $wgLocaltimezone = 'PST8PDT';
4 $wgLocaltimezone = 'Europe/Sweden';
5 $wgLocaltimezone = 'CET';

Definition at line 3113 of file DefaultSettings.php.

Referenced by PHPUnitMaintClass\finalSetup(), and MWTimestamp\getLocalInstance().

$wgLocalTZoffset = null

Set an offset from UTC in minutes to use for the default timezone setting for anonymous users and new user accounts.

This setting is used for most date/time displays in the software, and is overridable in user preferences. It is not used for signature timestamps.

By default, this will be set to match $wgLocaltimezone.

Definition at line 3124 of file DefaultSettings.php.

Referenced by MWTimestamp\offsetForUser(), TitlePermissionTest\testUserBlock(), and Language\userAdjust().

$wgLockManagers = []

Array of configuration arrays for each lock manager.

Each backend configuration has the following parameters:

  • 'name' : A unique name for the lock manager
  • 'class' : The lock manger class to use

See LockManager::__construct() for more details. Additional parameters are specific to the lock manager class used. These settings should be global to all wikis.

Definition at line 639 of file DefaultSettings.php.

Referenced by LockManagerGroup\initFromGlobals(), and ParserTest\setUp().

$wgLoginLanguageSelector = false

Show a bar of language selection links in the user login and user registration forms; edit the "loginlanguagelinks" message to customise these.

Definition at line 3067 of file DefaultSettings.php.

Referenced by LoginSignupSpecialPage\getAuthForm(), LoginSignupSpecialPage\getFakeTemplate(), and LoginSignupSpecialPage\getPageHtml().

$wgLogo = false

The URL path of the wiki logo.

The logo size should be 135x135 pixels. Defaults to "$wgResourceBasePath/resources/assets/wiki.png".

Definition at line 278 of file DefaultSettings.php.

Referenced by Skin\getLogo(), and SkinTemplate\prepareQuickTemplate().

$wgLogoHD = false

Array with URL paths to HD versions of the wiki logo.

The scaled logo size should be under 135x155 pixels. Only 1.5x and 2x versions are supported.

Example:
1 $wgLogoHD = array(
2  "1.5x" => "path/to/1.5x_version.png",
3  "2x" => "path/to/2x_version.png"
4 );
Since
1.25

Definition at line 295 of file DefaultSettings.php.

$wgMainCacheType = CACHE_NONE

Main cache type.

This should be a cache with fast access, but it may have limited space. By default, it is disabled, since the stock database cache is not fast enough to make it worthwhile.

The options are:

  • CACHE_ANYTHING: Use anything, as long as it works
  • CACHE_NONE: Do not cache
  • CACHE_DB: Store cache objects in the DB
  • CACHE_MEMCACHED: MemCached, must specify servers in $wgMemCachedServers
  • CACHE_ACCEL: APC, APCU, XCache or WinCache
  • (other): A string may be used which identifies a cache configuration in $wgObjectCaches.
See also
$wgMessageCacheType, $wgParserCacheType

Definition at line 2202 of file DefaultSettings.php.

$wgMainStash = 'db-replicated'

Main object stash type.

This should be a fast storage system for storing lightweight data like hit counters and user activity. Sites with multiple data-centers should have this use a store that replicates all writes. The store should have enough consistency for CAS operations to be usable. Reads outside of those needed for merge() may be eventually consistent.

The options are:

  • db: Store cache objects in the DB
  • (other): A string may be used which identifies a cache configuration in $wgObjectCaches
Since
1.26

Definition at line 2341 of file DefaultSettings.php.

Referenced by PHPUnitMaintClass\finalSetup(), and ObjectCache\getMainStashInstance().

$wgMainWANCache = false

Main Wide-Area-Network cache type.

This should be a cache with fast access, but it may have limited space. By default, it is disabled, since the basic stock cache is not fast enough to make it worthwhile. For single data-center setups, this can simply be pointed to a cache in $wgWANObjectCaches that uses a local $wgObjectCaches cache with a relayer of type EventRelayerNull.

The options are:

  • false: Configure the cache using $wgMainCacheType, without using a relayer (only matters if there are multiple data-centers)
  • CACHE_NONE: Do not cache
  • (other): A string may be used which identifies a cache configuration in $wgWANObjectCaches
    Since
    1.26

Definition at line 2295 of file DefaultSettings.php.

Referenced by PHPUnitMaintClass\finalSetup(), and ObjectCache\getMainWANInstance().

$wgMangleFlashPolicy = true

When OutputHandler is used, mangle any output that contains <cross-domain-policy>.

Without this, an attacker can send their own cross-domain policy unless it is prevented by the crossdomain.xml file at the domain root.

Since
1.25

Definition at line 3438 of file DefaultSettings.php.

Referenced by wfOutputHandler().

$wgMaxAnimatedGifArea = 1.25e7

Force thumbnailing of animated GIFs above this size to a single frame instead of an animated thumbnail.

As of MW 1.17 this limit is checked against the total size of all frames in the animation. It probably makes sense to keep this equal to $wgMaxImageArea.

Definition at line 1151 of file DefaultSettings.php.

Referenced by GIFHandler\canAnimateThumbnail(), BitmapHandler\transformImageMagick(), and BitmapHandler\transformImageMagickExt().

$wgMaxArticleSize = 2048
$wgMaxImageArea = 1.25e7

The maximum number of pixels a source image can have if it is to be scaled down by a scaler that requires the full source image to be decompressed and stored in decompressed form, before the thumbnail is generated.

This provides a limit on memory usage for the decompression side of the image scaler. The limit is used when scaling PNGs with any of the built-in image scalers, such as ImageMagick or GD. It is ignored for JPEGs with ImageMagick, and when using the VipsScaler extension.

The default is 50 MB if decompressed to RGBA form, which corresponds to 12.5 million pixels or 3500x3500.

Definition at line 1143 of file DefaultSettings.php.

Referenced by TransformationalImageHandler\doTransform(), and TransformationalImageHandler\isImageAreaOkForThumbnaling().

$wgMaxInterlacingAreas = []

Array of max pixel areas for interlacing per MIME type.

Since
1.27

Definition at line 1002 of file DefaultSettings.php.

Referenced by BitmapHandler\normaliseParams(), and BitmapHandler\transformImageMagickExt().

$wgMaxMsgCacheEntrySize = 10000

Maximum entry size in the message cache, in bytes.

Definition at line 3015 of file DefaultSettings.php.

Referenced by MessageCache\loadFromDB(), and MessageCache\replace().

$wgMaxUploadSize = 1024 * 1024 * 100

Max size for uploads, in bytes.

If not set to an array, applies to all uploads. If set to an array, per upload type maximums can be set, using the file and url keys. If the * key is set this value will be used as maximum for non-specified types.

Example:
1 $wgMaxUploadSize = array(
2  '*' => 250 * 1024,
3  'url' => 500 * 1024,
4 );
Sets the maximum for all uploads to 250 kB except for upload-by-url, which will have a maximum of 500 kB.

Definition at line 761 of file DefaultSettings.php.

Referenced by UploadBase\getMaxUploadSize().

$wgMediaHandlers
Initial value:
= [
'image/jpeg' => 'JpegHandler'

Plugins for media file type handling.

Each entry in the array maps a MIME type to a class name

Definition at line 940 of file DefaultSettings.php.

Referenced by MediaHandler\getHandler(), and NewParserTest\setUp().

$wgMemCachedDebug = false

If enabled, will send MemCached debugging information to $wgDebugLogFile.

Definition at line 2392 of file DefaultSettings.php.

$wgMemCachedPersistent = false

Use persistent connections to MemCached, which are shared across multiple requests.

Definition at line 2403 of file DefaultSettings.php.

$wgMemCachedServers = [ '127.0.0.1:11211' ]

The list of MemCached servers and port numbers.

Definition at line 2397 of file DefaultSettings.php.

$wgMemCachedTimeout = 500000

Read/write timeout for MemCached server communication, in microseconds.

Definition at line 2408 of file DefaultSettings.php.

Referenced by McTest\execute().

$wgMemoryLimit = "50M"

The minimum amount of memory that MediaWiki "needs"; MediaWiki will try to raise PHP's memory limit if it's below this amount.

Definition at line 2158 of file DefaultSettings.php.

$wgMessageCacheType = CACHE_ANYTHING

The cache type for storing the contents of the MediaWiki namespace.

This cache is used for a small amount of data which is expensive to regenerate.

For available types see $wgMainCacheType.

Definition at line 2210 of file DefaultSettings.php.

Referenced by PHPUnitMaintClass\finalSetup(), ObjectCache\newAnything(), and ParserTest\setUp().

$wgMetaNamespace = false

Name of the project namespace.

If left set to false, $wgSitename will be used instead.

Definition at line 3783 of file DefaultSettings.php.

Referenced by Language\fixVariableInNamespace(), Language\getNamespaces(), ApiQueryTest\testTitlesGetNormalized(), and wfInstallerMain().

$wgMetaNamespaceTalk = false

Name of the project talk namespace.

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.

Definition at line 3792 of file DefaultSettings.php.

Referenced by Language\getNamespaces().

$wgMimeDetectorCommand = null

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, PHP's fileinfo extension will be used if available.

Example:
1 #$wgMimeDetectorCommand = "file -bi"; # use external MIME detector (Linux)

Definition at line 1308 of file DefaultSettings.php.

$wgMimeInfoFile = 'includes/mime.info'

Sets the MIME type info file to use by MimeMagic.php.

Set to null, to use built-in defaults only.

Definition at line 1295 of file DefaultSettings.php.

$wgMimeType = 'text/html'
$wgMimeTypeBlacklist
Initial value:
= [
# HTML may contain cookie-stealing JavaScript and web bugs
'text/html', 'text/javascript', 'text/x-javascript', 'application/x-shellscript',
# PHP scripts may execute arbitrary code on the server
'application/x-php', 'text/x-php',
# Other types that may be interpreted by some servers
'text/x-python', 'text/x-perl', 'text/x-bash', 'text/x-sh', 'text/x-csh',
# Client-side hazards on Internet Explorer
'text/scriptlet', 'application/x-msdownload',
# Windows metafile, client-side vulnerability on some systems
'application/x-msmetafile',
]

Files with these MIME types will never be allowed as uploads if $wgVerifyMimeType is enabled.

Definition at line 869 of file DefaultSettings.php.

Referenced by StreamFile\contentTypeFromPath(), and UploadBase\verifyMimeType().

$wgMimeTypeFile = 'includes/mime.types'

Sets the MIME type definition file to use by MimeMagic.php.

Set to null, to use built-in defaults only. example: $wgMimeTypeFile = '/etc/mime.types';

Definition at line 1289 of file DefaultSettings.php.

$wgMinUploadChunkSize = 1024

Minimum upload chunk size, in bytes.

When using chunked upload, non-final chunks smaller than this will be rejected. May be reduced based on the 'upload_max_filesize' or 'post_max_size' PHP settings.

Since
1.26

Definition at line 769 of file DefaultSettings.php.

$wgMsgCacheExpiry = 86400

Expiry time for the message cache key.

Definition at line 3010 of file DefaultSettings.php.

Referenced by MessageCache\singleton().

$wgNamespaceAliases = []

Namespace aliases.

These are alternate names for the primary localised namespace names, which are defined by $wgExtraNamespaces and the language file. If a page is requested with such a prefix, the request will be redirected to the primary name.

Set this to a map from namespace names to IDs.

Example:
1 $wgNamespaceAliases = array(
2  'Wikipedian' => NS_USER,
3  'Help' => 100,
4 );

Definition at line 3848 of file DefaultSettings.php.

Referenced by NamespaceConflictChecker\checkAll(), Language\getNamespaceIds(), UploadFromUrlTestSuite\setUp(), NewParserTest\setUp(), ParserTest\setUp(), and NewParserTest\tearDown().

$wgNamespacesWithSubpages
Initial value:
= [
NS_TALK => true
const NS_TALK
Definition: Defines.php:70

Which namespaces should support subpages? See Language.php for a list of namespaces.

Definition at line 3999 of file DefaultSettings.php.

Referenced by MWNamespace\hasSubpages(), and MWNamespaceTest\testHasSubpages().

$wgNewPasswordExpiry = 3600 * 24 * 7

The time, in seconds, when an emailed temporary password expires.

Definition at line 1596 of file DefaultSettings.php.

$wgNoReplyAddress = false

Reply-To address for e-mail notifications.

Defaults to $wgPasswordSender.

Definition at line 1562 of file DefaultSettings.php.

Referenced by EmailNotification\composeCommonMailtext().

$wgObjectCaches
Initial value:
= [
CACHE_NONE => [ 'class' => 'EmptyBagOStuff'
const CACHE_NONE
Definition: Defines.php:102

Advanced object cache configuration.

Use this to define the class names and constructor parameters which are used for the various cache types. Custom cache types may be defined here and referenced from $wgMainCacheType, $wgMessageCacheType, $wgParserCacheType, or $wgLanguageConverterCacheType.

The format is an associative array where the key is a cache identifier, and the value is an associative array of parameters. The "class" parameter is the class name which will be used. Alternatively, a "factory" parameter may be given, giving a callable function which will generate a suitable cache object.

Definition at line 2250 of file DefaultSettings.php.

Referenced by McTest\execute(), and ObjectCache\newFromId().

$wgObjectCacheSessionExpiry = 3600

The expiry time to use for session storage, in seconds.

Definition at line 2364 of file DefaultSettings.php.

$wgParserCacheExpireTime = 86400

The expiry time for the parser cache, in seconds.

The default is 86400 (one day).

Definition at line 2347 of file DefaultSettings.php.

Referenced by PurgeParserCache\execute(), CacheTime\getCacheExpiry(), and ParserOutput\hasDynamicContent().

$wgParserCacheType = CACHE_ANYTHING

The cache type for storing article HTML.

This is used to store data which is expensive to regenerate, and benefits from having plenty of storage space.

For available types see $wgMainCacheType.

Definition at line 2218 of file DefaultSettings.php.

Referenced by PHPUnitMaintClass\finalSetup(), ObjectCache\newAnything(), UploadFromUrlTestSuite\setUp(), and ParserTest\setUp().

$wgPasswordExpirationDays = false

The number of days that a user's password is good for.

After this number of days, the user will be asked to reset their password. Set to false to disable password expiration.

Definition at line 1607 of file DefaultSettings.php.

$wgPasswordExpireGrace = 3600 * 24 * 7

If a user's password is expired, the number of seconds when they can still login, and cancel their password change, but are sent to the password change form on each login.

Definition at line 1613 of file DefaultSettings.php.

$wgPasswordReminderResendTime = 24

Minimum time, in hours, which must elapse between password reminder emails for a given account.

This is to prevent abuse by mail flooding.

Definition at line 1591 of file DefaultSettings.php.

$wgPasswordSender = false

Sender email address for e-mail notifications.

The address we use as sender when a user requests a password reminder.

Defaults to "apache@$wgServerName".

Definition at line 1548 of file DefaultSettings.php.

Referenced by EmailNotification\composeCommonMailtext(), and User\sendMail().

$wgPasswordSenderName = 'MediaWiki Mail'

Sender name for e-mail notifications.

Deprecated:
since 1.23; use the system message 'emailsender' instead.

Definition at line 1555 of file DefaultSettings.php.

string $wgPHPSessionHandling = 'enable'

Whether to use PHP session handling ($_SESSION and session_*() functions)

If the constant MW_NO_SESSION is defined, this is forced to 'disable'.

If the constant MW_NO_SESSION_HANDLER is defined, this is ignored and PHP session handling will function independently of SessionHandler. SessionHandler and PHP's session handling may attempt to override each others' cookies.

Since
1.27
  • 'enable': Integrate with PHP's session handling as much as possible.
  • 'warn': Integrate but log warnings if anything changes $_SESSION.
  • 'disable': Throw exceptions if PHP session handling is used.

Definition at line 2387 of file DefaultSettings.php.

$wgQueryCacheLimit = 1000

Number of rows to cache in 'querycache' table when miser mode is on.

Definition at line 2132 of file DefaultSettings.php.

Referenced by UpdateSpecialPages\execute().

$wgRedirectSources = false

If local interwikis are set up which allow redirects, set this regexp to restrict URLs which will be displayed as 'redirected from' links.

Example:
It might look something like this:
1 $wgRedirectSources = '!^https?://[a-z-]+\\.wikipedia\\.org/!';

Leave at false to avoid displaying any incoming redirect markers. This does not affect intra-wiki redirects, which don't change the URL.

Definition at line 3968 of file DefaultSettings.php.

Referenced by Article\showRedirectedFromHeader().

$wgReferrerPolicy = false

Value for the referrer policy meta tag.

One of 'never', 'default', 'origin', 'always'. Setting it to false just prevents the meta tag from being output. See http://www.w3.org/TR/referrer-policy/ for details.

Since
1.25

Definition at line 318 of file DefaultSettings.php.

$wgRenderHashAppend = ''

Append a configured value to the parser cache and the sitenotice key so that they can be kept separate for some class of activity.

Definition at line 2516 of file DefaultSettings.php.

Referenced by ChangesFeed\execute(), Skin\getCachedNotice(), and ParserOptions\optionsHash().

$wgRepositoryBaseUrl = "https://commons.wikimedia.org/wiki/File:"

Base URL for a repository wiki.

Leave this blank if uploads are just stored in a shared directory and not meant to be accessible through a separate wiki. Otherwise the image description pages on the local wiki will link to the image description page on this wiki.

Please specify the namespace, as in the example below.

Definition at line 838 of file DefaultSettings.php.

$wgResourceBasePath = null

The default 'remoteBasePath' value for instances of ResourceLoaderFileModule.

Defaults to $wgScriptPath.

Definition at line 3572 of file DefaultSettings.php.

Referenced by ResourceLoaderFileModule\extractBasePaths(), Skin\getPoweredBy(), File\iconThumb(), and ParserTest\setUp().

$wgResourceLoaderDebug = false

The default debug mode (on/off) for of ResourceLoader requests.

This will still be overridden when the debug URL parameter is used.

Definition at line 3606 of file DefaultSettings.php.

$wgResourceLoaderLESSImportPaths
Initial value:
= [
"$IP/resources/src/mediawiki.less/",
]

Default import paths for LESS modules.

LESS files referenced in statements will be looked up here first, and relative to the importing file second. To avoid collisions, it's important for the LESS files in these directories to have a common, predictable file name prefix.

Extensions need not (and should not) register paths in $wgResourceLoaderLESSImportPaths. The import path includes the path of the currently compiling LESS file, which allows each extension to freely import files from its own tree.

Since
1.22

Definition at line 3739 of file DefaultSettings.php.

$wgResourceLoaderLESSVars
Initial value:
= [
'deviceWidthTablet' => '720px'

Global LESS variables.

An associative array binding variable names to LESS code snippets representing their values.

Adding an item here is equivalent to writing @variable: value; at the beginning of all your .less files, with all the consequences. In particular, string values must be escaped and quoted.

Changes to LESS variables do not trigger cache invalidation.

If the LESS variables need to be dynamic, you can use the ResourceLoaderGetLessVars hook (since 1.25).

Example:
1 $wgResourceLoaderLESSVars = array(
2  'baseFontSize' => '1em',
3  'smallFontSize' => '0.75em',
4  'WikimediaBlue' => '#006699',
5 );
Since
1.22

Definition at line 3716 of file DefaultSettings.php.

$wgResourceLoaderMaxage
Initial value:
= [
'versioned' => [
'server' => 30 * 24 * 60 * 60

Maximum time in seconds to cache resources served by ResourceLoader.

Used to set last modified headers (max-age/s-maxage).

Following options to distinguish:

  • versioned: Used for modules with a version, because changing version numbers causes cache misses. This normally has a long expiry time.
  • unversioned: Used for modules without a version to propagate changes quickly to clients. Also used for modules with errors to recover quickly. This normally has a short expiry time.

Expiry time for the options to distinguish:

  • server: Squid/Varnish but also any other public proxy cache between the client and MediaWiki.
  • client: On the client side (e.g. in the browser cache).

Definition at line 3590 of file DefaultSettings.php.

$wgResourceLoaderMaxQueryLength = false

If set to a positive number, ResourceLoader will not generate URLs whose query string is more than this many characters long, and will instead use multiple requests with shorter query strings.

This degrades performance, but may be needed if your web server has a low (less than, say 1024) query string length limit or a low value for suhosin.get.max_value_length that you can't increase.

If set to a negative number, ResourceLoader will assume there is no query string length limit.

Defaults to a value based on php configuration.

Definition at line 3672 of file DefaultSettings.php.

$wgResourceLoaderMinifierMaxLineLength = 1000

Maximum line length when minifying JavaScript.

This is not a hard maximum: the minifier will try not to produce lines longer than this, but may be forced to do so in certain cases.

Deprecated:
since 1.27: Always 1,000; no longer configurable.

Definition at line 3623 of file DefaultSettings.php.

$wgResourceLoaderMinifierStatementsOnOwnLine = false

Put each statement on its own line when minifying JavaScript.

This makes debugging in non-debug mode a bit easier.

Deprecated:
since 1.27: Always false; no longer configurable.

Definition at line 3614 of file DefaultSettings.php.

$wgResourceLoaderSources = []

Extensions should register foreign module sources here.

'local' is a built-in source that is not in this array, but defined by ResourceLoader::__construct() so that it cannot be unset.

Example:
1 $wgResourceLoaderSources['foo'] = 'http://example.org/w/load.php';

Definition at line 3566 of file DefaultSettings.php.

$wgResourceLoaderStorageEnabled = false

Whether ResourceLoader should attempt to persist modules in localStorage on browsers that support the Web Storage API.

Since
1.23 - Client-side module persistence is experimental. Exercise care.

Definition at line 3749 of file DefaultSettings.php.

$wgResourceLoaderStorageVersion = 1

Cache version for client-side ResourceLoader module storage.

You can trigger invalidation of the contents of the module store by incrementing this value.

Since
1.23

Definition at line 3757 of file DefaultSettings.php.

$wgResourceLoaderValidateJS = true

If set to true, JavaScript modules loaded from wiki pages will be parsed prior to minification to validate it.

Parse errors will result in a JS exception being thrown during module load, which avoids breaking other modules loaded in the same request.

Definition at line 3681 of file DefaultSettings.php.

$wgResourceLoaderValidateStaticJS = false

If set to true, statically-sourced (file-backed) JavaScript resources will be parsed for validity before being bundled up into ResourceLoader modules.

This can be helpful for development by providing better error messages in default (non-debug) mode, but JavaScript parsing is slow and memory hungry and may fail on large pre-bundled frameworks.

Definition at line 3691 of file DefaultSettings.php.

$wgResourceModules = []

Client-side resource modules.

Extensions should add their ResourceLoader module definitions to the $wgResourceModules variable.

Example:
1 $wgResourceModules['ext.myExtension'] = array(
2  'scripts' => 'myExtension.js',
3  'styles' => 'myExtension.css',
4  'dependencies' => array( 'jquery.cookie', 'jquery.tabIndex' ),
5  'localBasePath' => __DIR__,
6  'remoteExtPath' => 'MyExtension',
7 );

Definition at line 3464 of file DefaultSettings.php.

$wgResourceModuleSkinStyles = []

Skin-specific styles for resource modules.

These are later added to the 'skinStyles' list of the existing module. The 'styles' list can not be modified or disabled.

For example, here is a module "bar" and how skin Foo would provide additional styles for it.

Example:
1 $wgResourceModules['bar'] = array(
2  'scripts' => 'resources/bar/bar.js',
3  'styles' => 'resources/bar/main.css',
4 );
5 
6 $wgResourceModuleSkinStyles['foo'] = array(
7  'bar' => 'skins/Foo/bar.css',
8 );

This is mostly equivalent to:

Equivalent:
1 $wgResourceModules['bar'] = array(
2  'scripts' => 'resources/bar/bar.js',
3  'styles' => 'resources/bar/main.css',
4  'skinStyles' => array(
5  'foo' => skins/Foo/bar.css',
6  ),
7 );

If the module already defines its own entry in skinStyles for a given skin, then $wgResourceModuleSkinStyles is ignored.

If a module defines a `skinStyles['default']the skin may want to extend that instead of replacing them. This can be done using the+` prefix.

Example:
1 $wgResourceModules['bar'] = array(
2  'scripts' => 'resources/bar/bar.js',
3  'styles' => 'resources/bar/basic.css',
4  'skinStyles' => array(
5  'default' => 'resources/bar/additional.css',
6  ),
7 );
8 // Note the '+' character:
9 $wgResourceModuleSkinStyles['foo'] = array(
10  '+bar' => 'skins/Foo/bar.css',
11 );

This is mostly equivalent to:

Equivalent:
1 $wgResourceModules['bar'] = array(
2  'scripts' => 'resources/bar/bar.js',
3  'styles' => 'resources/bar/basic.css',
4  'skinStyles' => array(
5  'default' => 'resources/bar/additional.css',
6  'foo' => array(
7  'resources/bar/additional.css',
8  'skins/Foo/bar.css',
9  ),
10  ),
11 );

In other words, as a module author, use the styles list for stylesheets that may not be disabled by a skin. To provide default styles that may be extended or replaced, use `skinStyles['default']`.

As with $wgResourceModules, paths default to being relative to the MediaWiki root. You should always provide a localBasePath and remoteBasePath (or remoteExtPath/remoteSkinPath).

Example:
1 $wgResourceModuleSkinStyles['foo'] = array(
2  'bar' => 'bar.css',
3  'quux' => 'quux.css',
4  'remoteSkinPath' => 'Foo',
5  'localBasePath' => __DIR__,
6 );

Definition at line 3554 of file DefaultSettings.php.

$wgResponsiveImages = true

Generate and use thumbnails suitable for screens with 1.5 and 2.0 pixel densities.

This means a 320x240 use of an image on the wiki will also generate 480x360 and 640x480 thumbnails, output via the srcset attribute.

On older browsers, a JavaScript polyfill switches the appropriate images in after loading the original low-resolution versions depending on the reported window.devicePixelRatio. The polyfill can be found in the jquery.hidpi module.

Definition at line 1469 of file DefaultSettings.php.

Referenced by Linker\processResponsiveImages().

$wgRevisionCacheExpiry = 0

Revision text may be cached in $wgMemc to reduce load on external storage servers and object extraction overhead for frequently-loaded revisions.

Set to 0 to disable, or number of seconds before cache expiry.

Definition at line 2110 of file DefaultSettings.php.

Referenced by Revision\loadText().

$wgScriptExtension = '.php'

The extension to append to script names by default.

Some hosting providers used PHP 4 for *.php files, and PHP 5 for *.php5. This variable was provided to support those providers.

Since
1.11
Deprecated:
since 1.25; support for '.php5' has been phased out of MediaWiki proper. Backward-compatibility can be maintained by configuring your web server to rewrite URLs. See RELEASE-NOTES for details.

Definition at line 175 of file DefaultSettings.php.

$wgScriptPath = '/wiki'

The path we should point to.

It might be a virtual path in case with use apache mod_rewrite for example.

This needs to be set correctly.

Other paths will be set to defaults based on it unless they are directly set in LocalSettings.php

Definition at line 141 of file DefaultSettings.php.

Referenced by SpecialVersion\getEntryPointInfo(), MachineReadableRCFeedFormatter\getLine(), Parser\getVariableValue(), SkinTemplate\prepareQuickTemplate(), ParserTest\setUp(), and ApiLoginTest\testApiLoginGotCookie().

$wgSearchType = null

Search type.

Leave as null to select the default search engine for the selected database type (eg SearchMySQL), or set to a class name to override to a custom search engine.

Definition at line 1787 of file DefaultSettings.php.

$wgSearchTypeAlternatives = null

Alternative search types Sometimes you want to support multiple search engines for testing.

This allows users to select their search engine of choice via url parameters to Special:Search and the action=search API. If using this, there's no need to add $wgSearchType to it, that is handled automatically.

Definition at line 1796 of file DefaultSettings.php.

$wgSend404Code = true

Some web hosts attempt to rewrite all responses with a 404 (not found) status code, mangling or hiding MediaWiki's output.

If you are using such a host, you should start looking for a better one. While you're doing that, set this to false to convert some of MediaWiki's 404 responses to 200 so that the generated error pages can be seen.

In cases where for technical reasons it is more important for MediaWiki to send the correct status code than for the body to be transmitted intact, this configuration variable is ignored.

Definition at line 3409 of file DefaultSettings.php.

Referenced by SpecialPageFactory\executePath(), ImagePage\openShowImage(), and Article\showMissingArticle().

$wgServer = WebRequest::detectServer()

URL of the server.

Example:
1 $wgServer = 'http://example.com';

This is usually detected correctly by MediaWiki. If MediaWiki detects the wrong server, it will redirect incorrectly after you save a page. In that case, set this variable to fix it.

If you want to use protocol-relative URLs on your wiki, set this to a protocol-relative URL like '//example.com' and set $wgCanonicalServer to a fully qualified URL.

Definition at line 109 of file DefaultSettings.php.

Referenced by ParserOutput\addExternalLink(), DeleteSelfExternals\execute(), Maintenance\finalSetup(), Title\getInternalURL(), Title\getLocalURL(), Parser\getVariableValue(), UserMailer\makeMsgId(), SkinTemplate\prepareQuickTemplate(), BenchmarkPurge\randomUrl(), ApiTestCase\setUp(), ApiLoginTest\testApiLoginBadPass(), ApiLoginTest\testApiLoginGoodPass(), ApiLoginTest\testApiLoginGotCookie(), and ApiLoginTest\testBotPassword().

$wgServerName = false

Server name.

This is automatically computed by parsing the bare hostname out of $wgCanonicalServer. It should not be customized.

Since
1.24

Definition at line 125 of file DefaultSettings.php.

Referenced by MachineReadableRCFeedFormatter\getLine(), and Parser\getVariableValue().

$wgSessionCacheType = CACHE_ANYTHING

The cache type for storing session data.

For available types see $wgMainCacheType.

Definition at line 2225 of file DefaultSettings.php.

Referenced by PHPUnitMaintClass\finalSetup().

$wgSessionHandler = null
Deprecated:
since 1.27, MediaWiki\Session\SessionManager doesn't use PHP session storage.

Definition at line 2369 of file DefaultSettings.php.

$wgSessionsInMemcached = true

Deprecated alias for $wgSessionsInObjectCache.

Deprecated:
since 1.20; Use $wgSessionsInObjectCache

Definition at line 2354 of file DefaultSettings.php.

$wgSessionsInObjectCache = true
Deprecated:
since 1.27, session data is always stored in object cache.

Definition at line 2359 of file DefaultSettings.php.

$wgSharedDB = null

Shared database for multiple wikis.

Commonly used for storing a user table for single sign-on. The server for this database must be the same as for the main database.

For backwards compatibility the shared prefix is set to the same as the local prefix, and the user table is listed in the default list of shared tables. The user_properties table is also added so that users will continue to have their preferences shared (preferences were stored in the user table prior to 1.16)

$wgSharedTables may be customized with a list of tables to share in the shared database. However it is advised to limit what tables you do share as many of MediaWiki's tables may have side effects if you try to share them.

$wgSharedPrefix is the table prefix for the shared database. It defaults to $wgDBprefix.

$wgSharedSchema is the table schema for the shared database. It defaults to $wgDBmwschema.

Deprecated:
since 1.21 In new code, use the $wiki parameter to wfGetLB() to access remote databases. Using wfGetLB() allows the shared database to reside on separate servers to the wiki's own database, with suitable configuration of $wgLBFactoryConf.

Definition at line 1858 of file DefaultSettings.php.

Referenced by DatabaseSqlite\__construct(), CloneDatabase\cloneTableStructure(), DatabaseUpdater\doTable(), AlterSharedConstraints\execute(), DatabaseTest\getSharedTableName(), LocalIdLookup\isAttached(), UserRightsProxy\newFromLookup(), and DatabaseBase\tableName().

$wgSharedSchema = false
See also
$wgSharedDB
Since
1.23

Definition at line 1874 of file DefaultSettings.php.

Referenced by DatabaseBase\tableName().

$wgSharedThumbnailScriptPath = false
See also
$wgThumbnailScriptPath

Definition at line 806 of file DefaultSettings.php.

$wgSharedUploadDBname = false

DB name with metadata about shared directory.

Set this to false if the uploads do not come from a wiki.

Definition at line 695 of file DefaultSettings.php.

$wgSharedUploadDBprefix = ''

Optional table prefix used in database.

Definition at line 700 of file DefaultSettings.php.

$wgSharedUploadDirectory = "/var/www/wiki3/images"

Path on the file system where shared uploads can be found.

Definition at line 689 of file DefaultSettings.php.

$wgSharedUploadPath = "http://commons.wikimedia.org/shared/images"

Full path on the web server where shared uploads can be found.

Definition at line 679 of file DefaultSettings.php.

$wgSharpenParameter = '0x0.4'

Sharpening parameter to ImageMagick.

Definition at line 1007 of file DefaultSettings.php.

Referenced by BitmapHandler\transformImageMagick(), and BitmapHandler\transformImageMagickExt().

$wgSharpenReductionThreshold = 0.85

Reduction in linear dimensions below which sharpening will be enabled.

Definition at line 1012 of file DefaultSettings.php.

Referenced by BitmapHandler\transformImageMagick(), and BitmapHandler\transformImageMagickExt().

$wgShowArchiveThumbnails = true

Show thumbnails for old images on the image description page.

Definition at line 1209 of file DefaultSettings.php.

Referenced by ImageHistoryList\__construct().

$wgShowEXIF = function_exists( 'exif_read_data' )

Show Exif data, on by default if available.

Requires PHP's Exif extension: http://www.php.net/manual/en/ref.exif.php

Note
FOR WINDOWS USERS: To enable Exif functions, add the following line to the "Windows extensions" section of php.ini:
1 extension=extensions/php_exif.dll

Definition at line 652 of file DefaultSettings.php.

Referenced by BitmapMetadataHandler\getExif(), TiffHandler\getMetadata(), ExifBitmapHandler\isMetadataValid(), and ImagePage\view().

$wgShowRollbackEditCount = 10

The $wgShowRollbackEditCount variable is used to show how many edits can be rolled back.

The numeric value of the variable controls how many edits MediaWiki will look back to determine whether a rollback is allowed (by checking that they are all from the same author). If the value is false or 0, the edits are not counted. Disabling this will prevent MediaWiki from hiding some useless rollback links.

Since
1.20

Definition at line 3420 of file DefaultSettings.php.

Referenced by Linker\buildRollbackLink(), and Linker\getRollbackEditCount().

$wgSidebarCacheExpiry = 86400

Expiry time for the sidebar cache, in seconds.

Definition at line 2532 of file DefaultSettings.php.

Referenced by Skin\buildSidebar().

$wgSiteNotice = ''

Site notice shown at the top of each page.

MediaWiki:Sitenotice page, which will override this. You can also provide a separate message for logged-out users using the MediaWiki:Anonnotice page.

Definition at line 3215 of file DefaultSettings.php.

Referenced by Skin\getCachedNotice().

$wgSitesCacheFile = false

Specify the file location for the Sites json cache file.

Definition at line 3949 of file DefaultSettings.php.

$wgSiteSupportPage = ''

If this is set, a "donate" link will appear in the sidebar.

Set it to a URL.

Definition at line 3220 of file DefaultSettings.php.

$wgSkipSkin = ''
Deprecated:
since 1.23; use $wgSkipSkins instead

Definition at line 3251 of file DefaultSettings.php.

$wgSkipSkins = []

Specify the names of skins that should not be presented in the list of available skins in user preferences.

If you want to remove a skin entirely, remove it from the skins/ directory and its entry from LocalSettings.php.

Definition at line 3246 of file DefaultSettings.php.

Referenced by Skin\getAllowedSkins().

$wgSlaveLagCritical = 30
See also
$wgSlaveLagWarning

Definition at line 2037 of file DefaultSettings.php.

$wgSlaveLagWarning = 10

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

If the lag is higher than $wgSlaveLagCritical, show a more obvious warning.

Definition at line 2032 of file DefaultSettings.php.

$wgSMTP = false

SMTP Mode.

For using a direct (authenticated) SMTP server connection. Default to false or fill an array :

1 $wgSMTP = array(
2  'host' => 'SMTP domain',
3  'IDHost' => 'domain for MessageID',
4  'port' => '25',
5  'auth' => [true|false],
6  'username' => [SMTP username],
7  'password' => [SMTP password],
8 );

Definition at line 1632 of file DefaultSettings.php.

Referenced by UserMailer\makeMsgId(), and UserMailer\sendInternal().

$wgSQLiteDataDir = ''

To override default SQLite data directory ($docroot/../data)

Definition at line 1824 of file DefaultSettings.php.

Referenced by DatabaseSqlite\__construct(), SqliteInstaller\openConnection(), and SqliteInstaller\setupDatabase().

$wgSQLMode = ''

SQL Mode - default is turning off all modes, including strict, if set.

null can be used to skip the setting for performance reasons and assume DBA has done his best job. String override can be used for some additional fun :-)

Definition at line 1814 of file DefaultSettings.php.

Referenced by DatabaseMysqlBase\open().

$wgSquidMaxage = 18000

Cache TTL for the CDN sent as s-maxage (without ESI) or Surrogate-Control (with ESI).

Without ESI, you should strip out s-maxage in the CDN config.

18000 seconds = 5 hours, more cache hits with 2678400 = 31 days.

Definition at line 2644 of file DefaultSettings.php.

Referenced by Skin\getDynamicStylesheetQuery().

$wgSquidPurgeUseHostHeader = true

Whether to use a Host header in purge requests sent to the proxy servers configured in $wgSquidServers.

Set this to false to support Squid configured in forward-proxy mode.

If this is set to true, a Host header will be sent, and only the path component of the URL will appear on the request line, as if the request were a non-proxy HTTP 1.1 request. Varnish only supports this style of request. Squid supports this style of request only if reverse-proxy mode (http_port ... accel) is enabled.

If this is set to false, no Host header will be sent, and the absolute URL will be sent in the request line, as is the standard for an HTTP proxy request in both HTTP 1.0 and 1.1. This style of request is not supported by Varnish, but is supported by Squid in either configuration (forward or reverse).

Since
1.21

Definition at line 2720 of file DefaultSettings.php.

Referenced by SquidPurgeClient\queuePurge().

$wgSquidServers = []

List of proxy servers to purge on changes; default port is 80.

Use IP addresses.

When MediaWiki is running behind a proxy, it will trust X-Forwarded-For headers sent/modified from these proxies when obtaining the remote IP address

For a list of trusted servers which aren't purged, see $wgSquidServersNoPurge.

Definition at line 2691 of file DefaultSettings.php.

Referenced by BenchmarkPurge\execute(), and CdnCacheUpdate\purge().

$wgSquidServersNoPurge = []

As above, except these servers aren't purged on page changes; use to set a list of trusted proxies, etc.

Supports both individual IP addresses and CIDR blocks.

Since
1.23 Supports CIDR ranges

Definition at line 2699 of file DefaultSettings.php.

$wgStrictFileExtensions = true

If this is turned off, users may override the warning for files not covered by $wgFileExtensions.

Warning
Setting this to false is insecure for public wikis.

Definition at line 902 of file DefaultSettings.php.

Referenced by StreamFile\contentTypeFromPath(), and UploadBase\getTitle().

$wgStyleDirectory = "{$IP}/skins"

Filesystem stylesheets directory.

Defaults to "{$IP}/skins".

Since
1.3

Definition at line 246 of file DefaultSettings.php.

Referenced by WebInstallerOutput\getCSS(), Installer\getExistingLocalSettings(), UploadFromUrlTestSuite\setUp(), and ParserTest\setUp().

$wgStylePath = false

The URL path of the skins directory.

Defaults to "{$wgResourceBasePath}/skins".

Since
1.3

Definition at line 217 of file DefaultSettings.php.

Referenced by ResourceLoaderFileModule\extractBasePaths(), Skin\getSkinStylePath(), Parser\getVariableValue(), SkinTemplate\prepareQuickTemplate(), and ParserTest\setUp().

$wgStyleSheetPath = &$wgStylePath

The URL path to index.php.

Defaults to "{$wgScriptPath}/index.php".

Definition at line 218 of file DefaultSettings.php.

$wgStyleVersion = '303'

Bump this number when changing the global style sheets and JavaScript.

It should be appended in the query string of static CSS and JS includes, to ensure that client-side caches do not keep obsolete copies of global styles.

Definition at line 2489 of file DefaultSettings.php.

Referenced by Skin\getSkinStylePath().

$wgSVGConverter = 'ImageMagick'

Pick a converter defined in $wgSVGConverters.

Definition at line 1099 of file DefaultSettings.php.

Referenced by SvgHandler\isEnabled(), SvgHandler\rasterize(), and ResourceLoaderImage\rasterize().

$wgSVGConverterPath = ''

If not in the executable PATH, specify the SVG converter path.

Definition at line 1104 of file DefaultSettings.php.

Referenced by SvgHandler\rasterize(), and ResourceLoaderImage\rasterize().

$wgSVGConverters
Initial value:
= [
'ImageMagick' =>
'$path/convert -background "#ffffff00" -thumbnail $widthx$height\! $input PNG:$output'

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. If set to an array, the first item is a PHP callable and any further items are passed as parameters after $srcPath, $dstPath, $width, $height

Definition at line 1084 of file DefaultSettings.php.

Referenced by SvgHandler\isEnabled(), and SvgHandler\rasterize().

$wgSVGMaxSize = 5120

Don't scale a SVG larger than this.

Definition at line 1109 of file DefaultSettings.php.

Referenced by Linker\makeImageLink(), SvgHandler\normaliseParams(), and ImagePage\openShowImage().

$wgSVGMetadataCutoff = 262144

Don't read SVG metadata beyond this point.

Default is 1024*256 bytes

Definition at line 1115 of file DefaultSettings.php.

Referenced by SVGReader\__construct(), and UploadBase\checkXMLEncodingMissmatch().

$wgThumbLimits
Initial value:
= [
120,
150,
180,
200,
250,
300
]

Adjust thumbnails on image pages according to a user setting.

In order to reduce disk usage, the values can only be selected from a list. This is the list of settings the user can choose from:

Definition at line 1350 of file DefaultSettings.php.

Referenced by Linker\makeImageLink().

$wgThumbnailBuckets = null

When defined, is an array of image widths used as buckets for thumbnail generation.

The goal is to save resources by generating thumbnails based on reference buckets instead of always using the original. This will incur a speed gain but cause a quality loss.

The buckets generation is chained, with each bucket generated based on the above bucket when possible. File handlers have to opt into using that feature. For now only BitmapHandler supports it.

Definition at line 1368 of file DefaultSettings.php.

Referenced by File\getThumbnailBucket().

$wgThumbnailEpoch = '20030516000000'

If rendered thumbnail files are older than this timestamp, they will be rerendered on demand as if the file didn't already exist.

Update if there is some need to force thumbs and SVG rasterizations to rerender, such as fixes to rendering bugs.

Definition at line 1174 of file DefaultSettings.php.

Referenced by File\transform().

$wgThumbnailMinimumBucketDistance = 50

When using thumbnail buckets as defined above, this sets the minimum distance to the bucket above the requested size.

The distance represents how many extra pixels of width the bucket needs in order to be used as the reference for a given thumbnail. For example, with the following buckets:

$wgThumbnailBuckets = array ( 128, 256, 512 );

and a distance of 50:

$wgThumbnailMinimumBucketDistance = 50;

If we want to render a thumbnail of width 220px, the 512px bucket will be used, because 220 + 50 = 270 and the closest bucket bigger than 270px is 512.

Definition at line 1385 of file DefaultSettings.php.

Referenced by File\getThumbnailBucket().

$wgThumbnailScriptPath = false

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:
1 $wgThumbnailScriptPath = "{$wgScriptPath}/thumb.php";

Definition at line 801 of file DefaultSettings.php.

Referenced by ParserTest\setUp().

$wgThumbUpright = 0.75

Adjust width of upright images when parameter 'upright' is used This allows a nicer look for upright images without the need to fix the width by hardcoded px in wiki sourcecode.

Definition at line 1452 of file DefaultSettings.php.

Referenced by Linker\makeImageLink().

$wgTiffThumbnailType = false

Browsers don't support TIFF inline generally...

For inline display, we need to convert to PNG or JPEG. Note scaling should work with ImageMagick, but may not with GD scaling.

Example:
1 // PNG is lossless, but inefficient for photos
2 $wgTiffThumbnailType = array( 'png', 'image/png' );
3 // JPEG is good for photos, but has no transparency support. Bad for diagrams.
4 $wgTiffThumbnailType = array( 'jpg', 'image/jpeg' );

Definition at line 1166 of file DefaultSettings.php.

Referenced by TiffHandler\canRender(), and TiffHandler\getThumbType().

$wgTmpDirectory = false

The local filesystem path to a temporary directory.

This is not required to be web accessible.

When this setting is set to false, its value will be set through a call to wfTempDir(). See that methods implementation for the actual detection logic.

Developers should use the global function wfTempDir() instead of this variable.

See also
wfTempDir()
Note
Default changed to false in MediaWiki 1.20.

Definition at line 334 of file DefaultSettings.php.

$wgTrackingCategories = []

Array holding default tracking category names.

Array contains the system messages for each tracking category. Tracking categories allow pages with certain characteristics to be tracked. It works by adding any such page to a category automatically.

A message with the suffix '-desc' should be added as a description message to have extra information on Special:TrackingCategories.

Deprecated:
since 1.25 Extensions should now register tracking categories using the new extension registration system.
Since
1.23

Definition at line 4029 of file DefaultSettings.php.

$wgTransactionalTimeLimit = 120

The minimum amount of time that MediaWiki needs for "slow" write request, particularly ones with multiple non-atomic writes that should be as transactional as possible; MediaWiki will call set_time_limit() if needed.

Since
1.26

Definition at line 2166 of file DefaultSettings.php.

$wgTranslateNumerals = true

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

Definition at line 2999 of file DefaultSettings.php.

Referenced by Language\formatNum().

$wgTrivialMimeDetection = false

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.

Definition at line 1315 of file DefaultSettings.php.

Referenced by StreamFile\contentTypeFromPath().

$wgTrustedMediaFormats
Initial value:
= [
"image/svg+xml",
"application/pdf",
# "application/x-shockwave-flash",
]
const MEDIATYPE_VIDEO
Definition: Defines.php:122
const MEDIATYPE_AUDIO
Definition: Defines.php:119
const MEDIATYPE_BITMAP
Definition: Defines.php:115

list of trusted media-types and MIME types.

Use the MEDIATYPE_xxx constants to represent media types. This list is used by File::isSafeFile

Types not listed here will have a warning about unsafe content displayed on the images description page. It would also be possible to use this for further restrictions, like disabling direct [[media:...]] links for non-trusted formats.

Definition at line 927 of file DefaultSettings.php.

Referenced by File\getIsSafeFileUncached().

$wgUpdateCompatibleMetadata = false

If to automatically update the img_metadata field if the metadata field is outdated but compatible with the current version.

Defaults to false.

Definition at line 659 of file DefaultSettings.php.

Referenced by ImageBuilder\__construct(), LocalFile\maybeUpgradeRow(), and RefreshImageMetadata\setupParameters().

$wgUploadBaseUrl = ''

If set, this URL is added to the start of $wgUploadPath to form a complete upload URL.

Since
1.4

Definition at line 341 of file DefaultSettings.php.

$wgUploadDialog
Initial value:
= [
'fields' => [
'description' => true

Configuration for file uploads using the embeddable upload dialog (https://www.mediawiki.org/wiki/Upload_dialog).

This applies also to foreign uploads to this wiki (the configuration is loaded by remote wikis using the action=query&meta=siteinfo API).

See below for documentation of each property. None of the properties may be omitted.

Definition at line 547 of file DefaultSettings.php.

$wgUploadDirectory = false

The filesystem path of the images directory.

Defaults to "{$IP}/images".

Definition at line 266 of file DefaultSettings.php.

Referenced by RepoGroupTest\setUpForeignRepo().

$wgUploadMissingFileUrl = false

Point the upload link for missing files to an external URL, as with $wgUploadNavigationUrl.

The URL will get "(?|&)wpDestFile=<filename>" appended to it as appropriate.

Definition at line 788 of file DefaultSettings.php.

Referenced by Linker\getUploadUrl(), and Linker\makeBrokenImageLinkObj().

$wgUploadNavigationUrl = false

Point the upload navigation link to an external URL Useful if you want to use a shared repository by default without disabling local uploads (use $wgEnableUploads = false for that).

Example:
1 $wgUploadNavigationUrl = 'https://commons.wikimedia.org/wiki/Special:Upload';

Definition at line 781 of file DefaultSettings.php.

Referenced by SkinTemplate\buildNavUrls(), Linker\getUploadUrl(), and Linker\makeBrokenImageLinkObj().

$wgUploadPath = false

The URL path for the images directory.

Defaults to "{$wgScriptPath}/images".

Definition at line 261 of file DefaultSettings.php.

$wgUploadSizeWarning = false

Warn if uploaded files are larger than this (in bytes), or false to disable.

Definition at line 915 of file DefaultSettings.php.

Referenced by UploadBase\checkWarnings().

$wgUploadStashMaxAge = 6 * 3600

The maximum age of temporary (incomplete) uploaded files.

Definition at line 383 of file DefaultSettings.php.

Referenced by UploadStashCleanup\execute().

$wgUploadStashScalerBaseUrl = false

To enable remote on-demand scaling, set this to the thumbnail base URL.

Full thumbnail URL will be like $wgUploadStashScalerBaseUrl/e/e6/Foo.jpg/123px-Foo.jpg where 'e6' are the first two characters of the MD5 hash of the file name. If $wgUploadStashScalerBaseUrl is set to false, thumbs are rendered locally as needed.

Since
1.17

Definition at line 350 of file DefaultSettings.php.

$wgUploadThumbnailRenderHttpCustomDomain = false

When using the "http" wgUploadThumbnailRenderMethod, lets one specify a custom domain to send the HTTP request to.

Since
1.25

Definition at line 1425 of file DefaultSettings.php.

Referenced by ThumbnailRenderJob\hitThumbUrl().

$wgUploadThumbnailRenderHttpCustomHost = false

When using the "http" wgUploadThumbnailRenderMethod, lets one specify a custom Host HTTP header.

Since
1.25

Definition at line 1417 of file DefaultSettings.php.

Referenced by ThumbnailRenderJob\hitThumbUrl().

$wgUploadThumbnailRenderMap = []

When defined, is an array of thumbnail widths to be rendered at upload time.

The idea is to prerender common thumbnail sizes, in order to avoid the necessity to render them on demand, which has a performance impact for the first client to view a certain size.

This obviously means that more disk space is needed per upload upfront.

Since
1.25

Definition at line 1397 of file DefaultSettings.php.

Referenced by UploadBase\postProcessUpload().

$wgUploadThumbnailRenderMethod = 'jobqueue'

The method through which the thumbnails will be prerendered for the entries in $wgUploadThumbnailRenderMap.

The method can be either "http" or "jobqueue". The former uses an http request to hit the thumbnail's URL. This method only works if thumbnails are configured to be rendered by a 404 handler. The latter option uses the job queue to render the thumbnail.

Since
1.25

Definition at line 1410 of file DefaultSettings.php.

Referenced by ThumbnailRenderJob\run().

$wgUseCombinedLoginLink = false

Login / create account link behavior when it's possible for anonymous users to create an account.

  • true = use a combined login / create account link
  • false = split login and create account into two separate links

Definition at line 3391 of file DefaultSettings.php.

Referenced by SkinTemplate\useCombinedLoginLink().

$wgUseDatabaseMessages = true

Translation using MediaWiki: namespace.

Interface messages will be loaded from the database.

Definition at line 3005 of file DefaultSettings.php.

Referenced by PHPUnitMaintClass\finalSetup(), DumpIterator\finalSetup(), and MessageCache\singleton().

$wgUseESI = false

If you run Squid3 with ESI support, enable this (default:false):

Definition at line 2608 of file DefaultSettings.php.

$wgUseETag = false

Whether MediaWiki should send an ETag header.

Seems to cause broken behavior with Squid 2.6, see bug 7098.

Definition at line 2546 of file DefaultSettings.php.

Referenced by Article\view().

$wgUseFileCache = false

This will cache static pages for non-logged-in users to reduce database traffic on public sites.

ResourceLoader requests to default language and skins are cached as well as single module requests.

Definition at line 2496 of file DefaultSettings.php.

Referenced by HTMLFileCache\clearFileCache(), PoolWorkArticleView\doWork(), PruneFileCache\execute(), RebuildFileCache\execute(), HTMLCacheUpdateJob\invalidateTitles(), DBConnectionError\reportHTML(), FileCacheBase\saveText(), HTMLFileCache\saveToFileCache(), ResourceFileCache\useFileCache(), HTMLFileCache\useFileCache(), and Article\view().

$wgUseGzip = false

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.

Requires zlib support enabled in PHP.

Definition at line 2540 of file DefaultSettings.php.

Referenced by FileCacheBase\__construct().

$wgUseImageMagick = false

Resizing can be done using PHP's internal image libraries or using ImageMagick or another third-party converter, e.g.

GraphicMagick. These support more file formats than PHP, which only supports PNG, GIF, JPG, XBM and WBMP.

Use Image Magick instead of PHP builtin functions.

Definition at line 991 of file DefaultSettings.php.

Referenced by RandomImageGenerator\getImageWriteMethod(), BitmapHandler\getScalerType(), and JpegPixelFormatTest\testPixelFormatRendering().

$wgUseImageResize = true

Whether to enable server-side image thumbnailing.

If false, images will always be sent to the client in full resolution, with appropriate width= and height= attributes on the tag for the client to do its own scaling.

Definition at line 981 of file DefaultSettings.php.

Referenced by BitmapHandler\getScalerType(), and JpegPixelFormatTest\testPixelFormatRendering().

$wgUseInstantCommons = false

Use Commons as a remote file repository.

Essentially a wrapper, when this is enabled $wgForeignFileRepos will point at Commons with a set of default settings

Definition at line 526 of file DefaultSettings.php.

$wgUseKeyHeader = false

Send the Key HTTP header for better caching.

See https://datatracker.ietf.org/doc/draft-fielding-http-key/ for details.

Since
1.27

Definition at line 2615 of file DefaultSettings.php.

Referenced by wfGzipHandler().

$wgUseLocalMessageCache = false

Set this to true to maintain a copy of the message cache on the local server.

This layer of message cache is in addition to the one configured by $wgMessageCacheType.

The local copy is put in APC. If APC is not installed, this setting does nothing.

Note that this is about the message cache, which stores interface messages maintained as wiki pages. This is separate from the localisation cache for interface messages provided by the software, which is configured by $wgLocalisationCacheConf.

Definition at line 2421 of file DefaultSettings.php.

Referenced by MessageCache\__construct(), and MessageCache\loadFromDBWithLock().

$wgUseMediaWikiUIEverywhere = false

Temporary variable that applies MediaWiki UI wherever it can be supported.

Temporary variable that should be removed when mediawiki ui is more stable and change has been communicated.

Since
1.24

Definition at line 3190 of file DefaultSettings.php.

Referenced by LoginSignupSpecialPage\__construct(), Html\buttonAttributes(), Xml\checkLabel(), EditPage\getCheckboxes(), HTMLCheckField\getInputHTML(), Html\getTextInputAttributes(), and Xml\submitButton().

$wgUsePathInfo
Initial value:
= ( strpos( PHP_SAPI, 'cgi' ) === false ) &&
( strpos( PHP_SAPI, 'apache2filter' ) === false ) &&
( strpos( PHP_SAPI, 'isapi' ) === false )
processing should stop and the error should be shown to the user * false
Definition: hooks.txt:189

Whether to support URLs like index.php/Page_title These often break when PHP is set up in CGI mode.

PATH_INFO may be correct if cgi.fix_pathinfo is set, but then again it may not; lighttpd converts incoming path data to lowercase on systems with case-insensitive filesystems, and there have been reports of problems on Apache as well.

To be safe we'll continue to keep it off by default.

Override this to false if $_SERVER['PATH_INFO'] contains unexpectedly incorrect garbage, or to true if it is really correct.

The default $wgArticlePath will be set based on this value at runtime, but if you have customized it, having this incorrectly set to true can cause redirect loops when "pretty URLs" are used.

Since
1.2.1

Definition at line 160 of file DefaultSettings.php.

Referenced by WebRequest\getPathInfo().

$wgUsePrivateIPs = false

Should forwarded Private IPs be accepted?

Definition at line 2784 of file DefaultSettings.php.

$wgUserEmailConfirmationTokenExpiry = 7 * 24 * 60 * 60

The time, in seconds, when an email confirmation email expires.

Definition at line 1601 of file DefaultSettings.php.

Referenced by User\confirmationToken().

$wgUserEmailUseReplyTo = false

Set to true to put the sending user's email in a Reply-To header instead of From.

($wgEmergencyContact will be used as From.)

Some mailers (eg SMTP) set the SMTP envelope sender to the From value, which can cause problems with SPF validation and leak recipient addresses when bounces are sent to the sender.

Definition at line 1585 of file DefaultSettings.php.

$wgUsersNotifiedOnAllChanges = []

Array of usernames who will be sent a notification email for every change which occurs on a wiki.

Users will not be notified of their own changes.

Definition at line 1712 of file DefaultSettings.php.

Referenced by EmailNotification\actuallyNotifyOnPageChange(), and EmailNotification\notifyOnPageChange().

$wgUseSharedUploads = 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 [[File:..]], [[Media:..]] links). Thumbnails will also be looked for and generated in this directory.

Note that these configuration settings can now be defined on a per- repository basis for an arbitrary number of file repositories, using the $wgForeignFileRepos variable.

Definition at line 674 of file DefaultSettings.php.

$wgUseSiteCss = true

Use the site's Cascading Style Sheets (CSS)?

Definition at line 3282 of file DefaultSettings.php.

$wgUseSiteJs = true

Use the site's Javascript page?

Definition at line 3277 of file DefaultSettings.php.

$wgUseSquid = false

Enable/disable CDN.

See https://www.mediawiki.org/wiki/Manual:Squid_caching

Definition at line 2603 of file DefaultSettings.php.

Referenced by BenchmarkPurge\execute().

$wgUseTinyRGBForJPGThumbnails = false

When this variable is true and JPGs use the sRGB ICC profile, swaps it for the more lightweight (and free) TinyRGB profile when generating thumbnails.

Since
1.26

Definition at line 1433 of file DefaultSettings.php.

Referenced by ExifBitmapHandler\transformImageMagick().

$wgValidateAllHtml = false

Validate the overall output using tidy and refuse to display the page if it's not valid.

Definition at line 3226 of file DefaultSettings.php.

Referenced by wfOutputHandler().

$wgVariantArticlePath = false

Like $wgArticlePath, but on multi-variant wikis, this provides a path format that describes which parts of the URL contain the language variant.

Example:
1 $wgLanguageCode = 'sr';
2 $wgVariantArticlePath = '/$2/$1';
3 $wgArticlePath = '/wiki/$1';

A link to /wiki/ would be redirected to /sr/Главна_страна

It is important that $wgArticlePath not overlap with possible values of $wgVariantArticlePath.

Definition at line 3060 of file DefaultSettings.php.

Referenced by Title\getLocalURL(), and WebRequest\getPathInfo().

$wgVaryOnXFP = false

Add X-Forwarded-Proto to the Vary and Key headers for API requests and RSS/Atom feeds.

Use this if you have an SSL termination setup and need to split the cache between HTTP and HTTPS for API requests, feed requests and HTTP redirect responses in order to prevent cache pollution. This does not affect 'normal' requests to index.php other than HTTP redirects.

Definition at line 2625 of file DefaultSettings.php.

Referenced by ChannelFeed\httpHeaders(), and wfStreamThumb().

$wgVerifyMimeType = true

Determines if the MIME type of uploaded files should be checked.

Definition at line 1282 of file DefaultSettings.php.

Referenced by StreamFile\contentTypeFromPath(), UploadBase\verifyFile(), and UploadBase\verifyMimeType().

$wgWANObjectCaches
Initial value:
= [
'class' => 'WANObjectCache'
const CACHE_NONE
Definition: Defines.php:102

Advanced WAN object cache configuration.

Each WAN cache wraps a registered object cache (for the local cluster) and it must also be configured to point to a PubSub instance. Subscribers must be configured to relay purges to the actual cache servers.

The format is an associative array where the key is a cache identifier, and the value is an associative array of parameters. The "cacheId" parameter is a cache identifier from $wgObjectCaches. The "channels" parameter is a map of actions ('purge') to PubSub channels defined in $wgEventRelayerConfig. The "loggroup" parameter controls where log events are sent.

Since
1.26

Definition at line 2312 of file DefaultSettings.php.

Referenced by ObjectCache\newWANCacheFromId().

$wgWantedPagesThreshold = 1

Number of links to a page required before it is deemed "wanted".

Definition at line 2137 of file DefaultSettings.php.

$wgXhtmlDefaultNamespace = null

The default xmlns attribute.

The option to define this has been removed. The value of this variable is no longer used by core and is set to a fixed value in Setup.php for compatibility with extensions that depend on the value of this variable being set. Such a dependency however is deprecated.

Deprecated:
since 1.22

Definition at line 3154 of file DefaultSettings.php.

$wgXhtmlNamespaces = []

Permit other namespaces in addition to the w3.org default.

Use the prefix for the key and the namespace for the value.

Example:
1 $wgXhtmlNamespaces['svg'] = 'http://www.w3.org/2000/svg';
Normally we wouldn't have to define this in the root "<html>" element, but IE needs it there in some circumstances.

This is ignored if $wgMimeType is set to a non-XML MIME type.

Definition at line 3206 of file DefaultSettings.php.

Referenced by Html\htmlHeader().

$wgXMLMimeTypes
Initial value:
= [
'http://www.w3.org/2000/svg:svg' => 'image/svg+xml'

Additional XML types we can allow via MIME-detection.

array = ( 'rootElement' => 'associatedMimeType' )

Definition at line 1321 of file DefaultSettings.php.

CONTENT_MODEL_JAVASCRIPT
Initial value:
=> 'JavaScriptContentHandler',
CONTENT_MODEL_JSON => 'JsonContentHandler',
CONTENT_MODEL_CSS => 'CssContentHandler',
CONTENT_MODEL_TEXT => 'TextContentHandler',
]
const CONTENT_MODEL_TEXT
Definition: Defines.php:280
const CONTENT_MODEL_JSON
Definition: Defines.php:281
const CONTENT_MODEL_CSS
Definition: Defines.php:279

Uploads have to be specially set up to be secure.

Definition at line 967 of file DefaultSettings.php.

Referenced by TitleMethodsTest\dataGetContentModel(), ContentHandlerTest\dataGetDefaultModelFor(), ContentHandlerTest\dataGetLocalizedName(), ContentHandlerTest\dataGetPageLanguage(), ContentHandlerTest\dataMakeContent(), ContentHandler\getDefaultModelFor(), EditPage\getPreviewText(), Title\isCssJsSubpage(), Title\isCssOrJsPage(), Title\isJsSubpage(), ContentHandlerTest\provideGetModelForID(), ContentHandlerTest\setUp(), TextContentTest\setUp(), TitleMethodsTest\setUp(), EditPage\showIntro(), RevisionTest\testConstructWithContent(), RevisionTest\testConstructWithText(), RevisionTestContentHandlerUseDB\testGetContentFormat(), RevisionStorageTest\testGetContentFormat(), WikiPageTestContentHandlerUseDB\testGetContentHandler(), JavaScriptContentTest\testGetContentHandler(), WikiPageTest\testGetContentHandler(), WikiPageTestContentHandlerUseDB\testGetContentModel(), RevisionTestContentHandlerUseDB\testGetContentModel(), RevisionStorageTest\testGetContentModel(), WikiPageTest\testGetContentModel(), and JavaScriptContentTest\testGetModel().

NS_USER
Initial value:
=> true,
NS_USER_TALK => true,
NS_PROJECT => true,
NS_PROJECT_TALK => true,
NS_FILE_TALK => true,
NS_MEDIAWIKI => true,
NS_HELP => true,
NS_HELP_TALK => true,
]
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return true
Definition: hooks.txt:1802
const NS_PROJECT
Definition: Defines.php:73
const NS_MEDIAWIKI_TALK
Definition: Defines.php:78
const NS_PROJECT_TALK
Definition: Defines.php:74
const NS_FILE_TALK
Definition: Defines.php:76
const NS_MEDIAWIKI
Definition: Defines.php:77
const NS_CATEGORY_TALK
Definition: Defines.php:84
const NS_HELP
Definition: Defines.php:81
const NS_HELP_TALK
Definition: Defines.php:82
const NS_USER_TALK
Definition: Defines.php:72
const NS_TEMPLATE_TALK
Definition: Defines.php:80

Definition at line 4001 of file DefaultSettings.php.

Referenced by DumpNamespaceFilter\__construct(), UsersPager\__construct(), ImageListPager\__construct(), ActiveUsersPager\__construct(), SpecialEditWatchlist\buildRemoveLine(), Title\checkQuickPermissions(), SpecialContributions\contributionsSub(), SpecialRedirect\dispatchUser(), FileDuplicateSearchPage\doBatchLookups(), UsersPager\doBatchLookups(), ContribsPager\doBatchLookups(), HistoryPager\doBatchLookups(), FixDefaultJsonContentPages\doDBUpdates(), UserCache\doQuery(), SpecialContributions\execute(), SpecialLog\execute(), ApiFeedContributions\execute(), ChangesListSpecialPage\execute(), ApiQueryAllUsers\execute(), SrConverter\findVariantLink(), ShiConverter\findVariantLink(), IuConverter\findVariantLink(), KuConverter\findVariantLink(), KkConverter\findVariantLink(), SpecialNewpages\form(), MIMEsearchPage\formatResult(), ImageListPager\formatValue(), CoreParserFunctions\gender(), Preferences\generateSkinOptions(), ImageHistoryPseudoPager\getBody(), User\getCanonicalName(), ContentHandler\getDefaultModelFor(), MediaWikiTestCase\getDefaultWikitextNS(), SearchNearMatcher\getNearMatchInternal(), NewPagesPager\getQueryInfo(), WantedPagesPage\getQueryInfo(), ActiveUsersPager\getQueryInfo(), SpecialMypage\getRedirect(), Skin\getRelevantUser(), Article\getRobotPolicy(), MergeHistoryPager\getStartBody(), NewPagesPager\getStartBody(), LogPager\getStartBody(), DeletedContributionsPage\getSubTitle(), SpecialBlock\getTargetUserTitle(), UserRightsProxy\getUserPage(), User\getUserPage(), TitleValueTest\goodConstructorProvider(), User\idFromName(), EditPage\importFormData(), Title\isCssJsSubpage(), Title\isCssSubpage(), Title\isJsSubpage(), LogPager\limitPerformer(), Language\needsGenderDistinction(), InfoAction\pageInfo(), BlockListPager\preprocessResults(), ProtectedPagesPager\preprocessResults(), SpecialBlock\processForm(), SpecialUnblock\processUnblock(), NewUsersLogFormatterTest\provideAutocreateLogDatabaseRows(), RightsLogFormatterTest\provideAutopromoteLogDatabaseRows(), BlockLogFormatterTest\provideBlockLogDatabaseRows(), NewUsersLogFormatterTest\provideByemailLogDatabaseRows(), NewUsersLogFormatterTest\provideCreate2LogDatabaseRows(), NewUsersLogFormatterTest\provideCreateLogDatabaseRows(), MediaWikiTitleCodecTest\provideFormat(), MediaWikiTitleCodecTest\provideGetFullText(), MediaWikiTitleCodecTest\provideGetNamespaceName(), MediaWikiPageLinkRendererTest\provideGetPageUrl(), MediaWikiTitleCodecTest\provideGetPrefixedDBkey(), MediaWikiTitleCodecTest\provideGetPrefixedText(), MediaWikiTitleCodecTest\provideGetText(), TitleMethodsTest\provideHasSubjectNamespace(), TitleMethodsTest\provideInNamespace(), TitleTest\provideNewFromTitleValue(), NewUsersLogFormatterTest\provideNewUsersLogDatabaseRows(), MediaWikiTitleCodecTest\provideParseTitle(), BlockLogFormatterTest\provideReblockLogDatabaseRows(), MediaWikiPageLinkRendererTest\provideRenderHtmlLink(), MediaWikiPageLinkRendererTest\provideRenderWikitextLink(), RightsLogFormatterTest\provideRightsLogDatabaseRows(), BlockLogFormatterTest\provideSuppressBlockLogDatabaseRows(), BlockLogFormatterTest\provideSuppressReblockLogDatabaseRows(), TestSample\provideTitles(), BlockLogFormatterTest\provideUnblockLogDatabaseRows(), GenerateSitemap\setNamespacePriorities(), MWNamespaceTest\setUp(), RevisionDeleteUser\setUsernameBitfields(), MovePageForm\showForm(), SpecialUndelete\showHistory(), EditPage\showIntro(), Article\showMissingArticle(), Preferences\skinPreferences(), MediaWikiTitleCodec\splitTitleString(), MWNamespaceTest\testCanTalk(), TitlePermissionTest\testCssAndJavascriptPermissions(), MWNamespaceTest\testEquals(), MWNamespaceTest\testGetContentNamespaces(), MWNamespaceTest\testGetSubject(), MWNamespaceTest\testGetTalk(), MWNamespaceTest\testHasGenderDistinction(), MWNamespaceTest\testHasSubpages(), TitleMethodsTest\testInNamespaces(), MWNamespaceTest\testIsCapitalizedHardcodedAssertions(), MWNamespaceTest\testIsCapitalizedWithWgCapitalLinkOverrides(), MWNamespaceTest\testIsCapitalizedWithWgCapitalLinks(), MWNamespaceTest\testIsContent(), MWNamespaceTest\testIsNonincludable(), MWNamespaceTest\testIsSubject(), MWNamespaceTest\testIsTalk(), TitlePermissionTest\testQuickPermissions(), TitlePermissionTest\testSpecialsAndNSPermissions(), MWNamespaceTest\testSubjectEquals(), RecentChangesUpdateJob\updateActiveUsers(), Linker\userLink(), and ApiBase\validateUser().

poweredby
Initial value:
=> [
"mediawiki" => [
"src" => null,
"url" => "//www.mediawiki.org/",
"alt" => "Powered by MediaWiki",
]
],
]

The default Content-Type header.

Definition at line 3373 of file DefaultSettings.php.