手册:配置设定
这是 DefaultSettings.php
支持的所有配置设定的帮助。
Never edit DefaultSettings.php
; copy appropriate lines to LocalSettings.php
instead and amend them as appropriate.
If you can't find a configuration setting here, see if it is defined in DefaultSettings.php
.
The variable should have some documentation there.
Manual:$wgAllowAnonymousMinor
).
通用设置
- $wgCanonicalServer – Canonical URL of the server, to use in IRC feeds, notification emails, etc.
- $wgServer – 服务器的基础URL。
- $wgServerName – 不包含协议的服务器名称。
- $wgSitename – 网站的名称。
- $wgVersion (在1.35版本中已弃用) – MediaWiki版本号。
URLs and file paths
- $IP – 安装目录的完整路径。
- $wgActionPaths – Paths for various user actions. Used to make URLs prettier.
- $wgAppleTouchIcon – 当 Apple 手持设备将 wiki 收藏到主屏幕时可选的指向一个图标的 URL
- $wgArticlePath – The base URL used to create article links.
- $wgConfigRegistry – Registry of factory functions to create config objects
- $wgDiff – GNU diff实用程序的路径。
- $wgDiff3 – Path to the GNU diff3 utility.
- $wgDirectoryMode – Default
chmod
permission value for newly created directories. - $wgFavicon – 该网站图标的URL。
- $wgFFmpegLocation – Executable name of FFmpeg client.
- $wgFFprobeLocation – Executable name of FFprobe.
- $wgGitBin – git二进制路径。
- $wgGitInfoCacheDirectory – Directory where GitInfo will look for pre-computed cache files.
- $wgImgAuthPath (引入 自 1.35) – The base path for
img_auth.php
. - $wgLoadScript – 至load.php的URL路径。
- $wgLogos (引入 自 1.35) – The URL path to various wiki logos.
- $wgLogo – 网站Logo的URL。
- $wgLogoHD (在1.35版本中已弃用) – 高清版本网站Logo的URL。
- $wgPhpCli – Executable name of PHP cli client (php/php5).
- $wgRestPath (引入 自 1.34) – The URL path to rest.php.
- $wgScript – index.php的URL。
- $wgScriptExtension (在1.27版本中已移除) – Extension to append to script names by default.
- $wgScriptPath – URL基路径。
- $wgSitesCacheFile (在1.33版本中已移除) – Specify the file location for the site's JSON cache file.
- $wgStyleSheetPath (在1.3版本中已弃用) – 不要设置
$wgStyleSheetPath
。请改用$wgStylePath
。 - $wgThumbPath (引入 自 1.35.1) – The base path for thumb_handler.php.
- $wgTmpDirectory – 临时目录的路径。
- $wgUsePathInfo – Whether to use 'pretty' URLs.
- $wgVariantArticlePath – Used for links when having language's variants.
See also file/image upload path settings.
See also skins path settings.
Global Objects
- $wgAutoloadLocalClasses – Array mapping class names to filenames, for autoloading.
- $wgConf – 创建组维基。在一般的安装中并不常用。
- $wgVirtualRestConfig – REST services configuration
邮件设置
See also User Access: $wgEmailConfirmToEdit
- $wgAdditionalMailParams – Additional email parameters, will be passed as the last argument to
mail()
PHP function call. - $wgAllowHTMLEmail – 设置为真以启用HTML邮件。
- $wgEmailAuthentication – Set to true to enable email authentication (confirmation) for this wiki. Except for password reminder emails, email functions only work for authenticated email addresses.
- $wgEmergencyContact – 网站管理员电子邮件地址
- $wgEnableEmail – Set to true to enable basic email features.
- $wgEnableSpecialMute (引入 自 1.34) (在1.34版本中已弃用) – Set to true to enable the Special Mute page.
- $wgEnableUserEmail – Set to true to enable user-to-user email.
- $wgEnableUserEmailBlacklist – Set to true to enable user-to-user email blacklist.
- $wgNoReplyAddress – Reply-to address for automatically generated emails.
- $wgPasswordReminderResendTime – Minimum time, in hours, which must elapse between password reminder emails.
- $wgPasswordSender – Password reminder email address.
- $wgRequirePasswordforEmailChange (在1.27版本中已移除) – Whether the user must enter their password to change their email address
- $wgSMTP – For using a direct (authenticated) SMTP server connection.
- $wgSysopEmailBans (在1.35版本中已移除) – Allow sysops to ban users from accessing Special:Emailuser.
- $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.
Email notification (Enotif) settings
- Actual notifications for each user are defined in the options. You can change defaults with $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
- $wgEnotifUseJobQ (在1.27版本中已移除) – 使用队列发送邮件。
- $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上的发生改动时,向数组中的用户发送邮件通知。
Database settings
- $wgAllDBsAreLocalhost (在1.28版本中已移除) – 使所有数据库连接秘密链至localhost。
- $wgContentHandlerUseDB (在1.35版本中已移除) – Whether to use the database fields introduced by the ContentHandler facility
- $wgPageLanguageUseDB – 允许更改MediaWiki页面的页面语言
- $wgDataCenterUpdateStickTTL – After a state-changing request is done by a client, this determines how many seconds that client should keep using the master datacenter.
- $wgDBcompress – 是否在数据库连接中使用压缩。
- $wgDBDefaultGroup (引入 自 1.32) – Default group to use when getting database connections. For use by maintenance scripts.
- $wgDBerrorLog – File to log database errors to.
- $wgDBmwschema – Schema that stores the MediaWiki tables in.
- $wgDBname – 数据库名称。
- $wgDBpassword –
$wgDBuser
的密码。 - $wgDBprefix – 数据表名称的前缀。
- $wgDBserver – 数据库服务器主机名或 IP 地址。
- $wgDBssl – Whether to use SSL in DB connection.
- $wgDBtype – 数据库的类型。
- $wgDBuser – 数据库的用户名。
- $wgDebugDBTransactions (在1.27版本中已移除) – Enable additional database transaction lifecycle tracing in the debug output.
- $wgLocalDatabases – Other wikis on this site, can be administered from a single developer account.
- $wgMaxUserDBWriteDuration – Max time (in seconds) a user-generated transaction can spend in writes.
- $wgSearchType – Type of search used for the wiki.
LoadBalancer settings
- $wgDBservers – Settings for the database load balancer (database servers and load ratios).
- $wgDefaultExternalStore – Default external store for new revisions.
- $wgLBFactoryConf – 负载均衡工厂配置。
- $wgMasterWaitTimeout (在1.24版本中已弃用) – How long to wait for a slave to catch up to the master.
- $wgSlaveLagCritical – If lag is higher than this value, show a more obvious warning than
$wgSlaveLagWarning
. - $wgSlaveLagWarning – If lag is higher than this value, show a warning in some special pages (like watchlist).
MSSQL-specific
- $wgDBWindowsAuthentication (在1.35版本中已移除) – 使用集成Windows验证而不是
$wgDBuser
/$wgDBpassword
结合。
MySQL-specific
- $wgDBmysql5 (在1.33版本中已移除) – Set to true to set MySQL connection into UTF-8 encoding (experimental)
- $wgDBTableOptions – 在安装及更新过程中使用的MySQL表选项。
- $wgExternalServers – 一组外部MySQL服务器。
- $wgSQLMode – Value for the MySQL
sql_mode
parameter
Oracle-specific
- $wgDBOracleDRCP (在1.34版本中已移除) – When set to true, enables persistent connection with DRCP on Oracle.
PostgreSQL-specific
- $wgDBport – 数据库端口。只用于PostgreSQL。
SQLite-specific
- $wgSQLiteDataDir – 覆盖默认SQLite数据目录。
- $wgSharedDB – 共享的数据库的名称。
- $wgSharedPrefix – 用于共享数据库表的表前缀。
- $wgSharedTables – 在
$wgSharedDB
启用时要共享的数据库表(没有前缀)。 - $wgSharedSchema – The table schema for the shared database
Compressed Storage Support
- $wgCompressRevisions – Compress new page revisions if possible
- $wgDisableOutputCompression – 禁用输出压缩(如果zlib可用,则默认情况下启用压缩)。
Migration
- $wgActorTableSchemaMigrationStage (在1.34版本中已移除) – Actor table schema migration stage.
- $wgChangeTagsSchemaMigrationStage (引入 自 1.32) (在1.33版本中已移除) – Change tag table schema migration stage.
- $wgCommentTableSchemaMigrationStage (在1.33版本中已移除) – Comment table schema migration stage.
- $wgMultiContentRevisionSchemaMigrationStage (引入 自 1.32) – RevisionStore table schema migration stage (content, slots, content_models & slot_roles tables).
- $wgPagePropsHaveSortkey – Set to false if the
page_props
table doesn't have app_sortkey
column - $wgTagStatisticsNewTable (引入 自 1.32) (在1.33版本中已移除) – Temporarily flag to use change_tag_def table as backend of change tag statistics.
Extension fields
- $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
Localization
- $wgDisabledVariants – Disabled variants for language variant conversion.
- $wgDisableLangConversion – Whether to enable language variant conversion.
- $wgDisableTitleConversion – Whether to enable language variant conversion for links.
- $wgDummyLanguageCodes (在1.29版本中已弃用) – List of language codes that have been renamed to new (correct) codes, or don't correspond to an actual interface language.
- $wgEditEncoding (在1.28版本中已移除) – Characters not explicitly converted by output encoding
- $wgExtraLanguageCodes – List of mappings from one language code to another
- $wgForceUIMsgAsContentMsg – Array of UI messages that should be treated as content messages.
- $wgInterwikiMagic – Treat language links as magic connectors, not inline links.
- $wgLangObjCacheSize – 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).
- $wgMsgCacheExpiry (在1.34版本中已移除) – When a message in cache expires (in seconds).
- $wgOverrideUcfirstCharacters (引入 自 1.34) – List of Unicode characters for which capitalization is overridden in Language::ucfirst.
- $wgRawHtmlMessages (引入 自 1.32) – 可能包含原始HTML的訊息列表。
- $wgUseDatabaseMessages – 使用MediaWiki:命名空间翻译
- $wgUserFallbackLanguages – maximum number of fallback languages per user
Timezone settings
- $wgLocaltimezone – 伪造服务器认为它所在的时区。
- $wgLocalTZoffset – Add a distance to the server timezone in Minutes.
- $wgDBerrorLogTZ – 在错误日志中使用的时区。
Language-specific
- 英语
- $wgAmericanDates – Use 'mdy' instead of 'dmy' as the default date format, e.g. 'May 12' instead of '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.
Debug/logging
- See also: 手册:如何调试
- $wgAggregateStatsID (在1.27版本中已移除) – Allows statistics to be aggregated over more than one wiki when using udp logging.
- $wgDebugComments – Include portions of log output in page HTML comment
- $wgDebugDumpSql – Dump SQL queries to debug output
- $wgDebugDumpSqlLength (在1.27版本中已移除) – Cutoff length for SQL queries dumped by $wgDebugDumpSql
- $wgDebugLogFile – 调试日志的文件名,若禁用则为空。
- $wgDebugLogGroups – 将某些组的
wfDebugLog()
输出直接输出到$wgDebugLogFile
以外的文件。 - $wgDebugLogPrefix – Prefix for debug log lines.
- $wgDebugPrintHttpHeaders (在1.34版本中已移除) – 在调试信息中为每个请求打印HTTP标头。
- $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.32版本中已弃用) – If true, show a backtrace for database errors.
- $wgShowDebug – Show debug data at bottom of content area
- $wgShowSQLErrors (在1.32版本中已弃用) – Whether to show SQL errors on "we're sorry, but there has been a database error" pages.
- $wgShowExceptionDetails – If set to true, uncaught exceptions will print a complete stack trace to output.
- $wgStatsMethod (在1.27版本中已移除) – Destination for
wfIncrStats()
data - $wgTrxProfilerLimits – Performance expectations for DB usage
- $wgUsePigLatinVariant – Whether to enable the pig latin variant of English (en-x-piglatin), used to ease variant development work.
Profiling
- $wgEnableProfileInfo (在1.35版本中已移除) – Controls the availability of profileinfo.php.
- $wgProfiler – Settings related to profiling.
- $wgProfileCallTree (在1.27版本中已移除) – 如果为true,则打印原始调用树而不是按功能报告
- $wgProfileLimit (在1.35版本中已移除) – Only record profiling info for pages that took longer than this number of seconds to load.
- $wgProfileOnly (在1.35版本中已移除) – 不要将非分析信息放入日志文件
- $wgProfilePerHost (在1.27版本中已移除) – Should the application server hostname be stored in the profiling table?
- $wgUDPProfilerHost (在1.27版本中已移除) – UDP探查器的主机。
- $wgUDPProfilerPort (在1.27版本中已移除) – UDP探查器的端口。
- $wgUDPProfilerFormatString (在1.27版本中已移除) – Format string for UDP profiler.
Site customization
- $wgBreakFrames – Break out of framesets. This can be used to prevent external sites from framing your site with ads.
- $wgCapitalLinks – 将此值设置为false可以防止将链接的首字母强制大写。
- $wgCapitalLinkOverrides – 各名字空间的$CapitalLinks设置。
- $wgDefaultLanguageVariant – Default language variant.
- $wgEditPageFrameOptions – Control framing of wiki pages globally.
- $wgEditSubmitButtonLabelPublish – 在公開的Wiki上將「保存」標籤改為「發布」
- $wgExtraLanguageNames – List of language names or overrides for default names in Names.php.
- $wgForceHTTPS (引入 自 1.34.3) – Redirect insecure HTTP requests to HTTPS.
- $wgHideInterlanguageLinks – 隐藏侧边栏的中介语言链接。
- $wgHttpsPort – Port where you have HTTPS running. Supports HTTPS on non-standard ports.
- $wgLegalTitleChars – 覆盖页面标题中的默认非法字符列表。
- $wgMainPageIsDomainRoot (引入 自 1.34) – Controls if the main page should be served as the domain root.
- $wgMaxArticleSize – 頁面最大大小,以KiB計。
- $wgMaxRedirects – 解析重定向时的最大重定向数量。
- $wgNoFollowDomainExceptions – External links to these domain names (or any subdomains) will not be set to
rel="nofollow"
. - $wgNoFollowLinks – 若设置为true,在维基文本中的外部链接将被赋予
rel="nofollow"
属性。 - $wgPingback – If true, MediaWiki will report back data about its installation from time to time to aid developers
- $wgReferrerPolicy – [$spec referrer policy] meta 标签的值。
- $wgReportToEndpoints (引入 自 1.34) – List of endpoints for the Reporting API.
- $wgReportToExpiry (引入 自 1.34) – Expiry of the endpoint definition for the Reporting API.
- $wgSiteNotice – 在每个页面的顶部显示一条消息。
- $wgStyleVersion (在1.32版本中已移除) – Appended in the query string of static CSS and JS to clear client side cache when changing this.
- $wgSiteTypes – Register handlers for specific types of sites.
- $wgSiteSupportPage (在1.32版本中已移除) – 维基中支持页面的标题。
- $wgStructuredChangeFiltersOnWatchlist (在1.32版本中已移除) – Whether to enable RCFilters app on Special:Watchlist
- $wgStructuredChangeFiltersShowPreference (在1.32版本中已移除) – Whether to enable RCFilters app on Special:RecentChanges
- $wgUniversalEditButton – Enable the UniversalEditButton for browsers that support it.
- $wgUrlProtocols – Defines the protocols which are supported and translated in HTML by the mediawiki parser.
Ajax
- $wgAjaxExportList (在1.27版本中已弃用) – List of functions in
AjaxFunctions.php
that are callable viaaction=ajax
- $wgAjaxUploadDestCheck – 启用Ajax检查以进行文件覆写,预上传。
- $wgAjaxWatch (在1.27版本中已移除) – Enable watching/unwatching pages using Ajax.
- $wgRestAPIAdditionalRouteFiles (引入 自 1.35) – Additional REST API Route files.
- $wgUseAjax (在1.31版本中已弃用) – 启用AJAX支持
Frontend
- $wgAllowSiteCSSOnRestrictedPages – 允许在受限的特殊页面使用站点级层叠样式表(CSS)
- $wgAllowUserCss – Allow user Cascading Style Sheets (CSS)
- $wgAllowUserJs – 允许用户JavaScript页面
- $wgEnableJavaScriptTest – Allows running of JavaScript test suites via Special:JavaScriptTest (such as QUnit).
- $wgForcedRawSMaxage – Default maximum age (in seconds) for raw CSS/JavaScript accesses.
- $wgIncludeLegacyJavaScript (在1.26版本中已弃用) – Whether to include the mediawiki.legacy JavaScript library (old wikibits.js), and its dependencies.
- $wgOOUIEditPage (在1.30版本中已移除) – 是否在编辑表单中使用漂亮OOjs UI 按钮,复选框和摘要输入。
- $wgPreloadJavaScriptMwUtil (在1.27版本中已移除) – Whether to preload the mediawiki.util module as blocking module in the top queue.
- $wgLegacyJavaScriptGlobals – Whether or not to assign configuration variables to the global window object.
- $wgUseSiteCss – 使用网站层叠样式表(CSS)
- $wgUseSiteJs – 使用网站的JavaScript页面
- $wgUsejQueryThree (在1.31版本中已移除) – Whether to use jQuery 3 (with jQuery Migrate) instead of jQuery 1.
ResourceLoader
- See ResourceLoader for more information.
- $wgResourceBasePath – Default 'remoteBasePath' value for resource loader modules.
- $wgResourceLoaderDebug – The default debug mode (on/off) for ResourceLoader requests.
- $wgResourceLoaderEnableJSProfiler (引入 自 1.32) – When enabled, execution of JavaScript modules is profiled client-side.
- $wgResourceLoaderLESSVars (在1.32版本中已移除) – 全域LESS变量。
- $wgResourceLoaderLESSImportPaths (在1.32版本中已移除) – Default import paths for LESS modules.
- $wgResourceLoaderMaxage – Maximum time in seconds to cache resources served by ResourceLoader.
- $wgResourceLoaderMaxQueryLength – Maximum query string length for ResourceLoader requests.
- $wgResourceLoaderMinifierMaxLineLength (在1.31版本中已移除) – Maximum line length when minifying JavaScript.
- $wgResourceLoaderMinifierStatementsOnOwnLine (在1.31版本中已移除) – Put each statement on its own line when minifying JavaScript.
- $wgResourceLoaderSources – Foreign module sources registry.
- $wgResourceLoaderStorageVersion – Cache version for client-side ResourceLoader module storage.
- $wgResourceLoaderValidateJS – Whether to parse JavaScript module prior to minification to validate them.
- $wgResourceLoaderValidateStaticJS (在1.32版本中已移除) – Whether to parse statically-sourced (file-backed) JavaScript resources prior to minification to validate them.
- $wgResourceLoaderStorageEnabled – Whether ResourceLoader should attempt to persist modules in localStorage on browsers that support the Web Storage API.
- $wgResourceLoaderUseObjectCacheForDeps (引入 自 1.35) – Use the main stash instead of the module_deps table for indirect dependency tracking
- $wgResourceModules – Array of all extra defined modules that can later be loaded during the output.
- $wgResourceModuleSkinStyles – Array of additional skin-provided stylesheets to existing ResourceLoader modules.
- $wgVueDevelopmentMode (引入 自 1.35) – Whether to use the development version of Vue.js.
Namespaces
- $wgContentNamespaces – Namespaces which are considered to contain real content, or articles
- $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 – Name used for the meta namespace.
- $wgMetaNamespaceTalk – 名字空间的名称
- $wgNamespaceAliases – 为名字空间提供其他名称。
- $wgNamespaceContentModels – Content types defined for a given namespace
- $wgNamespaceProtection – 哪个名字空间能够被谁编辑?
- $wgNamespacesToBeSearchedDefault – Which namespaces should be searched?
- $wgNamespacesWithSubpages – 哪些名字空间应该支持子页面功能?
- $wgNoFollowNsExceptions – Namespaces in which 手册:$wgNoFollowLinks doesn't apply.
- $wgNonincludableNamespaces – 使用此选项可拒绝包含来自特定名字空间的页面。
- $wgPreviewOnOpenNamespaces – Namespaces where preview-on-first-edit is forced.
- $wgSitemapNamespaces – Array of namespaces to generate a sitemap or false for all namespaces.
- $wgSitemapNamespacesPriorities – Custom namespace priorities for sitemaps.
Output
- $wgAllowMicrodataAttributes (在1.27版本中已移除) – Enable HTML5 microdata attributes for use in wikitext.
- $wgAllowRdfaAttributes (在1.27版本中已移除) – Enable RDFa attributes for use in wikitext.
- $wgCleanupPresentationalAttributes (在1.20.1版本中已移除) – 在CSS中放置尽可能多的演示HTML属性。
- $wgHtml5 (在1.34版本中已移除) – 是否输出HTML5文档类型。
- $wgHtml5Version – Defines the value of the version attribute in the
<html>
tag, if any. - $wgWellFormedXml (在1.27版本中已移除) – 是否尝试使我们的HTML输出格式正确的XML。
- $wgMimeType – The type to send in the $type header.
- $wgMangleFlashPolicy – Whether to mangle any
<cross-domain-policy>
(Adobe cross-domain policy) tags, to prevent XSS attacks. - $wgSend404Code – Send 404 HTTP status for not found pages.
- $wgEnableCanonicalServerLink – Output a
<link rel="canonical">
tag on every page indicating the canonical server which should be used, i.e.$wgServer
or$wgCanonicalServer
. - $wgUseMediaWikiUIEverywhere – Applies MediaWiki UI wherever it can be supported.
- $wgHTMLFormAllowTableFormat – Allow form components to render tables.
- $wgXhtmlNamespaces – Permit other XHTML namespaces in addition to the w3.org default.
The following setting is no longer used in supported versions of MediaWiki, but still exists for backward compatibility
- $wgXhtmlDefaultNamespace (在1.34版本中已移除) – 在XHTML模式下输出时要使用的名字空间。
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 – Allow customisation of robot policies on a per-namespace basis.
Mobile support
Content Security Policy
- $wgCSPHeader (引入 自 1.32) – Controls Content-Security-Policy header [Experimental]
- $wgCSPReportOnlyHeader (引入 自 1.32) – Controls Content-Security-Policy-Report-Only header [Experimental]
- $wgCSPFalsePositiveUrls – Controls what URLs to ignore in upcoming Content-Security-Policy feature's reporting.
ContentHandler
- $wgContentHandlerTextFallback – How to react if a plain text version of a non-text Content object is requested using
ContentHandler::getContentText()
- $wgContentHandlers – Mapping of content type handlers
- $wgTextModelsToParse – Determines which types of text are parsed as wikitext.
Site Statistics
- $wgArticleCountMethod – 方法用于确定内容名称空间中的页是否应算作有效的內容頁面(條目)。
- $wgCountCategorizedImagesAsUsed – On Special:Unusedimages, consider images "used" if they are put into a category.
- $wgDisableCounters (在1.35版本中已移除) – 禁用页面预览次数计数器。
- $wgStatsdSamplingRates – Sampling rate for statsd metrics as an associative array of patterns and rates.
- $wgSiteStatsAsyncFactor (在1.34版本中已移除) – Sets how often site statistics should be updated.
- $wgStatsdServer – Statsd伺服器的主機或主機:端口。
- $wgStatsdMetricPrefix – Prefix for metric names sent to $wgStatsdServer
- $wgWantedPagesThreshold – Minimum number of pages that must link to a page before it will appear on Special:Wantedpages.
Skins
- $wgDefaultSkin – 新用户默认皮肤。
- $wgFallbackSkin – Fallback skin used when the skin defined by $DefaultSkin 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
- $wgLocalStylePath – Same as
$wgStylePath
, but shouldn't point to an external domain. - $wgSkipSkin (在1.35版本中已移除) – Specify the name of a skin that should not be presented in the list of available skins.
- $wgSkipSkins – Specify the name of skins that should not be presented in the list of available skins.
- $wgStyleDirectory – The file system path to the skins directory.
- $wgStylePath – 皮肤目录的URL。
- $wgUseCombinedLoginLink – Login / create account link behavior when it's possible for anonymous users to create an account.
- $wgValidSkinNames – List of valid skin names. Skins can optionally use this variable to tell MediaWiki that they are available.
- $wgVectorUseSimpleSearch – Vector皮肤下搜索表单的外观。
- $wgVectorUseIconWatch – 观看和取消观看为星形图标,而不是链接(仅适用于Vector皮肤界面)。
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 – Enable/Disable experimental breadcrumb (or dmoz-style) category browsing.
- $wgTrackingCategories (在1.25版本中已弃用) – The list of messages representing tracking categories which are listed at Special:TrackingCategories.
Cache
- $wgAttemptFailureEpoch – Bump this to quickly retry thumbnail creation failures.
- $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.
- $wgCachePrefix – Custom value for the cache key prefix.
- $wgClockSkewFudge (在1.33版本中已移除) – Fudge time to add to cache timestamps to adjust for clock skew.
- $wgExtensionInfoMTime – Time to invalidate cache of extensions loaded by the extension registration system.
- $wgFooterLinkCacheExpiry (引入 自 1.35) – Expiry time for the footer link cache, in seconds, or 0 if disabled.
- $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 – Replicated object cache setting
- $wgObjectCaches – Advanced object cache configuration.
- $wgQueryCacheLimit – Number of rows to cache in 'querycache' table when miser mode is on.
- $wgThumbnailEpoch – If rendered thumbnail files are older than this timestamp, they will be re-rendered on demand as if the file didn't already exist.
- $wgTransactionalTimeLimit – Throttle for timing out transactional POST requests
- $wgUseETag (在1.28版本中已移除) – Whether MediaWiki should send an ETag header.
- $wgUseGzip – 用GZip存儲緩存頁面
- See: Interwiki for Interwiki cache settings.
Client side caching
- $wgCachePages – Allow client-side caching of pages
File Cache
Settings for Server side file caching.
- $wgFileCacheDepth – Depth of subdirectory hierarchy under
$wgFileCacheDirectory
. - $wgFileCacheDirectory – Directory where the cached pages will be saved when using server-side caching.
- $wgUseFileCache – 为未注册的查看器创建静态HTML页以减少数据库流量。
Message Cache
- $wgAdaptiveMessageCache – Keep track which messages are requested and load only most used messages.
- $wgLocalisationCacheConf – Localisation cache configuration.
- $wgMaxMsgCacheEntrySize – Maximum entry size in the message cache, in bytes.
- $wgMessageCacheType – Message cache setting
- $wgUseLocalMessageCache – Make a local copy of the message cache, in addition to memcached.
Sidebar Cache
- $wgEnableSidebarCache – If true, cache the sidebar navigation links.
- $wgSidebarCacheExpiry – Expiry time for the sidebar cache, in seconds.
Parser Cache
- $wgEnableParserCache (在1.33版本中已移除) – Keep parsed pages in a cache to speed up page output.
- $wgOldRevisionParserCacheExpireTime (引入 自 1.36) – 旧版本的解析器缓存的过期时间(以秒为单位)。
- $wgRenderHashAppend – 将配置的值附加到解析器缓存和sitenotice缓存键。
- $wgParserCacheExpireTime – Expiration time (in seconds) of cached parser information
- $wgParserCacheType – Parser cache setting
Memcached settings
Settings for configuring the Memcached memory-based object store (if you are using it) docs/memcached.txt has more details.
- $wgMemCachedDebug – 如果服务器无法正常运行,将在Setup.php中将其设置为false。
- $wgMemCachedPersistent – 是否使用与Memcached服务器的持久连接。
- $wgMemCachedServers – Memcached servers
- $wgMemCachedTimeout – Server connection timeout in microseconds.
- $wgObjectCacheSessionExpiry – 启用
$wgSessionsInObjectCache
时,用于会话存储的过期时间(以秒为单位)。 - $wgRevisionCacheExpiry – Cache extracted revision text in MemCached.
- $wgSessionsInMemcached (在1.29版本中已移除) – Store session data in the object cache, rather than on the filesystem.
- $wgSessionCacheType – The cache type for storing session data.
- $wgSessionsInObjectCache (在1.33版本中已移除) – Whether to store sessions in object cache.
WAN cache
- $wgEnableWANCacheReaper – Whether to verify and enforce WAN cache purges using reliable DB sources as streams.
- $wgMainWANCache – Main wide area network cache configuration.
- $wgWANObjectCaches – Advanced Wide-Area-Network cache configuration.
Interwiki
- $wgDisableHardRedirects – Disable redirects to special pages and interwiki redirects, which use a 302 and have no "redirected from" link.
- $wgEnableScaryTranscluding – 允許從另一個wiki導入/引用模板。
- $wgExternalInterwikiFragmentMode – Determines which ID escaping mode should be used for external interwiki links
- $wgExtraInterlanguageLinkPrefixes – Array of interwiki prefixes to be treated as language links.
- $wgImportSources – List of interwiki prefixes for wikis we'll accept as sources for Special:Import
- $wgInterlanguageLinkCodeMap (引入 自 1.35) – 当跨维基代码不完全匹配时,跨语言链接代码到语言代码的映射可以覆写显示的语言名称。
- $wgInterwikiPrefixDisplayTypes – Mapping of interwiki index prefixes to descriptors that can be used to change the display of interwiki search results.
- $wgLocalInterwiki (在1.35版本中已移除) – 此维基的跨维基前缀。
- $wgLocalInterwikis – Array of interwiki prefixes for this wiki.
- $wgRedirectSources – Regular expression to restrict URLs which will be displayed as "redirected from" links.
- $wgTranscludeCacheExpiry – 维基间包含缓存的到期时间
Interwiki cache
- See interwiki cache for more information.
- $wgInterwikiCache – Set to an associative array or file path to a CDB file for interwiki cache .
- $wgInterwikiExpiry – Expiry time for memcached cache of interwiki table.
- $wgInterwikiFallbackSite – Used by maintenance scripts to dump interwiki table
- $wgInterwikiScopes – 由
getInterwikiCache()
使用,以从跨wiki数据库文件中检索
Access
Wiki locking, blocking/banning, and some other related settings.
- $wgActions – Array of allowed values for the "action" parameter for normal pages.
- $wgAutopromote – 将用户自动提升到特定组的条件
- $wgAutopromoteOnce – Conditions of automatic promotion of user to specific groups that are done only once.
- $wgAccountCreationThrottle – 每个IP可创建的帐户的数量,0为禁用。
- $wgApplyIpBlocksToXff – Apply IP address blocks also to users having a blocked IP in their XFF header.
- $wgBlockCIDRLimit – 封禁IP范围时最大的CIDR范围。
- $wgBlockDisablesLogin – 如果设为true,则禁止被封禁的用户登录
- $wgBotPasswordsDatabase – bot_passwords表的群集名称
- $wgBotPasswordsCluster – bot_passwords表的群集名称
- $wgCascadingRestrictionLevels – 限制可以使用级联保护的级别
- $wgSemiprotectedRestrictionLevels – 被認定為「半保護」的限制級別
- $wgDeleteRevisionsLimit – Integer of how many revisions a page must have before the bigdelete right is required to delete it.
- $wgEnablePartialBlocks (引入 自 1.33) (在1.35版本中已移除) – 允許建立部分封鎖
- $wgEnableBotPasswords – 是否启用机器人密码
- $wgElementTiming (引入 自 1.33) – Enable Element Timing.
- $wgInvalidPasswordReset – Specifies if users should be sent to a password-reset form on login in case of an inadequate password.
- $wgNewPasswordExpiry – The time, in seconds, after which an emailed temporary password expires.
- $wgOriginTrials (引入 自 1.33) – Origin Trials tokens.
- $wgPasswordAttemptThrottle – Limit password attempts per IP per address.
- $wgPasswordConfig – Configuration for built-in password types.
- $wgPasswordDefault – Default password type to use when hashing user passwords.
- $wgPasswordResetRoutes – Whether to allow password resets identified by various bits of data.
- $wgPasswordSalt (在1.34版本中已移除) – 为了与旧安装的兼容性,设置为false。
- $wgPriorityHints (引入 自 1.33) – Enable client-side Priority Hints.
- $wgPriorityHintsRatio (引入 自 1.34) – Ratio of requests that should get Priority Hints when the feature is enabled.
- $wgRangeContributionsCIDRLimit – Shortest CIDR limits that can be checked in any individual range check at Special:Contributions.
- $wgRestrictionTypes – 能被限制的操作
- $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. - $wgCookieSetOnAutoblock – 决定在用户被自动封禁时是否设置Cookie。 这样做意味着即使在注销且使用新IP地址后,被封禁的用户仍会被封禁。
- $wgCookieSetOnIpBlock (引入 自 1.32) – 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.
- $wgRestrictionLevels – 可以在“页面保护”页面上选择的权限键集。
- $wgSoftBlockRanges – IP ranges that should be considered soft-blocked (anon-only, account creation allowed)
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.
Rate limiter
- $wgRateLimitLog (在1.27版本中已移除) – Set to a filename to log rate limiter hits.
- $wgRateLimits – 简单的速率限制器选项可以用于制动大量编辑。
- $wgRateLimitsExcludedIPs – Array of IPs/CIDR ranges which should never trigger the rate limiter.
API
- $wgAllowedCorsHeaders (引入 自 1.35) – 跨域API请求的允许标头列表。
- $wgDebugAPI – 放宽API安全防护以简化调试
- $wgEnableAPI (在1.32版本中已移除) – 通过 api.php 启用直接访问数据API的功能。
- $wgEnableWriteAPI (在1.32版本中已移除) – 允许API在授权用户访问时用于执行写操作(页面编辑、回退等)。
- $wgEnableRestAPI (引入 自 1.34) (在1.35版本中已弃用) – Enable the MediaWiki REST API.
- $wgCrossSiteAJAXdomains – Domains that may make cross-site Ajax requests to the MediaWiki API.
- $wgCrossSiteAJAXdomainExceptions – Domains that should not be allowed to make AJAX requests, even if they match one of the domains allowed by
$wgCrossSiteAJAXdomains
. - $wgAPICacheHelpTimeout – 设置API帮助文本缓存的超时。设置为0以禁用API帮助文本的缓存。
- $wgApiFrameOptions – Control framing of api pages.
- $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.
- $wgAPIRequestLog – 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.
Wiki locking
- $wgReadOnly – 禁止编辑,显示给出的字符串作为原因。
- $wgReadOnlyFile – 如果找到此文件,则数据库将由于文件内容中给出的原因而被锁定。
- $wgReadOnlyWatchedItemStore – Set this to true to put the wiki watchlists into read-only mode.
Reduction
- $wgAPIMaxDBRows – Maximum number of rows to scan in API database queries.
- $wgAPIMaxResultSize – Maximum size (in bytes) of an API result.
- $wgAPIMaxUncachedDiffs – The maximum number of uncached diffs that can be retrieved in one API request.
- $wgQueryPages – List of Special pages that inherit from QueryPage, that should also be taken in account by the updateSpecialPages.php maintenance script.
- $wgDisableQueryPages – Disable all query pages if miser mode is on, not just some.
- $wgDisableQueryPageUpdate – Array of special pages that should not be updated.
- $wgDisableSearchUpdate – If you've disabled search semi-permanently, this also disables updates to the table.
- $wgDisableTextSearch – Disable full-text search.
- $wgEdititis – Display user edit counts on special page "User list".
- $wgFixDoubleRedirects – 在页面移动后,修复双重重定向。
- $wgInvalidRedirectTargets – Array of invalid page redirect targets.
- $wgMaximumMovedPages – Maximum number of pages to move at once when moving subpages with a page.
- $wgMiserMode – 啟用/停用資料庫密集型功能
- $wgShowHostnames – 如果设置为true,则通过API和HTML注释公开主机名。
- $wgShowRollbackEditCount – Maximum number to count when a rollback link is shown
Uploads
Uploads have to be specially set up to be secure.
- $wgAjaxLicensePreview – 使用Ajax预览上传许可。
- $wgAllowCopyUploads – 允许像上传本地文件般从URL上传文件。
- $wgCopyUploadsDomains – 指定
$wgAllowCopyUploads
允许的白名单 - $wgAllowJavaUploads – Allow Java archive uploads.
- $wgCheckFileExtensions – 检查上传是是否允许文件名
- $wgCopyUploadAsyncTimeout (在1.27版本中已移除) – 通过URL异步上传的HTTP超时(以秒为单位)
- $wgCopyUploadsFromSpecialUpload – 通过在 Special:Upload 添加用户界面启用从URL上传文件
- $wgCopyUploadProxy – 用于复制上载请求的HTTP代理器。
- $wgCopyUploadTimeout – HTTP timeout (in seconds) for upload by URL
- $wgAllowAsyncCopyUploads (在1.27版本中已移除) – Allow asynchronous copy uploads.
- $wgDisableUploadScriptChecks – 是否禁用上传系统对于HTML/JavaScript的检查。
- $wgEnableAsyncUploads – Enable deferred upload tasks that use the job queue.
- $wgEnableUploads – 允许通过wiki上传图片和其他文件。
- $wgFileBackends – File backend structure configuration.
- $wgFileBlacklist – 不允许将具有这些扩展名的文件上传。
- $wgFileExtensions – This is the list of preferred extensions for uploading files. 上传不在此列表中的扩展名的文件将触发警告
- $wgHashedUploadDirectory – If true, uses the /a/ab/foo.jpg directory structure.
- $wgIllegalFileChars – Override the default list of illegal characters in file names.
- $wgImagePreconnect (引入 自 1.35) – On pages containing images, tell the user agent to pre-connect to hosts from
$wgForeignFileRepos
. - $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.
- $wgMinUploadChunkSize – Minimum upload chunk size, in bytes.
- $wgMaxUploadSize – 最大上传文件大小(字节)
- $wgStrictFileExtensions – Toggle whether users may upload files not covered by
$wgFileExtensions
. - $wgDeletedDirectory – 被删除的上传内容在哪个目录。
- $wgUploadBaseUrl – The base URL for uploaded images if shared upload directory isn't to be used
- $wgUploadDialog – Configuration for upload dialog and the files uploaded through it.
- $wgUploadDirectory – 上传目录的文件系统路径。
- $wgUploadMaintenance – 暂时禁止文件删除/恢复。
- $wgUploadMissingFileUrl – Point wikilinks to missing files ("red file links") to a custom URL.
- $wgUploadNavigationUrl – Point the upload navigation link in the sidebar to a custom URL.
- $wgUploadPath – The path segment of the upload directory.
- $wgUploadSizeWarning – Warn if uploaded files are larger than this.
- $wgUploadStashMaxAge – The maximum age of temporary (incomplete) uploaded files.
- $wgUploadStashScalerBaseUrl – To enable remote on-demand scaling, set this to the thumbnail base URL.
These settings are kept for backward compatibility, see $wgForeignFileRepos for the new setting, or $wgUseInstantCommons if you only need read access to images on Commons.
- $wgCacheSharedUploads – Cache shared metadata in memcached.
- $wgForeignFileRepos – 一个包含外部存储库结构信息的数组
- $wgForeignUploadTargets – Configuration for foreign upload targets for the upload dialog .
- $wgHashedSharedUploadDirectory – 是否对共享的上传目录进行哈希运算。
- $wgRepositoryBaseUrl – Base URL for a repository wiki.
- $wgSharedUploadDBname – DB name with metadata about shared directory.
- $wgSharedUploadDBprefix – DB prefix for shared image uploads
- $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 types
- $wgJsMimeType (在1.34版本中已移除) – 用于JavaScript脚本的媒体类型(MIME类型)。
- $wgLoadFileinfoExtension (在1.22.0 版本中已移除) – Switch for loading the FileInfo extension by PECL at runtime.
- $wgMimeDetectorCommand – Sets an external MIME detector program.
- $wgMimeInfoFile – Sets the MIME type info file to be used by MimeAnalyzer.php .
- $wgMimeTypeFile – Sets the MIME type definition file to be used by MimeAnalyzer.php .
- $wgTrivialMimeDetection – Switch for trivial MIME detection.
- $wgVerifyMimeType – Determines if the MIME type of uploaded files should be checked.
- $wgVerifyMimeTypeIE (引入 自 1.34) – Determines whether extra checks for Internet Explorer type detection should be applied.
- $wgMimeTypeBlacklist – MIME types to disallow if $wgVerifyMimeType is enabled.
- $wgXMLMimeTypes – An array of XML MIME types we can detect via MimeMagic
See also: Manual:Mime type detection
Images
- $wgAllowImageMoving (在1.36版本中已移除) – 启用文件重命名。
- $wgCustomConvertCommand – Use another resizing converter, e.g. GraphicMagick.
- $wgEnableAutoRotation – Whether to enable image auto-rotation based on EXIF information
- $wgExiftool – Path to exiftool binary. Used for lossless ICC profile swapping.
- $wgExiv2Command – Path to the exiv2 executable.
- $wgGalleryOptions – Default settings for the <gallery> tag.
- $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.
- $wgJpegTran – Path to jpegtran, for lossless JPEG rotation.
- $wgJpegQuality (引入 自 1.32) – When scaling a JPEG thumbnail, this is the quality we request from the backend.
- $wgMaxImageArea – 如果圖像使用太多工作內存,不要縮略圖像。
- $wgMediaHandlers – Plugins for media file type handling.
- parameters for upload path
- $wgTrustedMediaFormats – List of trusted media-types and MIME types.
- $wgNativeImageLazyLoading (引入 自 1.34) – Toggles native image lazy loading, via the "loading" attribute.
See also: 手册:配置文件上传
DjVu
- $wgDjvuDump – djvudump程序文件的路径。
- $wgDjvuOutputExtension – File extension for the DjVu post processor output.
- $wgDjvuPostProcessor – DjVu后处理器的路径。
- $wgDjvuRenderer – ddjvu DjVu渲染器的路径。
- $wgDjvuToXML – Path of the djvutoxml executable.
- $wgDjvuTxt – Path of the djvutxt DjVu text extraction utility.
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
Set $wgUseImageMagick to true to use ImageMagick instead of the builtin functions.
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 – Don't read SVG metadata beyond this point.
Thumbnail settings
- $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 – The format and MIME type to convert TIFF images to.
- $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.
Antivirus
- $wgAntivirus – Internal name of virus scanner.
- $wgAntivirusRequired – Determines if a failed virus scan will cause the file to be rejected.
- $wgAntivirusSetup – 不同病毒扫描程序的配置。
Parser
- $wgAllowDisplayTitle – Allows use of
{{DISPLAYTITLE}}
magic word - $wgAllowExternalImages – 决定MediaWiki是否将允许外部图像与文本内联(inline)呈现。
- $wgAllowExternalImagesFrom – If
$wgAllowExternalImages
is false, you can specify exceptions here. - $wgAllowSlowParserFunctions – 允许缓慢的解析器功能。
- $wgAllowImageTag (在1.35版本中已弃用) – 允许在wiki文本中使用
<img>
标签。 - $wgCleanSignatures – 在签名中替代模板。
- $wgEnableImageWhitelist – Enables an on-wiki external image whitelist
- $wgEnableMagicLinks – Controls whether magic link functionality should be enabled
- $wgEnableParserLimitReporting – 控制是否输出NewPP限制报告的HTML注释到输出页面中。
- $wgExperimentalHtmlIds (在1.32版本中已移除) – 每个HTML5是否应允许在id属性中使用更多的字符集?
- $wgExpensiveParserFunctionLimit – 对于每次解析时对高耗时解析器方法调用次数的最大限制,例如魔术字
PAGESINCATEGORY
- $wgExternalLinkTarget – Set a default target for external links.
- $wgFragmentMode – 决定章节 ID 的编码方式
- $wgGrammarForms – Used for
{{GRAMMAR:}}
parser function. - $wgLinkHolderBatchSize – LinkHolderArray batch size.
- $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 – Maximum recursion depth for templates within templates.
- $wgMaxTocLevel – Maximum indent level of toc.
- $wgMediaInTargetLanguage (引入 自 1.33) – Whether translatable media (currently, only SVG images) should be shown in page's target language
- $wgParserConf (在1.35版本中已弃用) – 路径配置
- $wgParserTestFiles (在1.30版本中已弃用) – 由parserTests.php运行的解析器测试套件文件。
- $wgParserTestMediaHandlers – Media handler overrides for parser tests (they don't need to generate actual thumbnails, so a mock will do)
- $wgPreprocessorCacheThreshold – Preprocessor caching threshold.
- $wgRegisterInternalExternals – Whether to register external links pointing to the same server.
- $wgRestrictDisplayTitle – 将
{{DISPLAYTITLE}}
限制为归一化为相同典范数据库密钥的标题 - $wgUseNewMediaStructure (引入 自 1.36) – Emit using the new media structure described at, Parsing/Media structure
HTML
- $wgRawHtml – 允许原始没有经过检查的HTML放在
<html>...</html>
里。
Tidy
![]() | 此頁面已过时。 |
Tidy is an open source tool that cleans up broken HTML. You can use this to ensure that broken HTML in articles doesn't affect the layout of your wiki. While Tidy itself is going to be replaced, the configuration settings can still be used for the replacements.
- $wgTidyConfig – Configuration of the HTML postprocessing tool to use for fixing invalid HTML code.
- $wgDebugTidy (在1.33版本中已移除) – Put tidy warnings in HTML comments, only works for internal tidy.
- $wgTidyBin (在1.33版本中已移除) – Should be set to the path of the tidy binary.
- $wgTidyConf (在1.33版本中已移除) – Should be set to the path of the tidy configuration file.
- $wgTidyInternal (在1.33版本中已移除) – Controls the use of the tidy extension to use an in-process tidy library instead of spawning a separate program.
- $wgTidyOpts (在1.33版本中已移除) – Options passed to tidy on the command line.
- $wgUseTidy (在1.33版本中已移除) – Use tidy to make sure HTML output is sane.
- $wgValidateAllHtml (在1.31版本中已移除) – Validate the overall output using tidy and refuse to display the page if it's not valid.
- See also: Manual:Build Tidy from source .
Special pages
- $wgActionFilteredLogs – List of log types that can be filtered by action types
- $wgAllowSpecialInclusion – Allow special page inclusions such as
{{Special:Allpages}}
. - $wgExportAllowAll – Whether to allow exporting the entire wiki into a single file.
- $wgExportAllowHistory – 在 Special:Export 页面启用导出全部历史选项。
- $wgExportAllowListContributors – 是否允许在导出页面时列举所有贡献者。
- $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.
- $wgFilterLogTypes – Show/hide links on Special:Log will be shown for these log types.
- $wgHideIdentifiableRedirects – Protects user's privacy when doing redirects
- $wgImportTargetNamespace – Optional default target namespace for interwiki imports.
- $wgLogActions – Lists the message key string for formatting individual events of each type and action when listed in the logs.
- $wgLogActionsHandlers – Same as
$wgLogActions
, but values are functions callbacks. - $wgLogHeaders – Lists the message key string for descriptive text to be shown at the top of each log type.
- $wgLoginLanguageSelector – Show a bar of language selection links in the user login and user registration forms.
- $wgLogNames – Lists the message key string for each log type.
- $wgLogRestrictions – 限制僅有特定權限的人才能存取日誌。
- $wgLogTypes – 日志类型列表。
- $wgMaxRedirectLinksRetrieved – Maximum number of links to a redirect page listed on Special:Whatlinkshere/RedirectDestination
- $wgQueryPageDefaultLimit – Integer defining default number of entries to show on query pages
- $wgRedirectOnLogin – 在登录后重定向的页面
- $wgSecureLogin – 是否允许用户在来自http的时候使用https进行身份验证。
- $wgShortPagesNamespaceBlacklist – Optional array of namespaces which should be blacklisted from Special:ShortPages
- $wgSpecialSearchFormOptions (引入 自 1.34) – Options for Special:Search completion widget form created by SearchFormWidget class.
- $wgSpecialVersionShowHooks – 是否在Special:Version中显示$wgHooks的内容。
- $wgPageCreationLog (引入 自 1.32) – Whether to maintain a log of new page creations, which can be viewed at Special:Log/create.
- $wgUseNPPatrol – 使用新頁面巡查以檢查破壞
- $wgUseFilePatrol – 使用文件巡查检查Special:Newfiles 上的新文件
- $wgWatchlistExpiry (引入 自 1.35) – 开启监视列表过期功能。
- $wgWatchlistPurgeRate (引入 自 1.35) – The per-edit rate at which expired watchlist items will be purged from the database.
Recent changes
See also Help:最近更改 and $wgDefaultUserOptions
- $wgAllowCategorizedRecentChanges (在1.31版本中已移除) – Allow to filter the recentchanges by a category or one of its sub(subsubsub...)categories
- $wgAutopromoteOnceLogInRC – Whether to put user rights log entries for autopromotion in recent changes.
- $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.
- $wgLogAutopatrol (在1.31版本中已移除) – 在log表記錄自動巡查動作
- $wgPutIPinRC – Log IP addresses in the recentchanges table.
- $wgRCChangedSizeThreshold – 突出显示字符数差异小于此值。
- $wgRCFilterByAge – Filter $wgRCLinkDays by $wgRCMaxAge to avoid showing links for numbers higher than what will be stored.
- $wgRCLinkLimits – List changes limits options to list in the Special:Recentchanges and Special:Recentchangeslinked pages.
- $wgRCLinkDays – List days options to list in the Special:Recentchanges and Special:Recentchangeslinked pages.
- $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.
- $wgStructuredChangeFiltersLiveUpdatePollingRate – Polling rate, in seconds, used by the 'live update' feature of Special:RecentChanges and Special:Watchlist
- $wgUseRCPatrol – 使用最近更改巡查以檢查破壞
- $wgWatchersMaxAge – Page watchers inactive for more than this many seconds are considered inactive. Used mainly by action=info .
- $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.
UDP updates
Send Recent changes updates via UDP. See: Manual:Simple IRC RC Bot
- $wgRCEngines – Configuration for RC feed protocol engines
- $wgRCFeeds – Configuration for sending RC updates
Users
- $wgActiveUserDays – 在一段时间中有编辑的用户将被视为活跃用户。
- $wgAllowRequiringEmailForResets (引入 自 1.34) (在1.34版本中已弃用) – Temporary feature flag that controls whether users will see a checkbox allowing them to require providing email during password resets.
- $wgAutoConfirmAge – 用户帐号在所需秒数后将成为“自动确认用户”的成员。
- $wgAutoConfirmCount – 自动确认用户所需的编辑次数。
- $wgAllowUserCssPrefs – Allow user preferences implemented in CSS.
- $wgDefaultUserOptions – 默认用户参数设置。
- $wgDisableAnonTalk – Disable talk pages for anonymous users (not logged in).
- $wgHiddenPrefs – 禁用某些用户首选项。
- $wgHKDFAlgorithm – Algorithm for HMAC-based key derivation function (fast, cryptographically secure random numbers).
- $wgHKDFSecret – Secret for HMAC-based key derivation function (fast, cryptographically secure random numbers).
- $wgInvalidUsernameCharacters – 创建新帐户时阻止的字符。
- $wgMaximalPasswordLength (在1.26版本中已弃用) – 指定用户密码的最长长度。
- $wgMaxNameChars – Maximum number of bytes in username.
- $wgMaxSigChars – 自定义签名的最大wiki代码长度。
- $wgMinimalPasswordLength (在1.26版本中已弃用) – 指定用户密码的最短长度。
- $wgNewUserLog – 是否保留新用户的注册日志,这能够在Special:Log/newusers查阅。
- $wgPasswordExpirationDays – The number of days that a user's password is good for.
- $wgPasswordExpireGrace – The number of seconds after a user's password expires during which they can log in without a password change.
- $wgPasswordPolicy – 指定与密码强度和安全性相关的各种设置。
- $wgReservedUsernames – 列出的不应存在的用户名。
- $wgShowIPinHeader (在1.27版本中已移除) – 在匿名用户的用户栏中显示IP。
- $wgSignatureValidation (引入 自 1.35) – 簽名驗證的行為。
- $wgSignatureAllowedLintErrors (引入 自 1.35) – 不會導致簽名驗證失敗的lint錯誤列表。
- $wgUserrightsInterwikiDelimiter – 在Special:UserRights用作用户名和数据库名称之间的分隔符字符。
Authentication
- $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
- $wgCentralIdLookupProvider – Default central id lookup implementation to use
- $wgCentralIdLookupProviders – 注册中心ID查找提供者。
- $wgChangeCredentialsBlacklist – List of AuthenticationRequest class names which are not changeable through Special:ChangeCredentials and the changeauthenticationdata API.
- $wgDisableAuthManager (在1.28版本中已移除) – Internal feature flag used for the AuthManager rollout process
- $wgExtendedLoginCookies (在1.28版本中已移除) – Dictates when the extended lifetime login cookies expire.
- $wgPopularPasswordFile (在1.35版本中已移除) – Where popular password file is located.
- $wgPHPSessionHandling – Whether to use PHP session handling (
$_SESSION
andsession_*()
functions) - $wgReauthenticateTime – Time frame for re-authentication
- $wgRemoveCredentialsBlacklist – List of AuthenticationRequest class names which are not removable through Special:RemoveCredentials and the removeauthenticationdata API.
- $wgSessionInsecureSecrets – Allows MediaWiki to work at the cost of storing sensitive session data insecurely.
- $wgSessionProviders – Session provider configuration.
- $wgSessionPbkdf2Iterations – Number of internal PBKDF2 iterations to use when deriving session secrets.
- $wgSessionSecret – Secret for session storage.
- $wgSuspiciousIpExpiry (引入 自 1.36) – Time in seconds to remember IPs for, for the purposes of logging IP changes within the same session.
User Access
- $wgAddGroups – 控制不同用戶組在Special:Userrights可增加的用戶組。
- $wgAutoblockExpiry – 自动封禁过期前的有效秒数
- $wgBlockAllowsUTEdit – 允许被封禁的用户编辑他们的用户讨论页
- $wgDeleteRevisionsBatchSize (引入 自 1.32) – Page deletions with > this number of revisions will use the job queue.
- $wgEmailConfirmToEdit – 设置此参数为true则要求用户在编辑之前确认邮箱地址。
- $wgGrantPermissions – Used to define grants and assign permissions to them.
- $wgGrantPermissionGroups – Used to define grant groups and assign grants to them.
- $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 aren't shown on Special:Listusers or somewhere else
- $wgRemoveGroups – 控制不同用户组在Special:Userrights可移除的用户组。
- $wgRevokePermissions – Permission keys revoked from users in each group.
- $wgWhitelistRead – 一些匿名用户能够阅读的页面。
- $wgWhitelistReadRegexp – Whitelists publicly readable titles with regular expressions.
User agent
- $wgBrowserBlackList (在1.30版本中已弃用) – 不兼容Unicode的浏览器的浏览器黑名单。
Cookies
- $wgCacheVaryCookies – A list of cookies that influence the cache.
- $wgCookieDomain – Explicit domain for login cookies.
- $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 (引入 自 1.34.3) – 用于登录cookie(小型文本文件)的SameSite cookie属性。
- $wgCookieSecure – Whether cookies are secured.
- $wgDisableCookieCheck – Disables session cookies
- $wgExtendedLoginCookieExpiration – 如果非空,则为“$remember”会话的持续时间(秒);0意味着直到浏览器关闭。 如果为空,使用$wgCookieExpiration
- $wgSessionHandler (在1.33版本中已移除) – Used to set PHP's session.save_handler.
- $wgSessionName – Override to customize the session name.
- $wgUseSameSiteLegacyCookies (引入 自 1.34.3) – Send a legacy cookie with an
ss0-
prefix whenSameSite=None
is sent.
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 eg Recentchanges, Newpages.
- $wgOverrideSiteFeed – Override the site's default rss/atom feed that appears on every page.
Copyright
- $wgCopyrightIcon (在1.27版本中已移除) – Set this to some HTML to override the rights icon with an arbitrary logo.
- $wgMaxCredits – 设定您希望在文章下方显示的作者数目。
- $wgRightsIcon – Override for copyright metadata.
- $wgRightsPage – 覆盖版权元数据。
- $wgRightsText – 覆盖版权元数据。
- $wgRightsUrl – 版权的元数据
- $wgShowCreditsIfMax – 如果作者数目大于
$wgMaxCredits
,则只显示其中$wgMaxCredits
位作者。 - $wgUseCopyrightUpload – 如果要在上载时获得详细的版权信息表格,请将其设置为true。
搜索
- $wgAdvancedSearchHighlighting – Set to true to have more useful text snippets in search results.
- $wgEnableOpenSearchSuggest – 启用MediaWiki请求的开放搜索(OpenSearch)建议。
- $wgEnableSearchContributorsByIP – Whether searching for an IP address will be redirected to that IP's contributions page.
- $wgOpenSearchDefaultLimit – Integer defining default number of entries to show on OpenSearch call.
- $wgOpenSearchDescriptionLength – 摘录的最小长度为
<Description>
。 - $wgOpenSearchTemplate (在1.25版本中已弃用) – Template for OpenSearch suggestions.
- $wgOpenSearchTemplates – Templates for OpenSearch suggestions.
- $wgSearchForwardUrl – Set this to a URL to forward search requests to some external location.
- $wgSearchHighlightBoundaries – Regexp to match word boundaries
- $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.
- $wgSearchTypeAlternatives – Alternative search types.
- $wgUseTwoButtonsSearchForm (在1.36版本中已移除) – 侧边栏的搜索表单行为。
HTTP client
- $wgAllowExternalReqID (引入 自 1.34) – 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 (引入 自 1.35) – The maximum HTTP request timeout in seconds.
- $wgHTTPMaxConnectTimeout (引入 自 1.35) – The maximum HTTP connect timeout in seconds.
- $wgHTTPImportTimeout – Timeout for HTTP requests done internally for transwiki imports, in seconds.
- $wgHTTPProxy – Proxy to use for cURL requests
- $wgHTTPTimeout – Timeout for HTTP requests done via cURL.
- $wgLocalVirtualHosts – Local virtual hosts.
Jobs
- $wgJobBackoffThrottling – Number of times work items of a job type can be run per second.
- $wgJobClasses – Maps jobs to their handling classes.
- $wgJobRunRate – 每个请求要执行的作业数。
- $wgJobTypesExcludedFromDefaultQueue – Jobs that must be explicitly requested, i.e. aren't run by job runners unless special flags are set.
- $wgJobTypeConf – Configuration for job storage.
- $wgJobQueueAggregator (在1.33版本中已移除) – Which aggregator to use for tracking which queues have jobs.
- $wgJobQueueIncludeInMaxLagFactor – Whether to include the number of jobs that are queued for the API's maxlag parameter.
- $wgJobSerialCommitThreshold – Make job runners commit changes for replica DB-lag prone jobs one job at a time.
- $wgMaxJobDBWriteDuration – Max time (in seconds) a job-generated transaction can spend in writes.
- $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.
Proxies
- $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.
- $wgEnableDnsBlacklist – Whether to use DNS blacklists in
$wgDnsBlacklistUrls
to check for open proxies. - $wgDnsBlacklistUrls – List of DNS blacklists to use, if
$wgEnableDnsBlacklist
istrue
. - $wgProxyList – 禁止的IP地址列表
- $wgProxyWhitelist – Proxy whitelist: list of addresses that are assumed to be non-proxy despite what the other methods might say.
- $wgSecretKey – This should always be customized to a secret, unique string in LocalSettings.php .
- $wgUsePrivateIPs – Whether private X-Forwarded-For IPs should be accepted
CDN / Squid
These settings configure MediaWiki when using a caching HTTP proxy server. They apply to caching using Varnish as well as Squid.
- $wgEventRelayerConfig – Mapping of event channels (or channel categories) to EventRelayer configuration.
- $wgInternalServer – Squid已知的内部服务器名称(如果不同于$wgServer )。
- $wgMaxSquidPurgeTitles (在1.27版本中已移除) – Maximum number of titles to purge in any one client operation
- $wgSquidPurgeUseHostHeader (在1.33版本中已弃用) – Whether to use a Host header in purge requests sent to the proxy servers configured in $wgSquidServers.
- $wgSquidMaxage (在1.35版本中已移除) – Cache timeout for the squid.
- $wgCdnMaxAge (引入 自 1.34) – Cache TTL for the CDN sent as s-maxage (without ESI) or Surrogate-Control (with ESI).
- $wgCdnMaxageLagged – Cache timeout for the CDN when DB replica lag is high
- $wgCdnMaxageStale (引入 自 1.35) – 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)
- $wgCdnReboundPurgeDelay – Secondary delayed purges of URLs
- $wgSquidServers (在1.35版本中已移除) – An array of individual proxy servers to help MediaWiki detect if the request has been proxyed.
But also to send back to the proxy PURGE commands on changes. - $wgCdnServers (引入 自 1.34) – 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. - $wgSquidServersNoPurge (在1.35版本中已移除) – Same as
$wgSquidServers
, except that MW has no methods to send HTTP PURGE to an origin part of the configured ranges - $wgCdnServersNoPurge (引入 自 1.34) – Same as
$wgCdnServers
, except that MW has no methods to send HTTP PURGE to an origin part of the configured ranges - $wgLoggedOutMaxAge (引入 自 1.35) – 对于已登出用户,以最大寿命发送的用户代理缓存TTL。
- $wgUseESI (在1.33版本中已弃用) – If you run Squid3 with ESI support, enable this.
- $wgUseSquid (在1.35版本中已移除) – 启用/禁用Squid。
- $wgUseCdn (引入 自 1.34) – Enable/disable page view caching.
- $wgUseKeyHeader (在1.34版本中已移除) – Send the Key HTTP header for better caching.
- $wgUseXVO (在1.27版本中已移除) – Send X-Vary-Options header for better caching (requires patched Squid).
- $wgVaryOnXFP – Whether to add
X-Forwarded-Proto
to theVary
header for API requests and RSS/Atom feeds.
HTCP multicast purging
- $wgHTCPMulticastTTL – HTCP multicast purging
- $wgHTCPRouting – Routing configuration for HTCP multicast purging.
Extensions
- $wgAPIListModules – API list module extensions.
- $wgAPIMetaModules – API meta module extensions.
- $wgAPIModules – API模块扩展。
- $wgAPIFormatModules – API format module extensions.
- $wgAPIPropModules – API prop module extensions.
- $wgAuth (在1.33版本中已移除) – Authentication plugin. See AuthPlugin.
- $wgAutoloadClasses – Array mapping class names to filenames, for autoloading.
- $wgAvailableRights – A list of available rights, in addition to the ones defined by the core.
- $wgDisableInternalSearch – Disable internal search so that extensions can implement it.
- $wgExceptionHooks (在1.30版本中已移除) – 用于输出例外的挂钩。
- $wgExtensionAssetsPath – URL to extensions directory.
- $wgExtensionCredits (在1.25版本中已弃用) – Global list of extension credits
- $wgExtensionDirectory – 至扩展目录的文件系统路径。
- $wgExtensionFunctions – A list of callback functions which are called once MediaWiki is fully initialised.
- $wgExtensionMessagesFiles – Extension messages files.
- $wgExternalStores – External stores allow including content from non-database sources following URL links.
- $wgHooks – 全域钩列表。
- $wgMessagesDirs – Extension messages directories.
- $wgPagePropLinkInvalidations – Page property link table invalidation lists.
- $wgParserOutputHooks – 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.
Maintenance Scripts setting
- $wgAllowSchemaUpdates – Allow database schema updates to be executed with update.php script.
- $wgCommandLineDarkBg – Assume a dark terminal background for maintenance scripts.
- $wgCommandLineMode – 指示MediaWiki是否运行在命令行模式下。不应被人工设置!
- $wgDBadminpassword – 用于$wgDBadminuser的密码。
- $wgDBadminuser – 数据库管理员的用户名。
- $wgExtensionEntryPointListFiles – Array of files with list(s) of extension entry points to be used in maintenance/mergeMessageFileList.php
- $wgUpgradeKey – Password that controls access to web-based updater.
Miscellaneous settings
- $wgAjaxEditStash – Whether edits should be prepared via AJAX as users type edit summaries.
- $wgAllowCrossOrigin (引入 自 1.36) – Allow anonymous cross origin requests.
- $wgAllUnicodeFixes – Whether to always convert certain Unicode sequences to modern ones regardless of the content language.
- $wgAutoloadAttemptLowercase (在1.35版本中已弃用) – Switch controlling legacy case-insensitive classloading.
- $wgDiffEngine (引入 自 1.34) – Specify the difference engine to use.
- $wgGitRepositoryViewers – Map of Git repository URLs to their gitweb interface URLs
- $wgExternalDiffEngine – Name of the external diff engine to use.
- $wgFeaturePolicyReportOnly (引入 自 1.34) – List of Feature Policy Reporting types to enable.
- $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.
- $wgLegacySchemaConversion – Option to speed up the conversion step for large sites when migrating the schema from 1.4 to 1.5
- $wgManualRevertSearchRadius (引入 自 1.36) – 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.
- $wgMaxShellFileSize – Maximum file size created by shell processes under linux, in KB.
- $wgMaxShellMemory – Maximum amount of virtual memory available to shell processes under Linux, in KiB.
- $wgMaxShellTime – Maximum CPU time in seconds for shell processes under Linux.
- $wgMaxShellWallClockTime – Limit shell commands duration using real time.
- $wgMemoryLimit – The minimum amount of memory that MediaWiki "needs";
MediaWiki will try to raise PHP's memory limit if it's below this amount. - $wgPoolCounterConf – Configuration for processing pool control.
- $wgRevertedTagMaxDepth (引入 自 1.36) – Maximum depth (revision count) of reverts that will have their reverted edits marked with the mw-reverted change tag.
- $wgRestAllowCrossOriginCookieAuth (引入 自 1.36) – Allows authenticated cross-origin requests to the REST API with session cookies.
- $wgSearchMatchRedirectPreference (引入 自 1.35) – Set true to allow logged-in users to set a preference whether or not matches in search results should force redirection to that page.
- $wgSoftwareTags – 要启用的核心标签列表。
- $wgShellLocale – Locale for
LC_ALL
. - $wgShellRestrictionMethod – Method to use to restrict shell commands
- $wgShellCgroup – Limit shell commands memory using linux Cgroups.
- $wgUseAutomaticEditSummaries – MediaWiki是否应该产生自动编辑摘要。
- $wgUseTagFilter – Allow filtering by change tag in recentchanges, history, etc.
- $wgWikiDiff2MovedParagraphDetectionCutoff (在1.34版本中已弃用) – This setting controls the maximum number of paragraphs to compare before it bails out.
- $wgWatchlistExpiryMaxDuration (引入 自 1.35) – Relative maximum duration for watchlist expiries, as accepted by strtotime().
- $wgXmlDumpSchemaVersion (引入 自 1.33) – The schema to use per default when generating XML dumps.
參見
- 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.