Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Numinix MediaWiki Demo
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Manual/Extensions
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
<languages/> <translate> <!--T:3--> An '''extension''' lets you customise how MediaWiki looks and works. </translate> * <translate><!--T:5--> System administrators can [[<tvar name=1>#Installing an extension</tvar>|install]] (or remove) extensions on the MediaWiki installations that they manage.</translate> * <translate><!--T:6--> Developers can [[<tvar name=1>#Developing extensions</tvar>|write new extensions]] or contribute to existing extensions.</translate> {{Note|inline=0|type=info |1=<translate><!--T:13--> While some extensions are maintained by MediaWiki developers, others are developed by third parties and may be unmaintained.</translate> <translate><!--T:14--> As a result, many extensions may contain bugs—including, in some cases, security vulnerabilities.</translate> <translate><!--T:15--> Not all extensions are compatible with every version of MediaWiki, and they may not function reliably when used together.</translate> <translate><!--T:152--> Use extensions at your own risk, particularly those tagged as insecure.</translate> <translate><!--T:116--> If an extension requires patches to the core software, make sure to back up your database beforehand to minimize the risk of breaking your wiki.</translate> }} <translate> == Selecting extensions == <!--T:130--> === Bundled extensions === <!--T:137--> <!--T:138--> Several extensions are as standard. </translate> <translate><!--T:139--> These extensions should generally be of high utility, perform efficiently, be stable, be well-written, and have no known major security issues.</translate> <translate><!--T:140--> They should also be compatible with the latest versions of MediaWiki, and with each other (i.e. one extension shouldn't block the functions of another).</translate> <translate><!--T:141--> A bundled extension may have a dependency on one or more other extensions, as long as those are also bundled.</translate> <translate><!--T:142--> Site admins get these automatically when installing or upgrading MediaWiki.</translate> <translate><!--T:143--> When upgrading MediaWiki, any extension upgrades will be automatically applied as well.</translate> <translate><!--T:144--> Site admins may choose to uninstall any of these, if they wish.</translate> <translate><!--T:145--> There are open, ongoing discussions about which extensions should be part of this group.</translate> <translate><!--T:146--> You can .</translate> <translate><!--T:147--> Extensions will be bundled once the developers reach a consensus to do so.</translate> <translate> <!--T:148--> An extension may be removed from bundling if its functionality is merged into , it is replaced by an alternative, or in the unlikely event of any unsolvable major security vulnerabilities being discovered. === Browsing extensions === <!--T:18--> <!--T:19--> Browse <tvar name=1></tvar>, or <tvar name=2></tvar> to see the full range of extensions that are available. === Checking installed extensions === <!--T:22--> </translate> <translate><!--T:149--> Which extensions are active on an instance of MediaWiki can be checked by accessing the <tvar name=1>[[Special:Version]]</tvar> page, and scrolling down to the heading ''Installed extensions'' (anchor <tvar name=2><code>#mw-version-ext</code></tvar>).</translate> <translate><!--T:24--> For example, [[<tvar name=1>Special:Version#mw-version-ext</tvar>|these extensions]] are installed on this wiki, and [[<tvar name=2>W:Special:Version#mw-version-ext</tvar>|these extensions]] are active in the English Wikipedia.</translate> <translate> === Popular extensions === <!--T:119--> </translate> <translate><!--T:124--> <tvar name="1"></tvar> counts wikis that extensions are installed on.</translate> <translate><!--T:125--> This represents actual installations and not just downloads (i.e. it queries the wiki's APIs), but it is also (as of 2023) not completely up-to-date.</translate> <translate><!--T:126--> It also doesn't count installations on private wikis.</translate> <translate> == Installing an extension == <!--T:25--> </translate> : ''<translate><!--T:131--> For further guidance, see also <tvar name=1></tvar></translate>'' <translate><!--T:26--> MediaWiki is ready to accept extensions just after [[<tvar name=man>Special:MyLanguage/Manual:Installation</tvar>|installation]] is finished.</translate> <translate><!--T:27--> To add an extension follow these steps:</translate> # '''<translate><!--T:28--> Before you start</translate>''' #: <translate><!--T:29--> Many extensions provide instructions designed for installation using Unix commands.</translate> <translate><!--T:30--> You require shell access (SSH) to enter these commands listed on the extension help pages.</translate> # '''<translate><!--T:31--> Download your extension</translate>''' #: <translate><!--T:32--> [[<tvar name=special>Special:ExtensionDistributor</tvar>|Extension Distributor]] helps you to select and download most of the popular extensions.</translate> #: <translate><!--T:33--> Extensions are usually distributed as modular packages.</translate> <translate><!--T:34--> They generally go in their own subdirectory of <tvar name=IP><code>/extensions/</code></tvar>.</translate> <translate><!--T:35--> A list of extensions stored in the Wikimedia [[<tvar name=gerrit>Special:MyLanguage/Gerrit</tvar>|Git repository]] is located at <tvar name=extensions>[[phab:diffusion/MEXT/browse/master/|git:mediawiki/extensions]]</tvar>.</translate> <translate><!--T:36--> Some extensions [[<tvar name=cat>Special:MyLanguage/Category:Extensions which host their code in-wiki</tvar>|don't use version control]] and are not recommended.</translate> #: <translate><!--T:37--> Some extensions are also available in [[<tvar name=1>Special:MyLanguage/Software bundles</tvar>|bundles]], <tvar name=composer></tvar> or [[<tvar name=2>Special:MyLanguage/Comparison of extensions in distributions</tvar>|package repositories]].</translate> #: <translate><!--T:127--> It's recommended to read the <tvar name=1>README</tvar> file before installation.</translate> <translate><!--T:128--> It usually contains important info about configuration.</translate> # '''<translate><!--T:38--> Install your extension</translate>''' #: <translate><!--T:39--> At the end of the <tvar name=LocalSettings><code></code></tvar> file, add:</translate> #: <syntaxhighlight lang="php"> wfLoadExtension( 'ExtensionName' ); </syntaxhighlight> #: <translate><!--T:40--> This line forces the PHP interpreter to read the extension file, and thereby make it accessible to MediaWiki.</translate> #: <translate><!--T:41--> Some extensions can conflict with maintenance scripts, for example if they directly access <tvar name=1><code>$_SERVER</code></tvar> (not recommended).</translate> <translate><!--T:42--> In this case, they can be wrapped in the conditional so maintenance scripts can still run.</translate> #: <syntaxhighlight lang="php"> if ( !$wgCommandLineMode ) { wfLoadExtension ( 'ExtensionName' ); } </syntaxhighlight> #: <translate><!--T:43--> The maintenance script <tvar name=ImportDump></tvar> will fail for any extension which requires customised namespaces which is ''included'' inside the conditional above such as <tvar name=1></tvar>, <tvar name=2></tvar>.</translate> : : {{Note|1=<translate><!--T:45--> While this installation procedure is sufficient for most extensions, some require a different installation procedure.</translate> <translate><!--T:46--> Check your extension's documentation for details.</translate>}} : {{Note|1=<translate><!--T:47--> If you want to alter configuration variables in <tvar name=1><code>LocalSettings.php</code></tvar>, you have to do this typically '''after''' including the extension.</translate> <translate><!--T:48--> Otherwise defaults defined in the extension will overwrite your settings.</translate>}} <translate> === Upgrading an extension === <!--T:51--> </translate> <translate><!--T:52--> Some extensions require to be updated whenever you update MediaWiki, while others work with multiple versions.</translate> <translate><!--T:53--> To upgrade to a new version of an extension:</translate> # <translate><!--T:54--> Download the new version of the extension</translate> # <translate><!--T:55--> Replace all the extension files in the <tvar name=1><code>extensions/ExtensionName</code></tvar> directory with the new files.</translate> <translate><!--T:56--> Do not remove the extension configuration present in <tvar name=1><code>LocalSettings.php</code></tvar></translate> # <translate><!--T:57--> If the extension requires changes to the MediaWiki database, you will need to run the <tvar name=1></tvar> maintenance script.</translate> <translate><!--T:58--> Most extensions will mention if this script needs to be run or not.</translate> <translate><!--T:83--> (Perform backup of your data before executing the script).</translate> <translate><!--T:60--> If you don't have command line access, you can also use the [[<tvar name=man>Special:MyLanguage/Manual:Upgrading#Web_updater</tvar>|web updater]].</translate> {{Note|1=<translate><!--T:63--> These instructions cover 99% of extensions.</translate> <translate><!--T:64--> If the specific extension you are upgrading has instructions that differ from these, you should probably follow the specific extension's instructions</translate>}} <translate> === Uninstalling an extension === <!--T:65--> <!--T:86--> Remove the line from <tvar name=1><code>LocalSettings.php</code></tvar> with the extension name to uninstall it: </translate> <syntaxhighlight lang="php"> wfLoadExtension( 'ExtensionName' ); </syntaxhighlight> <translate> <!--T:87--> * You must also remove any lines pertaining to the configuration of the extension. == Developing extensions == <!--T:132--> </translate> <translate><!--T:133--> MediaWiki core provides several ways for extensions to change the behavior and appearance of a wiki.</translate> <translate><!--T:134--> Various give extensions flexibility to add features and functionality, such as displaying a special page or defining an API module.</translate> <translate><!--T:135--> To get started, see the .</translate> <translate><!--T:136--> Before writing a new extension, consider contributing to an or helping with an .</translate> <translate><!--T:150--> Users can also make a general request on Phabricator, and hope that your good idea is picked up by a developer.</translate> <translate><!--T:151--> See <tvar name=1>https://phabricator.wikimedia.org/tag/mediawiki-extension-requests/</tvar></translate> <translate> == See also == <!--T:79--> </translate> * * * * – <translate><!--T:82--> Information about translating extensions.</translate> * [[Special:ExtensionDistributor]] – <translate><!--T:118--> Includes a list of the 15 most downloaded extensions in Wikimedia version control</translate> * [https://extloc.toolforge.org/ extloc] – <translate><!--T:153--> Where are MediaWiki extensions deployed in Wikimedia production?</translate> * [[API:Siteinfo#Extensions]] * * * * [[Category:Customization techniques|Customization techniques]] [[Category:Extension creation]] ---- ''Sample content adapted from [[mediawikiwiki:Manual:Extensions]] on mediawiki.org, licensed under [https://creativecommons.org/licenses/by-sa/4.0/ CC BY-SA 4.0].''
Summary:
Please note that all contributions to Numinix MediaWiki Demo may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Project:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Template used on this page:
Template:Note
(
edit
)