手册:配置设置
这是一个所有基于MainConfigSchema.php
文件的支持配置设置的索引。
千万不要编辑MainConfigSchema.php
;而是将适当的某些行复制到LocalSettings.php
,并酌情改善。
如果在这里找不到某一配置项,你可以看看是否有在DefaultSettings.php
中定义。
那里应该會给变量一些说明。
Manual:$wgAllowAnonymousMinor
)。
通用的设置
- $wgSitename – 网站的名称。
- $wgVersion (在1.35版本中已弃用) – MediaWiki版本号。
全局的对象
- $wgAutoloadLocalClasses – Array mapping class names to filenames, for autoloading.
- $wgConf – 创建组维基。在一般的安装中并不常用。
服务器的URL及文件的路徑
- $IP – 安装目录的完整路径。
- $wgActionPaths – 各种用户操作的路径。用于使URL更美观。
- $wgAppleTouchIcon – 当 Apple 手持设备将 wiki 收藏到主屏幕时可选的指向一个图标的 URL
- $wgArticlePath – 用于创建文章链接的基础URL。
- $wgAssumeProxiesUseDefaultProtocolPorts – 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.
- $wgBaseDirectory – Absolute filesystem path of the root directory of the MediaWiki installation.
- $wgCanonicalServer – Canonical URL of the server, to use in IRC feeds, notification emails, etc.
- $wgConfigRegistry – Registry of factory functions to create config objects
- $wgExtensionAssetsPath – 扩展目录的 URL。
- $wgExtensionDirectory – 至扩展目录的文件系统路径。
- $wgFavicon – 该网站图标的URL。
- $wgFFmpegLocation – FFmpeg客户端的可执行文件名称。
- $wgFFprobeLocation – Executable name of FFprobe.
- $wgFileCacheDirectory – Directory where the cached pages will be saved when using server-side caching.
- $wgForceHTTPS – 将不安全的HTTP请求重定向到HTTPS。
- $wgHttpsPort – Port where you have HTTPS running. Supports HTTPS on non-standard ports.
- $wgImgAuthPath – The base path for
img_auth.php
. - $wgLoadScript – 至load.php的URL路径。
- $wgLocalStylePath – Same as
$wgStylePath
, but shouldn't point to an external domain. - $wgLogoHD (在版本1.42移除) – 高清版本网站Logo的URL。
- $wgLogos – The URL path to various wiki logos.
- $wgLogo – 网站Logo的URL。
- $wgMainPageIsDomainRoot – Controls if the main page should be served as the domain root.
- $wgReferrerPolicy – referrer policy meta 标签的值。
- $wgRestPath – The URL path to rest.php.
- $wgScriptPath – URL基路径。
- $wgScript – index.php的URL。
- $wgServerName – 不包含协议的服务器名称。
- $wgServer – 服务器的基础URL。
- $wgStyleDirectory – The file system path to the skins directory.
- $wgStylePath – 皮肤目录的URL。
- $wgStyleSheetPath (在版本1.38移除) – 不要设置
$wgStyleSheetPath
。请改用$wgStylePath
。 - $wgThumbPath – The base path for thumb_handler.php.
- $wgTmpDirectory – 临时目录的路径。
- $wgUploadBaseUrl – The base URL for uploaded images if shared upload directory isn't to be used
- $wgUploadDirectory – 上传目录的文件系统路径。
- $wgUploadPath – 上傳目錄的路徑片段。
- $wgUploadStashScalerBaseUrl (在1.36版本中已弃用) – To enable remote on-demand scaling, set this to the thumbnail base URL.
- $wgUsePathInfo – 是否使用“更漂亮”的URL。
另见文件/图像上传路径的设置。
另见皮肤路径的设置。
文件及文件上传
上传必须经过特别设置,才能保证安全。
- $wgAllowCopyUploads – 允许像上传本地文件般从URL上传文件。
- $wgAllowJavaUploads (在版本1.39移除) – 允許Java檔案上傳。
- $wgAttemptFailureEpoch – Bump this to quickly retry thumbnail creation failures.
- $wgCheckFileExtensions – 检查上传是是否允许文件名
- $wgCopyUploadAllowOnWikiDomainConfig – 如果
true
,$wgCopyUploadsDomains 的值會與MediaWiki:Copyupload-allowed-domains的內容合併。 - $wgCopyUploadProxy – 用于复制上载请求的HTTP代理器。
- $wgCopyUploadsDomains – 指定
$wgAllowCopyUploads
允许特定的域列表 - $wgCopyUploadsFromSpecialUpload – 通过在 Special:Upload 添加用户界面启用从URL上传文件
- $wgCopyUploadTimeout – HTTP timeout (in seconds) for upload by URL
- $wgDeletedDirectory – 被删除的上传内容在哪个目录。
- $wgDirectoryMode – Default
chmod
permission value for newly created directories. - $wgDisableUploadScriptChecks – 是否禁用上传系统对于HTML/JavaScript的检查。
- $wgEnableAsyncUploads – Enable deferred upload tasks that use the job queue.
- $wgEnableAsyncUploadsByURL (在版本1.42引入) – Enable the async processing of upload by url in Special:Upload.
- $wgEnableUploads – 允许通过wiki上传图片和其他文件。
- $wgFileBackends – File backend structure configuration.
- $wgFileBlacklist (在版本1.37移除) – 不允许将具有这些扩展名的文件上传。
- $wgProhibitedFileExtensions – 不允许上传具有这些扩展名的文件。
- $wgFileExtensions – 这是上传文件的首选扩展的列表 上传不在此列表中的扩展名的文件将触发警告
- $wgHashedUploadDirectory – If true, uses the
/a/ab/foo.jpg
directory structure. - $wgIllegalFileChars (在1.41版本中已弃用) – Override the default list of illegal characters in file names.
- $wgImagePreconnect – Add a preconnect link for browsers to a remote FileRepo host..
- $wgImgAuthDetails – Display reason access to uploaded file was denied to users (img_auth only)
- $wgImgAuthUrlPathMap – Map of relative URL directories to match to internal
mwstore://
base storage paths. - $wgLocalFileRepo – A single repository structure for the local repository.
- $wgLockManagers – Array of configuration arrays for each lock manager.
- $wgMaxUploadSize – 最大上传文件大小(字节)
- $wgMediaInTargetLanguage – Whether translatable media (currently, only SVG images) should be shown in page's target language
- $wgMinUploadChunkSize – Minimum upload chunk size, in bytes.
- $wgNativeImageLazyLoading – Toggles native image lazy loading, via the "loading" attribute.
- $wgParserTestMediaHandlers – Media handler overrides for parser tests (they don't need to generate actual thumbnails, so a mock will do)
- $wgStrictFileExtensions – 切换:用户是否可以上传
$wgFileExtensions
未涵盖的文件。 - $wgThumbnailEpoch – 如果渲染的缩略图文件早于此时间戳,则会根据需要重新渲染它们,就像该文件不存在一样。
- $wgUploadDialog – Configuration for Upload dialog and the files uploaded through it.
- $wgUploadMaintenance – 暂时禁止文件删除/恢复。
- $wgUploadMissingFileUrl – 将缺少的文件(“红色文件链接”)指向自定义URL的维基链接。
- $wgUploadNavigationUrl – Point the upload navigation link in the sidebar to a custom URL.
- $wgUploadSizeWarning – 如果上传的文件大于此限制,则发出警告。
- $wgUploadStashMaxAge – The maximum age of temporary (incomplete) uploaded files.
共享的上传
这些设置是为了向后兼容而保留的,新的设置见$wgForeignFileRepos ,若是你只需要对維基共享資源上的图像进行读取访问,则见$wgUseInstantCommons 。
- $wgCacheSharedUploads – Cache shared metadata in memcached.
- $wgForeignFileRepos – 一个包含外部存储库结构信息的数组
- $wgForeignUploadTargets – Configuration for foreign upload targets for the upload dialog .
- $wgHashedSharedUploadDirectory – 是否对共享的上传目录进行哈希运算。
- $wgRepositoryBaseUrl – 存储库维基的基本URL。
- $wgSharedUploadDBname – DB name with metadata about shared directory.
- $wgSharedUploadDBprefix – 共享图像上传的数据库前缀
- $wgSharedUploadDirectory – Path on the file system where shared uploads can be found.
- $wgSharedUploadPath – Full path to the web server where shared uploads can be found.
- $wgUseSharedUploads – Whether to look in a shared repository when a file is not found locally
- $wgFetchCommonsDescriptions – Whether to fetch commons image description pages and display them on the local wiki.
MIME类型
- $wgMimeDetectorCommand – Sets an external MIME detector program.
- $wgMimeInfoFile – Sets the MIME type info file to be used by MimeAnalyzer.php .
- $wgMimeTypeFile – 设置MimeAnalyzer.php 使用的MIME类型定义文件。
- $wgTrivialMimeDetection – Switch for trivial MIME detection.
- $wgVerifyMimeType – Determines if the MIME type of uploaded files should be checked.
- $wgVerifyMimeTypeIE (在版本1.40移除) – Determines whether extra checks for Internet Explorer type detection should be applied.
- $wgMimeTypeBlacklist (在版本1.37移除) – MIME types to disallow if $wgVerifyMimeType is enabled.
- $wgMimeTypeExclusions – MIME types to disallow if $wgVerifyMimeType is enabled.
- $wgXMLMimeTypes – An array of XML MIME types we can detect via MimeMagic
另见: Manual:MIME type detection
图片
- $wgAllowImageMoving (在版本1.36移除) – 启用文件重命名。
- $wgCustomConvertCommand – Use another resizing converter, e.g. GraphicMagick.
- $wgEnableAutoRotation – 是否根据 EXIF 信息启用图像自动旋转
- $wgExiftool – Path to exiftool binary. Used for lossless ICC profile swapping.
- $wgExiv2Command – Path to the exiv2 executable.
- $wgGalleryOptions –
<gallery>
标签的默认设置。 - $wgIgnoreImageErrors – If true, inline scaled images will still produce
<img>
tags ready for output instead of showing an error message. - $wgImageLimits – A list of user-selectable limits for the image thumbnail size on image description pages.
- $wgJpegQuality – When scaling a JPEG thumbnail, this is the quality we request from the backend.
- $wgJpegTran – Path to jpegtran, for lossless JPEG rotation.
- $wgMaxImageArea – 如果圖像使用太多工作內存,不要縮略圖像。
- $wgMediaHandlers – Plugins for media file type handling.
- 上传路径的参数
- $wgTrustedMediaFormats – 受信任媒体类型和MIME类型的列表。
另见: 手册:配置文件上传
DjVu
- $wgDjvuDump – djvudump程序文件的路径。
- $wgDjvuOutputExtension – File extension for the DjVu post processor output.
- $wgDjvuPostProcessor – DjVu后处理器的路径。
- $wgDjvuRenderer – ddjvu DjVu渲染器的路径。
- $wgDjvuToXML (在版本1.37移除) – Path of the djvutoxml executable.
- $wgDjvuTxt – Path of the djvutxt DjVu text extraction utility.
- $wgDjvuUseBoxedCommand (在版本1.42引入) – Whether to use BoxedCommand or not.
- $wgShellboxShell (在版本1.42引入) – The POSIX-compatible shell to use when running scripts.
EXIF
- $wgShowEXIF – Show EXIF data at the end of file description pages.
- $wgUpdateCompatibleMetadata – Whether to automatically update the
img_metadata
field if it is outdated but compatible with the current version.
ImageMagick
- $wgImageMagickConvertCommand – The command used to invoke ImageMagick.
- $wgImageMagickTempDir – Temporary directory used for ImageMagick.
- $wgMaxInterlacingAreas – Array of max pixel areas for interlacing per MIME type.
- $wgSharpenParameter – Sharpening parameter to ImageMagick.
- $wgSharpenReductionThreshold – Reduction in linear dimensions below which sharpening will be enabled.
- $wgUseImageMagick – Set to true to use ImageMagick for image resizing.
- $wgUseTinyRGBForJPGThumbnails – Swaps JPGs that use sRGB ICC profile with TinyRGB profile
SVG
- $wgAllowTitlesInSVG (在版本1.35移除) – Allow
<title>
tag in SVG files. - $wgSVGConverter – A key from
$wgSVGConverters
to use as converter. - $wgSVGConverterPath – Path to the directory of the SVG converter being used.
- $wgSVGConverters – List of paths to Scalable Vector Graphics (SVG) converters.
- $wgSVGMaxSize – Don't scale a SVG larger than this unless its native size is larger.
- $wgSVGMetadataCutoff – 不读取指定位置之后的SVG元数据。
- $wgSVGNativeRendering (在版本1.41引入) – Whether native rendering by the browser agent is allowed.
- $wgSVGNativeRenderingSizeLimit (在版本1.41引入) – Limit on an SVG file's size for it to be rendered by the client, in bytes.
缩略图设置
- $wgUseImageResize – Whether to enable dynamic server-side image resizing (thumbnailing)
- $wgGenerateThumbnailOnParse – 允许在访问页面时生成缩略图。
- $wgMaxAnimatedGifArea – Force thumbnailing of animated GIFs above this size to a single frame instead of an animated thumbnail.
- $wgSharedThumbnailScriptPath – Same as
$wgThumbnailScriptPath
, but for shared uploads. - $wgShowArchiveThumbnails – Whether to show thumbnails for old images on the image description page.
- $wgTiffThumbnailType – 要将 TIFF 图像转换为的格式和 MIME 类型。
- $wgThumbnailNamespaces (在版本1.40引入) – Defines what namespaces thumbnails will be displayed for in Special:Search.
- $wgThumbnailScriptPath – Path to thumb.php , if you want thumbnail generation on the fly.
- $wgThumbUpright – Scaling factor applied to width of images when parameter 'upright' is used.
- $wgThumbLimits – List of image thumbnail sizes users can pick from.
- $wgResponsiveImages – 是否为高DPI显示输出高分辨率图像
- $wgThumbnailBuckets – List of intermediary thumbnail sizes to use to speed up thumbnail rendering.
- $wgThumbnailMinimumBucketDistance – Minimal distance between intermediary thumbnail size and target thumbnail size.
- $wgJpegPixelFormat – Sets YUV chroma subsampling mode for JPEG thumbnails
- $wgUploadThumbnailRenderHttpCustomHost – When using the "http" $wgUploadThumbnailRenderMethod, lets one specify a custom Host HTTP header.
- $wgUploadThumbnailRenderHttpCustomDomain – When using the "http" $wgUploadThumbnailRenderMethod, lets one specify a custom domain to send the HTTP request to.
- $wgUploadThumbnailRenderMap – An array of thumbnail widths to be rendered at upload time.
- $wgUploadThumbnailRenderMethod – The method through which the thumbnails will be prerendered for the entries in $wgUploadThumbnailRenderMap.
杀毒
- $wgAntivirus – Internal name of virus scanner.
- $wgAntivirusRequired – Determines if a failed virus scan will cause the file to be rejected.
- $wgAntivirusSetup – 不同病毒扫描程序的配置。
邮件的设置
請參見用户访问: $wgEmailConfirmToEdit
- $wgAdditionalMailParams – Additional email parameters, will be passed as the last argument to
mail()
PHP function call. - $wgAllowHTMLEmail – 设置为真以启用HTML邮件。
- $wgEmailAuthentication – 设置为True可为此Wiki启用电子邮件身份验证(确认)。 除密码提醒电子邮件外,电子邮件功能仅适用于经过身份验证的电子邮件地址。
- $wgEmergencyContact – 网站管理员电子邮件地址
- $wgEnableEmail – 设置为 true 以启用基本的电子邮件功能。
- $wgEnableSpecialMute – Set to
true
to enable the Special Mute page. - $wgEnableUserEmailBlacklist (在版本1.37移除) – Set to
true
to enable user-to-user email blacklist. - $wgEnableUserEmailMuteList – Set to
true
to enable user-to-user email mutelist. - $wgEnableUserEmail – Set to true to enable user-to-user email.
- $wgNewPasswordExpiry – 通过邮件发送的临时密码在此时间(单位为秒)后失效。
- $wgNoReplyAddress – Reply-to address for automatically generated emails.
- $wgPasswordExpirationDays – 用户密码的有效天数。
- $wgPasswordExpireGrace – The number of seconds after a user's password expires during which they can log in without a password change.
- $wgPasswordReminderResendTime – Minimum time, in hours, which must elapse between password reminder emails.
- $wgPasswordSender – 密码提醒电子邮件地址。
- $wgSMTP – 用于配置与SMTP服务器通信的连接信息。
- $wgUserEmailConfirmationTokenExpiry – The time, in seconds, after which a email address confirmation token expires.
- $wgUserEmailUseReplyTo – Set to
true
to put the sending user's email in a Reply-To header instead of From.
电子邮件通知(Enotif)设置
- 每个用户的实际通知是在选项中定义。 您可以用$wgDefaultUserOptions 更改默认值。
- $wgEnotifFromEditor – Whether to make email notifications appear to come from the user who makes the edit
- $wgEnotifImpersonal – Send a generic mail instead of a personalised mail for each user.
- $wgEnotifMaxRecips – 使用非个人邮件时一次发送邮件的最大用户数。
- $wgEnotifMinorEdits – 設置為true以允許發送標記為小修改的編輯電子郵件通知
- $wgEnotifRevealEditorAddress – Set to true to insert the page editor's email address into the email notifications Reply-To address
- $wgEnotifUseRealName – Use real name instead of username in email "from" field.
- $wgEnotifUserTalk – 對在使用者討論頁上的編輯啟用電子郵件通知。
- $wgEnotifWatchlist – Set to true to allow the email notification for watched pages
- $wgUseEnotif – Overall "use Enotif" setting
- $wgUsersNotifiedOnAllChanges – 当一个Wiki上的发生改动时,向数组中的用户发送邮件通知。
数据库的设置
- $wgCommentTempTableSchemaMigrationStage (在版本1.40引入) (在版本1.41移除) – Comment temp tables schema migration stage.
- $wgDataCenterUpdateStickTTL – After a state-changing request is done by a client, this determines how many seconds that client should keep using the master datacenter.
- $wgDBadminpassword – 用于$wgDBadminuser的密码。
- $wgDBadminuser – 数据库管理员的用户名。
- $wgDBcompress – 是否在数据库连接中使用压缩。
- $wgDBDefaultGroup – Default group to use when getting database connections. For use by maintenance scripts.
- $wgDBerrorLogTZ – 在错误日志中使用的时区。
- $wgDBerrorLog – 要将数据库错误记录到的文件。
- $wgDBmwschema – Schema that stores the MediaWiki tables in.
- $wgDBname – 数据库名称。
- $wgDBpassword –
$wgDBuser
的密码。 - $wgDBprefix – 数据表名称的前缀。
- $wgDBserver – 数据库服务器主机名或 IP 地址。
- $wgDBssl – 是否在数据库连接中使用SSL。
- $wgDBStrictWarnings (在版本1.42引入) – Check for warnings after DB queries and throw an exception if an unacceptable warning is detected.
- $wgDBtype – 数据库的类型。
- $wgDBuser – 数据库的用户名。
- $wgDBWindowsAuthentication (在版本1.35移除) – 使用集成Windows验证而不是
$wgDBuser
/$wgDBpassword
结合。 - $wgExternalLinksSchemaMigrationStage (在版本1.40引入) (在版本1.41移除) – externallinks table schema migration stage.
- $wgExternalLinksDomainGaps (在版本1.41引入) – Gaps in the
externallinks
table for certain domains. - $wgLocalDatabases – Other wikis on this site, can be administered from a single developer account.
- $wgMaxExecutionTimeForExpensiveQueries – Max execution time for queries of several expensive special pages such as RecentChanges in milliseconds.
- $wgMultiContentRevisionSchemaMigrationStage (在版本1.39移除) – RevisionStore table schema migration stage (content, slots, content_models & slot_roles tables).
- $wgPageLinksSchemaMigrationStage (在版本1.41引入) – The pagelinks table schema migration stage, for normalising pl_namespace and pl_title fields.
- $wgSearchTypeAlternatives – Alternative search types.
- $wgSearchType – Type of search used for the wiki.
- $wgTemplateLinksSchemaMigrationStage (在版本1.43移除) – templatelinks table schema migration stage, for normalizing tl_namespace and tl_title fields.
- $wgVirtualDomainsMapping (在版本1.41引入) – Mapping of virtual database domains to actual databases.
负载均衡器的设置
- $wgDBservers – Settings for the database load balancer (database servers and load ratios).
- $wgLBFactoryConf – Configuration for the ILBFactory service
- $wgMasterWaitTimeout (在1.24版本中已弃用) – How long to wait for a slave to catch up to the master.
- $wgSlaveLagCritical (在版本1.36移除) – If lag is higher than this value, show a more obvious warning than
$wgSlaveLagWarning
. - $wgSlaveLagWarning (在版本1.36移除) – If lag is higher than this value, show a warning in some special pages (like watchlist).
- $wgDatabaseReplicaLagCritical – If lag is higher than this value, show a more obvious warning than
$wgDatabaseReplicaLagWarning
. - $wgDatabaseReplicaLagWarning – If lag is higher than this value, show a warning in some special pages (like watchlist).
MySQL特定配置
- $wgDBTableOptions – 在安装及更新过程中使用的MySQL表选项。
- $wgSQLMode – Value for the MySQL
sql_mode
parameter
PostgreSQL特定配置
- $wgDBport – 数据库端口。只用于PostgreSQL。
SQLite特定配置
- $wgSQLiteDataDir – 覆盖默认SQLite数据目录。
共享数据库设置
- $wgSharedDB – 共享的数据库的名称。
- $wgSharedPrefix – 用于共享数据库表的表前缀。
- $wgSharedTables – 在
$wgSharedDB
启用时要共享的数据库表(没有前缀)。 - $wgSharedSchema – The table schema for the shared database
扩展字段
- $wgExtPGNewFields (在版本1.36移除) – Extension defined fields to be added to existing tables
- $wgExtNewTables (在版本1.36移除) – Extension Defined tables to be added on schema change
- $wgExtNewFields (在版本1.36移除) – 定义添加到现有表格字段的扩展
- $wgExtNewIndexes (在版本1.36移除) – Extension defined indexes to be added to existing tables
- $wgExtPGAlteredFields (在版本1.36移除) – Extension defined columns to be altered in tables
- $wgExtModifiedFields (在版本1.36移除) – Extension defined fields to change existing tables
内容处理器和存储
- $wgCompressRevisions – Compress new page revisions if possible
- $wgContentHandlers – Mapping of content type handlers
- $wgContentHandlerTextFallback (在版本1.42移除) – How to react if a plain text version of a non-text Content object is requested using
ContentHandler::getContentText()
- $wgDefaultExternalStore – Default external store for new revisions.
- $wgDiffEngine – 指定要使用的差异引擎。
- $wgEnableRemoteBagOStuffTests – If this is set to
true
, phpunit will run integration tests against remote caches defined in $wgObjectCaches . - $wgExternalDiffEngine – 要使用的外部差异引擎的名称。
- $wgExternalServers – Shortcut for setting
$wgLBFactoryConf["externalClusters"]
. - $wgExternalStores – List of enabled ExternalStore protocols.
- $wgNamespaceContentModels – 为给定命名空间定义的内容类型
- $wgPageLanguageUseDB – 允许更改MediaWiki页面的页面语言
- $wgRevisionCacheExpiry – Cache extracted revision text in MemCached.
- $wgRevisionSlotsCacheExpiry (在版本1.43引入) – Revision slots may be cached in the main WAN cache and/or the local server cache to reduce load on the database.
- $wgTextModelsToParse – Determines which types of text are parsed as wikitext.
- $wgWikidiff2Options (在版本1.41引入) – Options for wikidiff2
性能技巧和限制
- $wgAllowSchemaUpdates – Allow database schema updates to be executed with update.php script.
- $wgAllowSlowParserFunctions – 允许缓慢的解析器功能。
- $wgCriticalSectionTimeLimit – The maximum time critical sections are allowed to stay open.
- $wgDisableQueryPages – Disable all query pages if miser mode is on, not just some.
- $wgForceDeferredUpdatesPreSend – Force deferred updates to be run before sending a response to the client, instead of attempting to run them after sending the response.
- $wgLinkHolderBatchSize – LinkHolderArray batch size.
- $wgMaxArticleSize – 頁面最大大小,以KiB計。
- $wgMaximumMovedPages – Maximum number of pages to move at once when moving subpages with a page.
- $wgMaxJobDBWriteDuration – Max time (in seconds) a job-generated transaction can spend in writes.
- $wgMaxUserDBWriteDuration – Max time (in seconds) a user-generated transaction can spend in writes.
- $wgMemoryLimit – The minimum amount of memory that MediaWiki "needs"; MediaWiki will try to raise PHP's memory limit if it's below this amount.
- $wgMiserMode – 啟用/停用資料庫密集型功能
- $wgMultiShardSiteStats – Whether
site_stats
table should have multiple rows. - $wgPoolCounterConf – Configuration for processing pool control.
- $wgPoolCountClientConf (在版本1.40引入) – Configuration array for the PoolCounter client.
- $wgQueryCacheLimit – Number of rows to cache in 'querycache' table when miser mode is on.
- $wgQueryPages – List of Special pages that inherit from QueryPage, that should also be taken in account by the updateSpecialPages.php maintenance script.
- $wgRequestTimeLimit – Set a limit on server request wall clock time.
- $wgTransactionalTimeLimit – Throttle for timing out transactional POST requests
- $wgWantedPagesThreshold – 在页面出现在“Special:需要的页面”上之前必须链接到页面的最小页面数。
缓存
- $wgCacheDirectory – Directory for per-wiki long-life cache files in the local filesystem.
- $wgCacheEpoch – Set this to current time to invalidate all prior cached pages.
- $wgCachePages – 允许客户端侧页面缓存
- $wgChronologyProtectorStash (在版本1.43移除) – The object store type of the ChronologyProtector position store.
- $wgChronologyProtectorSecret (在版本1.41引入) – Secret string for HMAC hashing in ChronologyProtector (optional)
- $wgExtensionInfoMTime – Time to invalidate cache of extensions loaded by the extension registration system.
- $wgFooterLinkCacheExpiry (在版本1.39移除) – Expiry time for the footer link cache, in seconds, or 0 if disabled.
- $wgGitInfoCacheDirectory – GitInfo将查找预先计算的缓存文件的目录。
- $wgInvalidateCacheOnLocalSettingsChange – Setting this to true will invalidate all cached pages whenever
LocalSettings.php
is changed - $wgLanguageConverterCacheType – The cache type for storing language conversion tables.
- $wgMainCacheType – 对象缓存设置
- $wgMainStash – 复制对象缓存设置
- $wgMicroStashType (在版本1.42引入) – Central store for reliable short-lived data.
- $wgObjectCaches – Advanced object cache configuration.
- $wgParserCacheFilterConfig (在版本1.42引入) – Per-namespace configuration for the ParserCache filter.
- $wgParserCacheUseJson (在版本1.39移除) – Enable JSON serialization for ParserCache.
- $wgParsoidCacheConfig – Configuration for the caching related to parsoid output. The configuration contains the following keys:
- $wgPHPSessionHandling – Whether to use PHP session handling (
$_SESSION
andsession_*()
functions) - $wgSessionPbkdf2Iterations – Number of internal PBKDF2 iterations to use when deriving session secrets.
- $wgStatsCacheType (在版本1.42移除) – The object cache type for stats storage.
- $wgSuspiciousIpExpiry – Time in seconds to remember IPs for, for the purposes of logging IP changes within the same session.
- $wgUseGzip – 用GZip存儲緩存的頁面。
- 有关跨wiki的缓存设置,请参阅:Interwiki。
文件缓存
服务器端文件缓存的设置。
- $wgFileCacheDepth – Depth of subdirectory hierarchy under
$wgFileCacheDirectory
. - $wgUseFileCache – 为未注册的查看器创建静态HTML页以减少数据库流量。
消息缓存
- $wgAdaptiveMessageCache – Keep track which messages are requested and load only most used messages.
- $wgLocalisationCacheConf – Localisation cache configuration.
- $wgMessageCacheType – Message cache setting
- $wgUseLocalMessageCache – Make a local copy of the message cache, in addition to memcached.
侧边栏缓存
- $wgEnableSidebarCache – If true, cache the sidebar navigation links.
- $wgSidebarCacheExpiry – Expiry time for the sidebar cache, in seconds.
解析器缓存
- $wgOldRevisionParserCacheExpireTime – 旧版本的解析器缓存的过期时间(以秒为单位)。
- $wgRenderHashAppend – 将配置的值附加到解析器缓存和sitenotice缓存键。
- $wgParserCacheExpireTime – Expiration time (in seconds) of cached parser information
- $wgParserCacheType – Parser cache setting
- $wgUseContentMediaStyles (在版本1.41引入) (在1.41版本中已弃用) – Temporary flag to stop shipping the styles for the legacy media HTML structure that has been replaced when $wgParserEnableLegacyMediaDOM is
false
.
Memcached 设置
配置 Memcached 基于内存的对象存储的设置(如果您正在使用它的话),docs/memcached.md 可以获取更多详细信息。
- $wgMemCachedDebug – 如果服务器无法正常运行,将在Setup.php中将其设置为false。
- $wgMemCachedPersistent – 是否使用与Memcached服务器的持久连接。
- $wgMemCachedServers – Memcached servers
- $wgMemCachedTimeout – Server connection timeout in microseconds.
- $wgObjectCacheSessionExpiry – 用于会话存储的过期时间(以秒为单位)。
- $wgSessionCacheType – 用于存储会话数据的缓存类型。
WAN缓存
- $wgMainWANCache (在版本1.40移除) – Main wide area network cache configuration.
- $wgWANObjectCaches (在版本1.40移除) – Advanced Wide-Area-Network cache configuration.
- $wgWANObjectCache (在版本1.40引入) – Extra parameters to the WANObjectCache constructor.
HTTP 代理 (CDN) 设置
这些设置在使用带有缓存的HTTP 代理服务器时配置MediaWiki。 它们适用于使用 caching using Varnish和Squid的情况下进行缓存。
- $wgCdnMatchParameterOrder – Indicates if should take query parameters order on incoming requests into account for CDN caching
- $wgCdnMaxageLagged – Cache timeout for the CDN when DB replica lag is high
- $wgCdnMaxageStale – Cache timeout in seconds when delivering a stale ParserCache response due to PoolCounter contention.
- $wgCdnMaxageSubstitute – Cache timeout for the CDN when a response is known to be wrong or incomplete (due to load)
- $wgCdnMaxAge – CDN的缓存TTL作为s-maxage(没有ESI)或者Surrogate-Control(带有ESI)发送。
- $wgCdnReboundPurgeDelay – Secondary delayed purges of URLs
- $wgCdnServersNoPurge – Same as
$wgCdnServers
, except no HTTP purges will be sent and CIDR ranges are accepted - $wgCdnServers – 一组“单独的”代理服务器,以帮助 MediaWiki 检测请求是否已被代理。
还要在更改时发送回代理 PURGE 命令。 - $wgForcedRawSMaxage – 原始 CSS/JavaScript 访问的默认最长期限(以秒为单位)。
- $wgInternalServer – Squid已知的内部服务器名称(如果不同于
$wgServer
)。 - $wgLoggedOutMaxAge (在版本1.38移除) – 对于已登出用户,以最大寿命发送的用户代理缓存TTL。
- $wgSquidMaxage (在版本1.35移除) – Cache timeout for the squid.
- $wgSquidPurgeUseHostHeader (在版本1.42移除) – Whether to use a Host header in purge requests sent to the proxy servers configured in $wgSquidServers.
- $wgSquidServersNoPurge (在版本1.35移除) – Same as
$wgSquidServers
, except that MW has no methods to send HTTP PURGE to an origin part of the configured ranges - $wgSquidServers (在版本1.35移除) – An array of individual proxy servers to help MediaWiki detect if the request has been proxied.
But also to send back to the proxy PURGE commands on changes. - $wgUseCdn – 启用/禁用页面视图缓存。
- $wgUseESI (在1.33版本中已弃用) – If you run Squid3 with ESI support, enable this.
- $wgUsePrivateIPs – 是否接受内网X转发IP
- $wgUseSquid (在版本1.35移除) – 启用/禁用Squid。
- $wgVaryOnXFP – Whether to add
X-Forwarded-Proto
to theVary
header for API requests and RSS/Atom feeds.
HTCP 组播清理
- $wgHTCPMulticastTTL – HTCP组播清除
- $wgHTCPRouting – Routing configuration for HTCP multicast purging.
语言、区域和字符编码设置
- $wgAllowRawHtmlCopyrightMessages (在版本1.43引入) – Whether on-wiki overrides for the
copyright
andhistory_copyright
messages, which allow raw HTML, will be used. - $wgAllUnicodeFixes – Whether to always convert certain Unicode sequences to modern ones regardless of the content language.
- $wgDefaultLanguageVariant – Default language variant.
- $wgDisabledVariants – Disabled variants for language variant conversion.
- $wgDisableLangConversion – 是否开启语言变体转换功能。
- $wgDisableTitleConversion – Whether to enable language variant conversion for links.
- $wgDummyLanguageCodes – List of language codes that have been renamed to new (correct) codes, or don't correspond to an actual interface language.
- $wgExtraInterlanguageLinkPrefixes – Array of interwiki prefixes to be treated as language links.
- $wgExtraLanguageCodes – 从一种语言代码到另一种语言代码的映射列表
- $wgExtraLanguageNames – List of language names or overrides for default names in Names.php.
- $wgFixArabicUnicode (在版本1.35移除) – Set this to true to clean up archaic Unicode sequences in Arabic text.
- $wgFixMalayalamUnicode (在版本1.35移除) – Set this to true to clean up archaic Unicode sequences in Malayalam text.
- $wgForceUIMsgAsContentMsg – Array of UI messages that should be treated as content messages.
- $wgGrammarForms – 用于
{{GRAMMAR:}}
解析器函数。 - $wgHideInterlanguageLinks – 隐藏侧边栏的中介语言链接。
- $wgInterlanguageLinkCodeMap – 当跨维基代码不完全匹配时,跨语言链接代码到语言代码的映射可以覆写显示的语言名称。
- $wgInterwikiMagic – Treat language links as magic connectors, not inline links.
- $wgLangObjCacheSize (在版本1.37移除) – Language cache size, or really how many languages can we handle simultaneously without degrading to crawl speed.
- $wgLanguageCode – 网站语言代码。
- $wgLegacyEncoding – Set this to the character set, which you used before you updated to MediaWiki 1.5 (eg 'ISO-8859-1'). MediaWiki will then perform a temporary character set conversion when loading old revisions, which are not marked with "utf-8" flag (revisions created with MediaWiki 1.4 and earlier).
- $wgLegacySchemaConversion (在版本1.39移除) – Option to speed up the conversion step for large sites when migrating the schema from 1.4 to 1.5
- $wgLoginLanguageSelector – Show a bar of language selection links in the user login and user registration forms.
- $wgMaxMsgCacheEntrySize – Maximum entry size in the message cache, in bytes.
- $wgOverrideUcfirstCharacters – List of Unicode characters for which capitalization is overridden in Language::ucfirst.
- $wgRawHtmlMessages – 可能包含原始HTML的訊息列表。
- $wgUseDatabaseMessages – 使用MediaWiki:命名空间翻译
- $wgUsePigLatinVariant – 是否启用英语的猪拉丁语变体(en-x-piglatin),用于简化变体开发工作。
- $wgUseXssLanguage (在版本1.41引入) – Whether to enable the x-xss language code, used to make checking for XSS issues more convenient.
- $wgVariantArticlePath – 用于含有语言变体的链接。
- $wgUserFallbackLanguages – 每个用户的最大备选语言数量。
时区设置
- $wgLocaltimezone – 伪造服务器认为它所在的时区。
- $wgLocalTZoffset – Add a distance to the server timezone in minutes.
特定语言的配置
- 英语
- $wgAmericanDates – 使用“月日年(mdy)”而非“日月年(dmy)”作为默认日期格式,如“May 12”而非“12 May”。
- 阿拉伯语/印地语
- $wgTranslateNumerals – For Hindi, Arabic, and other languages with their own numeral systems, use local numerals instead of Western style (0-9) numerals in some areas of the interface.
输出格式和皮肤设置
输出
- $wgBrowserFormatDetection – Override ability of certain browsers to attempt to autodetect dataformats in pages.
- $wgDisableOutputCompression – 禁用输出压缩(如果zlib可用,则默认情况下启用压缩)。
- $wgEdititis – 显示用户编辑数在“用户列表”特殊页面。
- $wgEditSubmitButtonLabelPublish – 在公開的Wiki上將「保存」標籤改為「發布」
- $wgEnableCanonicalServerLink – Output a
<link rel="canonical">
tag on every page indicating the canonical server which should be used, i.e.$wgServer
or$wgCanonicalServer
. - $wgExternalInterwikiFragmentMode – Determines which ID escaping mode should be used for external interwiki links
- $wgFragmentMode – 决定章节 ID 的编码方式
- $wgInterwikiLogoOverride (在版本1.41引入) – List of interwiki logos overrides.
- $wgHTMLFormAllowTableFormat (在版本1.42移除) – Allow form components to render tables.
- $wgHtml5Version – Defines the value of the version attribute in the
<html>
tag, if any. - $wgMangleFlashPolicy (在版本1.40移除) – Whether to mangle any
<cross-domain-policy>
(Adobe cross-domain policy) tags, to prevent XSS attacks. - $wgMimeType – The type to send in the
Content-Type
header. - $wgSend404Code – 为未找到的页面发送 404 HTTP 状态。
- $wgShowRollbackEditCount – Maximum number to count when a rollback link is shown
- $wgSiteNotice – 在每个页面的顶部显示一条消息。
- $wgUseMediaWikiUIEverywhere (在版本1.42移除) – 在支持的场合使用MediaWiki UI。
- $wgXhtmlNamespaces – Permit other XHTML namespaces in addition to the w3.org default.
皮肤
- $wgDefaultSkin – 新用户默认皮肤。
- $wgFallbackSkin – Fallback skin used when the skin defined by
$wgDefaultSkin
can't be found. - $wgFooterIcons – Abstract list of footer icons for skins. It replaces the old copyrightico and poweredbyico code, which until MediaWiki 1.27 could be influenced with $wgCopyrightIcon
- $wgSkinMetaTags – An array of open graph tags which should be added by all skins.
- $wgSkipSkins – Specify the name of skins that should not be presented in the list of available skins.
- $wgSkipSkin (在版本1.35移除) – Specify the name of a skin that should not be presented in the list of available skins.
- $wgUseCombinedLoginLink – Login / create account link behavior when it's possible for anonymous users to create an account.
- $wgVectorUseIconWatch – 观看和取消观看为星形图标,而不是链接(仅适用于Vector皮肤界面)。
- $wgVectorUseSimpleSearch – Vector皮肤下搜索表单的外观。
资源加载器
- 参见资源加载器 以获取更多信息。
- $wgAllowSiteCSSOnRestrictedPages – 允许在受限的特殊页面使用站点级层叠样式表(CSS)
- $wgCodexDevelopmentDir (在版本1.43引入) – If this is set, MediaWiki will look for Codex files in this directory instead of in
resources/lib/codex/
and friends. - $wgIncludeLegacyJavaScript (在版本1.39移除) – Whether to include the mediawiki.legacy JavaScript library (old wikibits.js), and its dependencies.
- $wgLegacyJavaScriptGlobals (在版本1.37移除) – Whether or not to assign configuration variables to the global window object.
- $wgResourceBasePath – Default
remoteBasePath
value for resource loader modules. - $wgResourceLoaderClientPreferences (在版本1.40引入) (在版本1.41移除) – Enable client-side preferences for unregistered users.
- $wgResourceLoaderDebug – The default debug mode (on/off) for ResourceLoader requests.
- $wgResourceLoaderEnableJSProfiler – When enabled, execution of JavaScript modules is profiled client-side.
- $wgResourceLoaderEnableSourceMapLinks (在版本1.41引入) – Whether to include a SourceMap header in ResourceLoader responses for JavaScript modules.
- $wgResourceLoaderMaxage – How long a CDN or browser may cache a ResourceLoader HTTP response.
- $wgResourceLoaderMaxQueryLength – Maximum query string length for ResourceLoader requests.
- $wgResourceLoaderSources – Foreign module sources registry.
- $wgResourceLoaderStorageEnabled – Whether ResourceLoader should attempt to persist modules in localStorage on browsers that support the Web Storage API.
- $wgResourceLoaderStorageVersion – Cache version for client-side 资源加载器 module storage.
- $wgResourceLoaderUseObjectCacheForDeps (在版本1.44移除) – Use the main stash instead of the module_deps table for indirect dependency tracking
- $wgResourceLoaderValidateJS – Validate JavaScript code loaded from wiki pages.
- $wgResourceModuleSkinStyles – Array of additional skin-provided stylesheets to existing ResourceLoader modules.
- $wgResourceModules – Array of all extra defined modules that can later be loaded during the output.
- $wgVueDevelopmentMode – Whether to use the development version of Vue.js.
页面标题及重定向
- $wgDisableHardRedirects – Disable redirects to special pages and interwiki redirects, which use a 302 and have no "redirected from" link.
- $wgFixDoubleRedirects – 在页面移动后,修复双重重定向。
- $wgInvalidRedirectTargets – Array of invalid page redirect targets.
- $wgShortPagesNamespaceBlacklist (在版本1.37移除) – Optional array of namespaces which should be blacklisted from Special:ShortPages
- $wgShortPagesNamespaceExclusions – Optional array of namespaces which should be excluded from Special:ShortPages
- $wgCapitalLinkOverrides – 各名字空间的$wgCapitalLinks 设置。
- $wgCapitalLinks – 将此值设置为false可以防止将链接的首字母强制大写。
- $wgLegalTitleChars (在1.41版本中已弃用) – 覆盖页面标题中的默认非法字符列表。
- $wgMaxRedirects (在版本1.39移除) – 解析重定向时的最大重定向数量。
命名空间
- $wgContentNamespaces – 被认为包含真内容或文章的命名空间。
- $wgCanonicalNamespaceNames – Canonical namespace names.
- $wgExtraNamespaces – 额外名字空间。
- $wgExtraGenderNamespaces – Same as $wgExtraNamespaces , but for namespaces with gender distinction.
- $wgExtraSignatureNamespaces – Controls in which subject (non-talk) namespaces the "Signature" button on the edit toolbar will be displayed.
- $wgMetaNamespace – 为“元”名字空间所使用的名字。
- $wgMetaNamespaceTalk – 名字空间的名称
- $wgNamespaceAliases – 为名字空间提供其他名称。
- $wgNamespacesWithSubpages – 哪些名字空间应该支持子页面功能?
移动端支持
跨wiki的链接和站点
- $wgInterwikiPrefixDisplayTypes (在版本1.39移除) – Mapping of interwiki index prefixes to descriptors that can be used to change the display of interwiki search results.
- $wgLocalInterwikis – Array of interwiki prefixes for this wiki.
- $wgLocalInterwiki (在版本1.35移除) – 此维基的跨维基前缀。
- $wgRedirectSources – 用于限制将显示为“重定向自”链接的 URL 的正则表达式。
- $wgSiteTypes – Register handlers for specific types of sites.
跨维基缓存
- 更多信息另见interwiki cache 。
- $wgInterwikiCache – Interwiki cache as an associative array.
- $wgInterwikiExpiry – Expiry time for memcached cache of
interwiki
table. - $wgInterwikiFallbackSite – Used by maintenance scripts to dump
interwiki
table - $wgInterwikiScopes – 由
getInterwikiCache()
使用,以从跨wiki数据库文件中检索
Parser
- $wgAllowDisplayTitle – Allows use of
{{DISPLAYTITLE}}
magic word - $wgAllowExternalImagesFrom – If
$wgAllowExternalImages
is false, you can specify exceptions here. - $wgAllowExternalImages – 决定 MediaWiki 是否允许算繪外部图像 URL ,外部图像 URL 在 wiki 文本中以 inline 呈现,而不需要其他标记包裹。
- $wgAllowImageTag (在版本1.42移除) – 允许在wiki文本中使用
<img>
标签。 - $wgCleanSignatures – 在签名中替代模板。
- $wgEnableImageWhitelist – Enables an on-wiki external image whitelist
- $wgEnableMagicLinks – Controls whether magic link functionality should be enabled
- $wgEnableScaryTranscluding – 允許從另一個wiki導入/引用模板。
- $wgExpensiveParserFunctionLimit – 对于每次解析时对高耗时解析器方法调用次数的最大限制,例如魔术字
PAGESINCATEGORY
- $wgExternalLinkTarget – 设置外部链接的默认目标。
- $wgMaxGeneratedPPNodeCount (在版本1.35移除) – A complexity limit on template expansion: the maximum number of nodes generated by
Preprocessor::preprocessToObj()
- $wgMaxPPExpandDepth – Stack depth limit for expansion with the preprocessor.
- $wgMaxPPNodeCount – A complexity limit on template expansion: the maximum number of nodes visited by
PPFrame::expand()
- $wgMaxTemplateDepth – 模板内模板的最大递归深度。
- $wgMaxTocLevel – Maximum indent level of the table of contents (ToC).
- $wgNoFollowDomainExceptions – External links to these domain names (or any subdomains) will not be set to
rel="nofollow"
. - $wgNoFollowLinks – 若设置为true,在维基文本中的外部链接将被赋予
rel="nofollow"
属性。 - $wgNoFollowNsExceptions – Namespaces in which 手册:$wgNoFollowLinks doesn't apply.
- $wgParserConf (在版本1.36移除) – 路径配置
- $wgParserEnableLegacyHeadingDOM (在版本1.43引入) – Enable legacy HTML structure for headings in the output from the Parser.
- $wgParserEnableLegacyMediaDOM (在1.41版本中已弃用) – Enable legacy media HTML structure in the output from the Parser.
- $wgParserEnableUserLanguage (在版本1.43引入) – Set this to
true
to allow the{{USERLANGUAGE}}
magic word to return the actual user language. - $wgParsoidSettings – Default Parsoid configuration.
- $wgParsoidSelectiveUpdateSampleRate (在版本1.43引入) – Sample rate for collecting statistics on Parsoid selective update.
- $wgPreprocessorCacheThreshold – Preprocessor caching threshold.
- $wgRegisterInternalExternals – Whether to register external links pointing to the same server.
- $wgRestrictDisplayTitle – 将
{{DISPLAYTITLE}}
限制为归一化为相同典范数据库密钥的标题 - $wgTranscludeCacheExpiry – 维基间包含缓存的到期时间
- $wgUrlProtocols – Defines the protocols which are supported and translated in HTML by the mediawiki parser.
- $wgUseNewMediaStructure (在版本1.37移除) – Emit using the new media structure described at, Parsing/Media structure
- $wgUseLegacyMediaStyles (在版本1.41引入) – Temporary flag to re-enable the old thumbnail styles provided by core for the legacy media HTML structure.
HTML
- $wgRawHtml – 允许未经检查的原始HTML放在
<html>...</html>
里。 - $wgTidyConfig – Configuration of the HTML postprocessing tool to use for fixing invalid HTML code.
统计和内容分析
- $wgActiveUserDays – 在一段时间中有编辑的用户将被视为活跃用户。
- $wgArticleCountMethod – 方法用于确定内容名称空间中的页是否应算作有效的內容頁面(條目)。
- $wgDisableCounters (在版本1.35移除) – 禁用页面预览次数计数器。
- $wgExperiencedUserEdits – Determines the number of edits needed to qualify at the "Experienced user" level.
- $wgExperiencedUserMemberSince – Determines the number of days needed since account creation to qualify at the "Experienced user" level.
- $wgLearnerEdits – Determines the number of edits needed to qualify at the "Learner" experience level.
- $wgLearnerMemberSince – Determines the number of days needed since account creation to qualify at the "Learner" experience level.
- $wgManualRevertSearchRadius – Maximum number of revisions of a page that will be checked against every new edit made to determine whether the edit was a manual revert.
- $wgRevertedTagMaxDepth – Maximum depth (revision count) of reverts that will have their reverted edits marked with the mw-reverted change tag.
用户账户、身份验证
- $wgAllowRequiringEmailForResets (在版本1.43移除) – Temporary feature flag that controls whether users will see a checkbox allowing them to require providing email during password resets.
- $wgAutoCreateTempUser – Configuration for automatic creation of temporary accounts on page save.
- $wgConditionalUserOptions (在版本1.42引入) – 默认用户参数设置。
- $wgDefaultUserOptions – 默认用户参数设置。
- $wgHiddenPrefs – 禁用某些用户首选项。
- $wgInvalidUsernameCharacters – 创建新账号时阻止的字符。
- $wgMaximalPasswordLength (在版本1.42移除) – 指定用户密码的最长长度。
- $wgMaxNameChars – Maximum number of bytes in username.
- $wgMaxSigChars – 自定义签名的最大wiki代码长度。
- $wgMinimalPasswordLength (在版本1.42移除) – 指定用户密码的最短长度。
- $wgPasswordPolicy – 指定与密码强度和安全性相关的各种设置。
- $wgReservedUsernames – 列出的不应存在的用户名。
- $wgSignatureValidation – 簽名驗證的行為。
- $wgSignatureAllowedLintErrors – 不會導致簽名驗證失敗的lint錯誤列表。
- $wgUserrightsInterwikiDelimiter – 在Special:UserRights用作用户名和数据库名称之间的分隔符字符。
身份验证
- $wgAllowSecuritySensitiveOperationIfCannotReauthenticate – Whether to allow security-sensitive operations when reauthentication is not possible
- $wgAuthenticationTokenVersion – When changed, all existing sessions are invalidated.
- $wgAuthManagerAutoConfig – Register authentication providers to use with AuthManager
- $wgAuthManagerConfig – Manual override for authentication provider configuration
- $wgCentralIdLookupProviders – 注册中心ID查找提供者。
- $wgCentralIdLookupProvider – Default central id lookup implementation to use
- $wgChangeCredentialsBlacklist – List of AuthenticationRequest class names which are not changeable through Special:ChangeCredentials and the changeauthenticationdata API.
- $wgInvalidPasswordReset – Specifies if users should be sent to a password-reset form on login in case of an inadequate password.
- $wgPasswordConfig – Configuration for built-in password types.
- $wgPasswordDefault – 當用雜湊演算打散密碼時的預設密碼類型。
- $wgPasswordResetRoutes – Whether to allow password resets identified by various bits of data.
- $wgReauthenticateTime – Time frame for re-authentication
- $wgRememberMe – Configures RememberMe authentication request added by AuthManager.
- $wgRemoveCredentialsBlacklist – List of AuthenticationRequest class names which are not removable through Special:RemoveCredentials and the removeauthenticationdata API.
- $wgSecureLogin – 是否允许用户在来自http的时候使用https进行身份验证。
- $wgSessionProviders – Session provider configuration.
- $wgUserRegistrationProviders (在版本1.41引入) – User registration timestamp provider classes
用户权限、访问控制和监视
- $wgAddGroups – 控制不同用戶組在Special:Userrights可增加的用戶組。
- $wgAutoblockExpiry – 自动封禁过期前的有效秒数
- $wgBlockAllowsUTEdit – 允许被封禁的用户编辑他们的用户讨论页
- $wgDeleteRevisionsBatchSize – Page deletions with > this number of revisions will use the job queue.
- $wgDnsBlacklistUrls – List of DNS blacklists to use, if
$wgEnableDnsBlacklist
istrue
. - $wgEmailConfirmToEdit – 设置此参数为true则要求用户在编辑之前确认邮箱地址。
- $wgEnableDnsBlacklist – Whether to use DNS blocklists in
$wgDnsBlacklistUrls
to check for open proxies. - $wgGrantPermissionGroups – Used to define grant groups and assign grants to them.
- $wgGrantPermissions – Used to define grants and assign permissions to them.
- $wgGrantRiskGroups (在版本1.42引入) – Group grants by risk level.
- $wgGroupInheritsPermissions – Groups that should inherit permissions from another group.
- $wgGroupPermissions – 使用这个来设置用户所在用户组的权限。
- $wgGroupsAddToSelf – 使用此设置来允许用户通过 Special:Userrights 为自己添加指定的用户组。
- $wgGroupsRemoveFromSelf – 使用此设置来允许用户通过 Special:Userrights 为自己移除指定的用户组。
- $wgHideUserContribLimit – The maximum number of edits a user can have and can still be hidden by users with the
hideuser
permission. - $wgImplicitGroups – Groups that are not shown on Special:Listusers or somewhere else
- $wgPasswordAttemptThrottle – Limit password attempts per IP per address.
- $wgPrivilegedGroups (在版本1.40.1引入) – List of groups which should be considered privileged (user accounts belonging in these groups can be abused in dangerous ways).
- $wgProxyList – 禁止的IP地址列表
- $wgProxyWhitelist – Proxy allowlist: list of addresses that are assumed to be non-proxy despite what the other methods might say.
- $wgRateLimitsExcludedIPs – Array of IPs/CIDR ranges which should never trigger the rate limiter.
- $wgRateLimits – 简单的速率限制器选项可以用于制动大量编辑。
- $wgRemoveGroups – 控制不同用户组在Special:Userrights可移除的用户组。
- $wgRevokePermissions – Permission keys revoked from users in each group.
- $wgWhitelistReadRegexp – Whitelists publicly readable titles with regular expressions.
- $wgWhitelistRead – 一些匿名用户能够阅读的页面。
访问
Blocking/banning, and some other related settings.
- $wgAccountCreationThrottle – 每个IP可创建的帐户的数量,0为禁用。
- $wgApplyIpBlocksToXff – Apply IP address blocks also to users having a blocked IP in their XFF header.
- $wgAutoConfirmAge – 用户帐号在所需秒数后将成为“自动确认用户”的成员。
- $wgAutoConfirmCount – 自动确认用户所需的编辑次数。
- $wgAutopromoteOnceLogInRC – Whether to put user rights log entries for autopromotion in recent changes.
- $wgAutopromoteOnceRCExcludedGroups (在版本1.44引入) – Defines a denylist of group names.
- $wgAutopromoteOnce – Conditions of automatic promotion of user to specific groups that are done only once.
- $wgAutopromote – 将用户自动提升到特定组的条件
- $wgAvailableRights – A list of available rights, in addition to the ones defined by the core.
- $wgBlockCIDRLimit – 封禁IP范围时最大的CIDR范围。
- $wgBlockDisablesLogin – 如果设为true,则禁止被封禁的用户登录
- $wgBlockTargetMigrationStage (在版本1.42引入) (在1.43版本中已弃用) –
ipblocks
table schema migration stage, for normalizingipb_address
field and adding theblock_target
table. - $wgBotPasswordsCluster (在1.42版本中已弃用) – bot_passwords表的群集名称
- $wgBotPasswordsDatabase (在1.42版本中已弃用) –
bot_passwords
表的群集名称 - $wgCascadingRestrictionLevels – 限制可以使用级联保护的级别
- $wgDeleteRevisionsLimit – 整數,需要「bigdelete」權限才能刪除頁面的修訂版本數量。
- $wgEnableBotPasswords – 是否启用机器人密码
- $wgEnableMultiBlocks (在版本1.42引入) – If this is
false
, the number of blocks of a given target is limited to only 1. - $wgEnablePartialBlocks (在版本1.35移除) – 允許建立部分封鎖
- $wgEnablePartialActionBlocks – Flag to enable partial blocks against performing certain actions.
- $wgHideIdentifiableRedirects – Protects user's privacy when doing redirects
- $wgImplicitRights (在版本1.41引入) – A list of implicit rights, in addition to the ones defined by the core.
- $wgNamespaceProtection – 哪个名字空间能够被谁编辑?
- $wgNonincludableNamespaces – 使用此选项可拒绝包含来自特定名字空间的页面。
- $wgPutIPinRC – Log IP addresses in the recentchanges table.
- $wgQueryPageDefaultLimit – Integer defining default number of entries to show on query pages
- $wgRestrictionLevels – 可以在“页面保护”页面上选择的权限键集。
- $wgRestrictionTypes – 能被限制的操作
- $wgSemiprotectedRestrictionLevels – 被認定為「半保護」的限制級別
- $wgSoftBlockRanges – IP ranges that should be considered soft-blocked (anon-only, account creation allowed)
- $wgSpamRegex – A regular expression pattern which, if the page content matched it, stops a page from being saved.
- $wgSummarySpamRegex – Same as
$wgSpamRegex
except for edit summaries. - $wgSysopEmailBans (在版本1.35移除) – Allow sysops to ban users from accessing Special:Emailuser.
- $wgTempAccountCreationThrottle (在版本1.42引入) – Number of temporary accounts each IP address may create per specified period(s).
- $wgTempAccountNameAcquisitionThrottle (在版本1.42引入) – Number of temporary accounts usernames each IP address may acquire per specified period(s).
See 手册:阻止访问 for more methods and settings concerning access. See also 手册:用户权限 for more information about $wgGroupPermissions, $wgAddGroups, $wgRemoveGroups, etc.
- See User Access for User Access settings.
Security
- $wgAllowCrossOrigin – Allow anonymous cross origin requests to the REST API.
- $wgAllowUserCssPrefs – 允许用户在CSS中应用首选项。
- $wgAllowUserCss – 允许用户的层叠样式表(CSS)
- $wgAllowUserJs – 允许用户JavaScript页面
- $wgApiFrameOptions – Control framing of api pages.
- $wgBreakFrames – 脱离框架集。 This can be used to prevent external sites from framing your site with ads.
- $wgCSPFalsePositiveUrls – Controls what URLs to ignore in upcoming Content-Security-Policy feature's reporting.
- $wgCSPHeader – Controls Content-Security-Policy header [Experimental]
- $wgCSPReportOnlyHeader – 控制Content-Security-Policy-Report-Only的头部[实验性]
- $wgEditPageFrameOptions – Control framing of wiki pages globally.
- $wgHKDFAlgorithm (在版本1.43移除) – Algorithm for HMAC-based key derivation function (fast, cryptographically secure random numbers).
- $wgHKDFSecret (在版本1.43移除) – Secret for HMAC-based key derivation function (fast, cryptographically secure random numbers).
- $wgRestAllowCrossOriginCookieAuth – Allows authenticated cross-origin requests to the REST API with session cookies.
- $wgSecretKey – This should always be customized to a secret, unique string in LocalSettings.php .
- $wgSessionInsecureSecrets (在版本1.43移除) – Allows MediaWiki to work at the cost of storing sensitive session data insecurely.
- $wgSessionSecret – Secret for session storage.
- $wgUseSiteCss – 使用网站层叠样式表(CSS)
- $wgUseSiteJs – 使用网站的JavaScript页面
Cookies
- $wgCacheVaryCookies – A list of cookies that influence the cache.
- $wgCookieDomain – 为登录Cookie显式指定域。
- $wgCookieExpiration – 在HTTP cookie过期前的秒数。 您可以使用
$wgExtendedLoginCookieExpiration
替换为“记住我的登录状态”的cookie - $wgCookieHttpOnly – Set the
httpOnly
flag on all cookies set by MediaWiki (to prevent access from JavaScript). - $wgCookiePath – Explicitly declared "path" for cookies at the cookie domain
- $wgCookiePrefix – Custom cookie prefix.
- $wgCookieSameSite – 用于登录cookie(小型文本文件)的SameSite cookie属性。
- $wgCookieSecure – Whether cookies are secured.
- $wgCookieSetOnAutoblock – 决定在用户被自动封禁时是否设置Cookie。 这样做意味着即使在注销且使用新IP地址后,被封禁的用户仍会被封禁。
- $wgCookieSetOnIpBlock – Determines whether to set a cookie when an IP user is blocked. Doing so means that a blocked user, even after moving to a new IP address, will still be blocked.
- $wgDisableCookieCheck (在版本1.42移除) – Disables session cookies
- $wgExtendedLoginCookieExpiration – 如果非空,则为“记住我的登录状态”会话的持续时间(秒);0意味着直到浏览器关闭。 如果为空,使用$wgCookieExpiration
- $wgSessionName – Override to customize the session name.
- $wgUseSameSiteLegacyCookies (在版本1.42移除) – Send a legacy cookie with an
ss0-
prefix whenSameSite=None
is sent.
Profiling, testing and debugging
- $wgCachePrefix – Custom value for the cache key prefix.
- $wgEnableJavaScriptTest – Allows running of JavaScript test suites via Special:JavaScriptTest (such as QUnit).
- $wgParserTestFiles (在版本1.40移除) – 由parserTests.php运行的解析器测试套件文件。
Debug
- See also: 手册:如何调试
- $wgDebugComments – 在页面HTML注释中包含部分日志输出
- $wgDebugDumpSql – Dump SQL queries to debug output
- $wgDebugLogFile – 调试日志的文件名,若禁用则为空。
- $wgDebugLogGroups – 将某些组的
wfDebugLog()
输出直接输出到$wgDebugLogFile
以外的文件。 - $wgDebugLogPrefix – Prefix for debug log lines.
- $wgDebugRawPage – If false, 'action=raw' and load.php hits will not result in debug output.
- $wgDebugRedirects – Displays redirect location instead of actually redirecting to the target URL
- $wgDebugTimestamps (在版本1.35移除) – 在调试消息前加上相对时间戳。
- $wgDebugToolbar – 显示调试工具栏
- $wgDeprecationReleaseLimit – Release limitation to
wfDeprecated
warnings. - $wgDevelopmentWarnings – 是否针对某些可能的错误情况和不建议使用的函数引发PHP通知。
- $wgLogExceptionBacktrace – Whether to send the exception backtrace to the error log.
- $wgMWLoggerDefaultSpi – Default service provider for creating MWLogger instances.
- $wgOverrideHostname – Override server hostname detection with a hardcoded value.
- $wgPageInfoTransclusionLimit – Limit template transclusion on InfoAction
- $wgPropagateErrors – If true, the MediaWiki error handler passes errors/warnings to the default error handler after logging them.
- $wgShowDBErrorBacktrace (在版本1.37移除) – If true, show a backtrace for database errors.
- $wgShowDebug – Show debug data at bottom of content area
- $wgShowExceptionDetails – If set to true, uncaught exceptions will print a detailed stack trace to output.
- $wgShowHostnames – 如果设置为
true
,则通过API和HTML注释公开主机名。 - $wgShowSQLErrors (在版本1.37移除) – Whether to show SQL errors on "we're sorry, but there has been a database error" pages.
- $wgSpecialVersionShowHooks – 是否在Special:Version中显示$wgHooks的内容。
- $wgTrxProfilerLimits – Performance expectations for DB usage
Profiling
- $wgEnableProfileInfo (在版本1.35移除) – Controls the availability of profileinfo.php.
- $wgMetricsTarget (在版本1.40移除) – Output target URI for the MetricsFactory service, e.g. udp://127.0.0.1:8125.
- $wgMetricsPrefix (在版本1.40移除) – Service name prefix for the MetricsFactory service.
- $wgMetricsFormat (在版本1.40移除) – Output format for the MetricsFactory service, e.g. 'statsd'.
- $wgOpenTelemetryConfig (在版本1.43引入) – Configuration for OpenTelemetry instrumentation, or
null
to disable it. - $wgProfiler – Settings related to profiling.
- $wgProfileLimit (在版本1.35移除) – Only record profiling info for pages that took longer than this number of seconds to load.
- $wgProfileOnly (在版本1.35移除) – 不要将非分析信息放入日志文件
- $wgStatsdMetricPrefix – Prefix for metric names sent to $wgStatsdServer
- $wgStatsdSamplingRates (在版本1.43移除) – Sampling rate for statsd metrics as an associative array of patterns and rates.
- $wgStatsdServer – Statsd伺服器的主機或主機:端口。
- $wgStatsFormat (在版本1.40引入) – Output format for the StatsFactory service, e.g. 'statsd'.
- $wgStatsPrefix (在版本1.40引入) – Service name prefix for the StatsFactory service.
- $wgStatsTarget (在版本1.40引入) – Output target URI for the StatsFactory service, e.g. udp://127.0.0.1:8125.
搜索
- $wgAdvancedSearchHighlighting – Set to true to have more useful text snippets in search results.
- $wgDisableInternalSearch – Disable internal search so that extensions can implement it.
- $wgDisableSearchUpdate – 若您半永久性禁用了搜索,这也会禁用对表的更新。
- $wgDisableTextSearch – 禁用全文搜索。
- $wgEnableOpenSearchSuggest (在版本1.40移除) – 启用MediaWiki请求的开放搜索(OpenSearch)建议。
- $wgEnableSearchContributorsByIP – Whether searching for an IP address will be redirected to that IP's contributions page.
- $wgNamespacesToBeSearchedDefault – Which namespaces should be searched?
- $wgOpenSearchDefaultLimit – Integer defining default number of entries to show on OpenSearch call.
- $wgOpenSearchDescriptionLength – 摘录的最小长度为
<Description>
。 - $wgOpenSearchTemplates – Templates for OpenSearch suggestions.
- $wgOpenSearchTemplate (在版本1.42移除) – Template for OpenSearch suggestions.
- $wgSearchForwardUrl – Set this to a URL to forward search requests to some external location.
- $wgSearchHighlightBoundaries – Regexp to match word boundaries
- $wgSearchMatchRedirectPreference – Set
true
to allow logged-in users to set a preference whether or not matches in search results should force redirection to that page. - $wgSearchRunSuggestedQuery – If search returns zero results and current search engine has a "did you mean" suggestion, results for the suggestion will be shown.
- $wgSearchSuggestCacheExpiry – Expiry time for search suggestion responses.
- $wgSitemapNamespacesPriorities – Custom namespace priorities for sitemaps.
- $wgSitemapNamespaces – Array of namespaces identified by their IDs to generate a sitemap or false for all namespaces.
- $wgSpecialSearchFormOptions – Options for Special:Search completion widget form created by SearchFormWidget class.
- $wgUseTwoButtonsSearchForm (在版本1.36移除) – 侧边栏的搜索表单行为。
Edit user interface
- $wgDiff3 – GNU diff3实用程序的路径。
- $wgDiff – GNU diff实用程序的路径。
- $wgPreviewOnOpenNamespaces – Namespaces where preview-on-first-edit is forced.
- $wgUniversalEditButton – Enable the UniversalEditButton for browsers that support it.
- $wgUseAutomaticEditSummaries – MediaWiki是否应该产生自动编辑摘要。
Maintenance Scripts setting
- $wgCommandLineDarkBg – Assume a dark terminal background for maintenance scripts.
- $wgCommandLineMode – 指示MediaWiki是否运行在命令行模式下。 不应被人工设置!
- $wgGitBin – git二进制路径。
- $wgGitRepositoryViewers – Map of Git repository URLs to their gitweb interface URLs
- $wgReadOnlyFile – 如果找到此文件,则数据库将由于文件内容中给出的原因而被锁定。
- $wgReadOnlyWatchedItemStore – Set this to
true
to put the wiki watchlists into read-only mode. - $wgReadOnly – 禁止编辑,显示给出的字符串作为原因。
- $wgUpgradeKey – Password that controls access to web-based updater.
Recent changes, new pages, watchlist and history
See also Help:最近更改 and $wgDefaultUserOptions
.
- $wgDisableAnonTalk – 禁用匿名用户(未登录)的讨论页面。
- $wgRCChangedSizeThreshold – 突出显示字符数差异小于此值。
- $wgRCEngines (在1.38版本中已弃用) – Legacy mapping from URI schemes to RCFeed subclasses.
- $wgRCFeeds – Configuration for sending RC updates
- $wgRCFilterByAge – Filter $wgRCLinkDays by $wgRCMaxAge to avoid showing links for numbers higher than what will be stored.
- $wgRCLinkDays – List days options to list in the Special:Recentchanges and Special:Recentchangeslinked pages.
- $wgRCLinkLimits – 列出在Special:Recentchanges和Special:Recentchangeslinked页面中的更改限制选项。
- $wgRCMaxAge – recentchanges 表中的项目会定期清除;超过此秒数的条目将消失。
- $wgRCShowChangedSize – 显示最近更改中更改的字符数。
- $wgRCShowWatchingUsers – 向观察的用户显示最近的更改,监视列表和页面历史记录视图。
- $wgRCWatchCategoryMembership – Treat category membership changes as a RecentChange.
- $wgRecentChangesFlags – Flags (letter symbols) shown in recent changes and watchlist to indicate certain types of edits.
- $wgShowUpdatedMarker – Show new changes: bold in watchlist, with "updated since my last visit" in history.
- $wgSoftwareTags – 要启用的核心标签列表。
- $wgStructuredChangeFiltersLiveUpdatePollingRate – Polling rate, in seconds, used by the 'live update' feature of Special:RecentChanges and Special:Watchlist
- $wgUnwatchedPageSecret – If active watchers (per $wgWatchersMaxAge ) are this number or less, do not disclose it.
- $wgUnwatchedPageThreshold – Allows users without the "unwatchedpages" user right to view the number of page watchers for a specified page via the "info" action if the number of watchers is above the specified threshold.
- $wgUseFilePatrol – 使用文件巡查检查Special:Newfiles 上的新文件
- $wgUseNPPatrol – 使用新頁面巡查以檢查破壞
- $wgUseRCPatrol – 使用最近更改巡查以檢查破壞
- $wgUseTagFilter – Allow filtering by change tag in recentchanges, history, etc.
- $wgWatchersMaxAge – Page watchers inactive for more than this many seconds are considered inactive. Used mainly by action=info .
- $wgWatchlistExpiryMaxDuration – Relative maximum duration for watchlist expiries, as accepted by strtotime().
- $wgWatchlistExpiry – 开启监视列表过期功能。
- $wgWatchlistPurgeRate – The per-edit rate at which expired watchlist items will be purged from the database.
Feed
- $wgFeed – Toggle syndication feeds (RSS, Atom e.g. Recentchanges, Newpages) on and off.
- $wgAdvertisedFeedTypes – Feed types that should be provided by default.
- $wgFeedCacheTimeout – Minimum timeout for cached Recentchanges feed, in seconds.
- $wgFeedClasses – Available feeds objects.
- $wgFeedDiffCutoff – When generating Recentchanges RSS/Atom feed, diffs will not be generated for pages larger than this size.
- $wgFeedLimit – Set maximum number of results to return in syndication feeds (RSS, Atom) for e.g. Recentchanges, Newpages.
- $wgOverrideSiteFeed – Override the site's default rss/atom feed that appears on every page.
版权
- $wgMaxCredits – 设定您希望在文章下方显示的作者数目。
- $wgRightsIcon – Override for copyright metadata.
- $wgRightsPage – 覆盖版权元数据。
- $wgRightsText – 覆盖版权元数据。
- $wgRightsUrl – 版权的元数据
- $wgShowCreditsIfMax – 如果作者数目大于
$wgMaxCredits
,则只显示其中$wgMaxCredits
位作者。 - $wgUseCopyrightUpload – 如果要在上载时获得详细的版权信息表格,请将其设置为true。
Import/Export
- $wgExportAllowAll – Whether to allow exporting the entire wiki into a single file.
- $wgExportAllowHistory – 在 Special:Export 页面启用导出全部历史选项。
- $wgExportAllowListContributors – 控制是否允许在使用“Special:Export”页导出页面时列举所有贡献者。
- $wgExportFromNamespaces – Whether to allow the "export all pages in namespace" option.
- $wgExportMaxHistory – 对于修订历史记录高于设置的页面,使用“Special:Export”的请求将被拒绝。
- $wgExportMaxLinkDepth – Maximum value of the "pagelink-depth" parameter in Special:Export.
- $wgExportPagelistLimit – Maximum number of pages returned by the GetPagesFromCategory and GetPagesFromNamespace functions.
- $wgImportSources – List of interwiki prefixes for wikis we'll accept as sources for Special:Import
- $wgImportTargetNamespace – Wiki间导入的可选默认目标名称空间。
- $wgXmlDumpSchemaVersion – The schema to use by default when generating XML dumps.
Extensions
- $wgAutoloadAttemptLowercase (在版本1.40移除) – 开关控制旧的不区分大小写的类加载。
- $wgAutoloadClasses – Array mapping class names to filenames, for autoloading.
- $wgEnableParserLimitReporting – 控制是否输出NewPP解析器报告 的HTML注释到输出页面中。
- $wgExtensionCredits – Global list of extension credits
- $wgExtensionEntryPointListFiles – Array of files with list(s) of extension entry points to be used in maintenance/mergeMessageFileList.php
- $wgExtensionFunctions – MediaWiki完全初始化后调用的回调函数列表。
- $wgExtensionMessagesFiles – Extension messages files.
- $wgHooks – 全域钩列表。
- $wgJobBackoffThrottling – Number of times work items of a job type can be run per second.
- $wgJobClasses – Maps jobs to their handling classes.
- $wgJobQueueIncludeInMaxLagFactor – Whether to include the number of jobs that are queued for the API's maxlag parameter.
- $wgJobSerialCommitThreshold (在版本1.42移除) – Make job runners commit changes for replica DB-lag prone jobs one job at a time.
- $wgJobTypeConf – Configuration for job storage.
- $wgJobTypesExcludedFromDefaultQueue – Jobs that must be explicitly requested, i.e. aren't run by job runners unless special flags are set.
- $wgMessagesDirs – 扩展消息目录。
- $wgPagePropLinkInvalidations – Page property link table invalidation lists.
- $wgParserOutputHooks (在版本1.41移除) – Parser output hooks.
- $wgServiceWiringFiles – List of service wiring files to be loaded by the default instance of MediaWikiServices.
- $wgSpecialPageCacheUpdates – Additional functions to be performed with updateSpecialPages.php .
- $wgSpecialPages – A list of custom special pages.
- $wgValidSkinNames – List of valid skin names. Skins can optionally use this variable to tell MediaWiki that they are available.
Category
- $wgCategoryCollation – What collation categories use to sort with
- $wgCategoryMagicGallery – On category pages, show thumbnail gallery for images belonging to that category instead of listing them as articles.
- $wgCategoryPagingLimit – Paging limit for items in categories.
- $wgUseCategoryBrowser (在版本1.38移除) – Enable/Disable experimental breadcrumb (or dmoz-style) category browsing.
- $wgSortedCategories (在版本1.43引入) – Whether to sort categories in OutputPage for display.
- $wgTempCategoryCollations – Additional category collations to store during LinksUpdate.
- $wgTrackingCategories (在1.25版本中已弃用) – The list of messages representing tracking categories which are listed at Special:TrackingCategories.
Logging
- $wgActionFilteredLogs – 可按操作类型被过滤的日志类型列表
- $wgFilterLogTypes – Show/hide links on Special:Log will be shown for these log types.
- $wgLogActionsHandlers – Same as
$wgLogActions
, but values are LogFormatter derived class names. - $wgLogActions – Lists the message key string for formatting individual events of each type and action when listed in the logs.
- $wgLogHeaders – Lists the message key string for descriptive text to be shown at the top of each log type.
- $wgLogNames – Lists the message key string for each log type.
- $wgLogRestrictions – 限制僅有特定權限的人才能存取日誌。
- $wgLogTypes – 日志类型列表。
- $wgNewUserLog – 是否保留新用户的注册日志,这能够在Special:Log/newusers查阅。
- $wgPageCreationLog – 是否要維護頁面建立的日誌,可在Special:Log/create查看。
Special pages
- $wgAllowSpecialInclusion – Allow special page inclusions such as
{{Special:Allpages}}
. - $wgCountCategorizedImagesAsUsed – On Special:UnusedFiles, consider images "used" if they are put into a category.
- $wgDisableQueryPageUpdate – Array of special pages that should not be updated.
- $wgMaxRedirectLinksRetrieved – Maximum number of links to a redirect page listed on Special:Whatlinkshere/RedirectDestination
- $wgRangeContributionsCIDRLimit – Shortest CIDR limits that can be checked in any individual range check at Special:Contributions.
Actions
- $wgActions – 正常页面的“action”参数的允许值的数组。正常页面的“action”参数的允许值的数组。
Robot policies
- $wgArticleRobotPolicies – Allow customisation of robot policies on a per-page basis.
- $wgDefaultRobotPolicy – Allows specifying the default robot policy for all pages on the wiki
- $wgExemptFromUserRobotsControl – 讓
__INDEX__
/__NOINDEX__
失效的命名空間編號的陣列。 - $wgNamespaceRobotPolicies – 允许基于每个名字空间自定义机器人方针。
Ajax, Action API and REST API
Ajax
- $wgAjaxEditStash (在版本1.37移除) – Whether edits should be prepared via AJAX as users type edit summaries.
- $wgAjaxExportList (在版本1.38移除) – List of functions in
AjaxFunctions.php
that are callable viaaction=ajax
- $wgAjaxLicensePreview – 使用Ajax预览上传许可。
- $wgAjaxUploadDestCheck (在版本1.41移除) – 启用Ajax检查以进行文件覆写,预上传。
- $wgUseAjax (在版本1.38移除) – 启用AJAX支持
API
- $wgAllowedCorsHeaders – 跨域API请求的允许标头列表。
- $wgAPICacheHelpTimeout – 设置API帮助文本缓存的超时。设置为0以禁用API帮助文本的缓存。
- $wgAPIFormatModules – API格式模块扩展。
- $wgAPIListModules – API list module extensions.
- $wgAPIMaxDBRows – Maximum number of rows to scan in API database queries.
- $wgAPIMaxLagThreshold – Maximum amount of DB lag on a majority of DB replica DBs to tolerate before forcing bots to retry any write requests via API errors.
- $wgAPIMaxResultSize – API 结果的最大大小(以字节为单位)。
- $wgAPIMaxUncachedDiffs – The maximum number of uncached diffs that can be retrieved in one API request.
- $wgAPIMetaModules – API meta module extensions.
- $wgAPIModules – API模块扩展。
- $wgAPIPropModules – API prop module extensions.
- $wgAPIRequestLog (在1.43版本中已弃用) – Log file or URL (TCP or UDP) to log API requests to.
- $wgAPIUselessQueryPages – The ApiQueryQueryPages module should skip pages that are redundant to true API queries.
- $wgCrossSiteAJAXdomainExceptions – Domains that should not be allowed to make AJAX requests, even if they match one of the domains allowed by
$wgCrossSiteAJAXdomains
. - $wgCrossSiteAJAXdomains – Domains that may make cross-site Ajax requests to the MediaWiki API.
- $wgDebugAPI – 放宽API安全防护以简化调试
- $wgEnableRestAPI (在版本1.36移除) – Enable the MediaWiki REST API.
- $wgRestAPIAdditionalRouteFiles – Additional REST API Route files.
- $wgRestSandboxSpecs (在版本1.43引入) – A list of OpenAPI specs to be made available for exploration on Special:RestSandbox.
Shell and process control
- $wgPhpCli – Executable path of PHP cli client (php/php5).
- $wgMaxShellFileSize – Maximum file size created by shell processes under linux, in KiB.
- $wgMaxShellMemory – Maximum amount of virtual memory available to shell processes under Linux, in KiB.
- $wgMaxShellTime – Maximum CPU time in seconds for shell processes under Linux.
- $wgMaxShellWallClockTime – Limit shell commands duration using real time.
- $wgShellboxSecretKey – The secret key for HMAC verification of Shellbox requests.
- $wgShellboxUrl (在版本1.40移除) – Shell commands can be run on a remote server using Shellbox.
- $wgShellboxUrls – 可以使用 Shellbox 在远程服务器上运行 Shell 命令。
- $wgShellCgroup – Limit shell commands memory using linux Cgroups.
- $wgShellLocale (在版本1.38移除) – Locale for
LC_ALL
. - $wgShellRestrictionMethod – Method to use to restrict shell commands
HTTP client
- $wgAllowExternalReqID – controls whether MediaWiki accepts the request ID set by the incoming request via the "X-Request-Id" header.
- $wgAsyncHTTPTimeout – Timeout for asynchronous HTTP requests.
- $wgHTTPConnectTimeout – Timeout for connections done internally (in seconds)
- $wgHTTPMaxTimeout – The maximum HTTP request timeout in seconds.
- $wgHTTPMaxConnectTimeout – The maximum HTTP connect timeout in seconds.
- $wgHTTPImportTimeout – Timeout for HTTP requests done internally for transwiki imports, in seconds.
- $wgHTTPProxy – 用于cURL请求的代理
- $wgHTTPTimeout – Timeout for HTTP requests done via cURL.
- $wgLocalHTTPProxy – Reverse proxy to use for requests to domains in $wgLocalVirtualHosts
- $wgLocalVirtualHosts – Local virtual hosts.
Jobs
- $wgJobRunRate – 每个请求要执行的作业数。
- $wgRunJobsAsync – Controls whether on-request jobs are run asynchronously or synchronously.
- $wgUpdateRowsPerJob – Number of rows to update per job.
- $wgUpdateRowsPerQuery – Number of rows to update per query.
Wiki farm
- $wgWikiFarmSettingsDirectory – A directory that contains site-specific configuration files.
- $wgWikiFarmSettingsExtension – The file extension to be used when looking up site-specific settings files in $wgWikiFarmSettingsDirectory , such as
'json'
or'yaml'
. - $wgWikiFarmSiteDetector (在版本1.39移除) – Callback to use to determine the name of the requested site for the current request.
Miscellaneous settings
- $wgActorTableSchemaMigrationStage (在版本1.39移除) –
actor
table schema migration stage. - $wgContentHandlerUseDB (在版本1.35移除) – Whether to use the database fields introduced by the ContentHandler facility
- $wgEditRecoveryExpiry (在版本1.42引入) – 编辑被存储后,持续保留编辑恢复 数据的秒数。
- $wgElementTiming (在版本1.39移除) – Enable Element Timing.
- $wgEnableEditRecovery (在版本1.41引入) – Whether to enable the client-side Edit Recovery feature.
- $wgEnableProtectionIndicators (在版本1.43引入) – Whether to show indicators on a page when it is protected.
- $wgEventRelayerConfig – Mapping of event channels (or channel categories) to EventRelayer configuration.
- $wgFeaturePolicyReportOnly – List of Feature Policy Reporting types to enable.
- $wgOutputPipelineStages (在版本1.43引入) – OutputPipelineStages to add to the DefaultOutputPipeline.
- $wgOriginTrials – Origin Trials tokens.
- $wgPagePropsHaveSortkey (在版本1.36移除) – Set to false if the
page_props
table doesn't have app_sortkey
column - $wgPingback – 如果为真,MediaWiki将不时报告有关其安装的数据,以帮助开发人员
- $wgPopularPasswordFile (在版本1.35移除) – Where popular password file is located.
- $wgPriorityHintsRatio (在版本1.39移除) – Ratio of requests that should get Priority Hints when the feature is enabled.
- $wgPriorityHints (在版本1.39移除) – Enable client-side Priority Hints.
- $wgRedirectOnLogin – 在登录后重定向的页面
- $wgReportToEndpoints – 报告 API 的终结点列表。
- $wgReportToExpiry – Expiry of the endpoint definition for the Reporting API.
- $wgShowDiffToggleSwitch (在版本1.41引入) (在1.41版本中已弃用) – Specifies if users should see the inline switch in diff pages.
- $wgShowLogoutConfirmation (在版本1.42引入) – Whether to display a confirmation screen during user log out.
- $wgSkinsPreferred – List of preferred skins to be listed higher in Special:Preferences
- $wgSpecialContributeSkinsDisabled (在版本1.40引入) (在版本1.40移除) – List of skins to not show the Special:Contribute page
- $wgSpecialContributeSkinsEnabled (在版本1.40引入) – List of skins that show a link to the Special:Contribute page
- $wgTranslationAliasesDirs (在版本1.42引入) – Message directories containing JSON files for localisation of special page aliases.
- $wgUseCodexSpecialBlock (在版本1.42引入) – Whether to use Codex in Special:Block form.
- $wgVirtualRestConfig – REST services configuration
- $wgWikiDiff2MovedParagraphDetectionCutoff (在1.34版本中已弃用) – This setting controls the maximum number of paragraphs to compare before it bails out.
參見
- Manual:Configuration for developers - how to set and retrieve configuration variables.
- Extension registration#Configs (Your extension/skins settings) - how to register new configuration variables for extensions and skins.