Template:ExtensionInstall/en: Difference between revisions
Updating to match new version of source page |
m 1 revision imported |
||
(No difference)
| |||
Latest revision as of 20:50, 4 January 2026
<languages/>
- Download and move the extracted
ExtensionInstallfolder to yourextensions/directory.
Developers and code contributors should install the extension from Git instead, using:<syntaxhighlight lang="bash" copy="1">cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/ExtensionInstall</syntaxhighlight>
- Add the following code at the bottom of your LocalSettings.php file: <syntaxhighlight lang="php" copy="1">
require_once "$IP/extensions/ExtensionInstall/ExtensionInstall.php";
</syntaxhighlight>
- check <translate> Done</translate> – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
| File:Lua-Logo.svg | This template uses Lua: |
Usage
Examples
Below a few examples of how to use this template:
Simple
{{ExtensionInstall}}
- <translate> [[<tvar name=2>Special:ExtensionDistributor/MyExtension</tvar>|Download]] and move the extracted <tvar name=name>
MyExtension</tvar> folder to your <tvar name=ext>extensions/</tvar> directory.</translate>
<translate> Developers and code contributors should install the extension [[<tvar name=git>Special:MyLanguage/Download from Git</tvar>|from Git]] instead, using:</translate><syntaxhighlight lang="bash" copy="1">cd extensions/git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/MyExtension</syntaxhighlight>
- <translate> Add the following code at the bottom of your <tvar name=1>LocalSettings.php</tvar> file:</translate> <syntaxhighlight lang="php" copy="1">
require_once "$IP/extensions/MyExtension/MyExtension.php";
</syntaxhighlight>
- check <translate> Done</translate> – <translate> Navigate to <tvar name=special>Special:Version</tvar> on your wiki to verify that the extension is successfully installed.</translate>
Name
{{ExtensionInstall|CategoryTree}}
- <translate> [[<tvar name=2>Special:ExtensionDistributor/CategoryTree</tvar>|Download]] and move the extracted <tvar name=name>
CategoryTree</tvar> folder to your <tvar name=ext>extensions/</tvar> directory.</translate>
<translate> Developers and code contributors should install the extension [[<tvar name=git>Special:MyLanguage/Download from Git</tvar>|from Git]] instead, using:</translate><syntaxhighlight lang="bash" copy="1">cd extensions/git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/CategoryTree</syntaxhighlight>
- <translate> Add the following code at the bottom of your <tvar name=1>LocalSettings.php</tvar> file:</translate> <syntaxhighlight lang="php" copy="1">
require_once "$IP/extensions/CategoryTree/CategoryTree.php";
</syntaxhighlight>
- check <translate> Done</translate> – <translate> Navigate to <tvar name=special>Special:Version</tvar> on your wiki to verify that the extension is successfully installed.</translate>
Download link
{{ExtensionInstall
|download-link=[http://bits.wikimedia.org/example.zip Download]
}}
- <translate> <tvar name=1>Download</tvar> and place the file(s) in a directory called <tvar name=name>
MyExtension</tvar> in your <tvar name=ext>extensions/</tvar> folder.</translate>- <translate> Add the following code at the bottom of your <tvar name=1>LocalSettings.php</tvar> file:</translate> <syntaxhighlight lang="php" copy="1">
require_once "$IP/extensions/MyExtension/MyExtension.php";
</syntaxhighlight>
- check <translate> Done</translate> – <translate> Navigate to <tvar name=special>Special:Version</tvar> on your wiki to verify that the extension is successfully installed.</translate>
LocalSettings
{{ExtensionInstall
|localsettings=
$wgUseAjax = true;
}}
- <translate> [[<tvar name=2>Special:ExtensionDistributor/MyExtension</tvar>|Download]] and move the extracted <tvar name=name>
MyExtension</tvar> folder to your <tvar name=ext>extensions/</tvar> directory.</translate>
<translate> Developers and code contributors should install the extension [[<tvar name=git>Special:MyLanguage/Download from Git</tvar>|from Git]] instead, using:</translate><syntaxhighlight lang="bash" copy="1">cd extensions/git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/MyExtension</syntaxhighlight>
- <translate> Add the following code at the bottom of your <tvar name=1>LocalSettings.php</tvar> file:</translate> <syntaxhighlight lang="php" copy="1">
require_once "$IP/extensions/MyExtension/MyExtension.php"; $wgUseAjax = true; </syntaxhighlight>
- check <translate> Done</translate> – <translate> Navigate to <tvar name=special>Special:Version</tvar> on your wiki to verify that the extension is successfully installed.</translate>
LocalSettings early
{{ExtensionInstall
|localsettingsearly=
$wgUseAjax = true; // This must be included before the extension is loaded
}}
- <translate> [[<tvar name=2>Special:ExtensionDistributor/MyExtension</tvar>|Download]] and move the extracted <tvar name=name>
MyExtension</tvar> folder to your <tvar name=ext>extensions/</tvar> directory.</translate>
<translate> Developers and code contributors should install the extension [[<tvar name=git>Special:MyLanguage/Download from Git</tvar>|from Git]] instead, using:</translate><syntaxhighlight lang="bash" copy="1">cd extensions/git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/MyExtension</syntaxhighlight>
- <translate> Add the following code at the bottom of your <tvar name=1>LocalSettings.php</tvar> file:</translate> <syntaxhighlight lang="php" copy="1">
$wgUseAjax = true; // This must be included before the extension is loaded require_once "$IP/extensions/MyExtension/MyExtension.php";
</syntaxhighlight>
- check <translate> Done</translate> – <translate> Navigate to <tvar name=special>Special:Version</tvar> on your wiki to verify that the extension is successfully installed.</translate>
DB Update
{{ExtensionInstall
|db-update=Yes
}}
- <translate> [[<tvar name=2>Special:ExtensionDistributor/MyExtension</tvar>|Download]] and move the extracted <tvar name=name>
MyExtension</tvar> folder to your <tvar name=ext>extensions/</tvar> directory.</translate>
<translate> Developers and code contributors should install the extension [[<tvar name=git>Special:MyLanguage/Download from Git</tvar>|from Git]] instead, using:</translate><syntaxhighlight lang="bash" copy="1">cd extensions/git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/MyExtension</syntaxhighlight>
- <translate> Add the following code at the bottom of your <tvar name=1>LocalSettings.php</tvar> file:</translate> <syntaxhighlight lang="php" copy="1">
require_once "$IP/extensions/MyExtension/MyExtension.php";
</syntaxhighlight>
- <translate> Run the [[<tvar name=update>Special:MyLanguage/Manual:Update.php</tvar>|update script]] which will automatically create the necessary database tables that this extension needs.</translate>
- check <translate> Done</translate> – <translate> Navigate to <tvar name=special>Special:Version</tvar> on your wiki to verify that the extension is successfully installed.</translate>
Composer
{{ExtensionInstall
|composer=Yes
}}
- <translate> [[<tvar name=2>Special:ExtensionDistributor/MyExtension</tvar>|Download]] and move the extracted <tvar name=name>
MyExtension</tvar> folder to your <tvar name=ext>extensions/</tvar> directory.</translate>
<translate> Developers and code contributors should install the extension [[<tvar name=git>Special:MyLanguage/Download from Git</tvar>|from Git]] instead, using:</translate><syntaxhighlight lang="bash" copy="1">cd extensions/git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/MyExtension</syntaxhighlight>
- <translate> Only when installing from Git, run <tvar name=composer>Composer</tvar> to install PHP dependencies, by issuing <tvar name=code>
composer install --no-dev</tvar> in the extension directory.</translate> <translate> (See <tvar name=phab>Template:Task</tvar> for potential complications.)</translate>- <translate> Add the following code at the bottom of your <tvar name=1>LocalSettings.php</tvar> file:</translate> <syntaxhighlight lang="php" copy="1">
require_once "$IP/extensions/MyExtension/MyExtension.php";
</syntaxhighlight>
- check <translate> Done</translate> – <translate> Navigate to <tvar name=special>Special:Version</tvar> on your wiki to verify that the extension is successfully installed.</translate>
Custom steps
{{ExtensionInstall
|custom-steps=
* Lorem ipsum dolor sit amet
* Foo bar baz quux [[sandbox]]
}}
- <translate> [[<tvar name=2>Special:ExtensionDistributor/MyExtension</tvar>|Download]] and move the extracted <tvar name=name>
MyExtension</tvar> folder to your <tvar name=ext>extensions/</tvar> directory.</translate>
<translate> Developers and code contributors should install the extension [[<tvar name=git>Special:MyLanguage/Download from Git</tvar>|from Git]] instead, using:</translate><syntaxhighlight lang="bash" copy="1">cd extensions/git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/MyExtension</syntaxhighlight>
- <translate> Add the following code at the bottom of your <tvar name=1>LocalSettings.php</tvar> file:</translate> <syntaxhighlight lang="php" copy="1">
require_once "$IP/extensions/MyExtension/MyExtension.php";
</syntaxhighlight>
- Lorem ipsum dolor sit amet
- Foo bar baz quux sandbox
- check <translate> Done</translate> – <translate> Navigate to <tvar name=special>Special:Version</tvar> on your wiki to verify that the extension is successfully installed.</translate>
Support registration
{{ExtensionInstall
|registration=1
}}
- <translate> [[<tvar name=2>Special:ExtensionDistributor/MyExtension</tvar>|Download]] and move the extracted <tvar name=name>
MyExtension</tvar> folder to your <tvar name=ext>extensions/</tvar> directory.</translate>
<translate> Developers and code contributors should install the extension [[<tvar name=git>Special:MyLanguage/Download from Git</tvar>|from Git]] instead, using:</translate><syntaxhighlight lang="bash" copy="1">cd extensions/git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/MyExtension</syntaxhighlight>
- <translate> Add the following code at the bottom of your <tvar name=1>LocalSettings.php</tvar> file:</translate> <syntaxhighlight lang="php" copy="1">
wfLoadExtension( 'MyExtension' );
</syntaxhighlight>
- check <translate> Done</translate> – <translate> Navigate to <tvar name=special>Special:Version</tvar> on your wiki to verify that the extension is successfully installed.</translate>
Expression error: Unrecognized punctuation character "[".
Support registration with minimum version
{{ExtensionInstall
|registration=1
|no-registration-version=1.39
}}
- <translate> [[<tvar name=2>Special:ExtensionDistributor/MyExtension</tvar>|Download]] and move the extracted <tvar name=name>
MyExtension</tvar> folder to your <tvar name=ext>extensions/</tvar> directory.</translate>
<translate> Developers and code contributors should install the extension [[<tvar name=git>Special:MyLanguage/Download from Git</tvar>|from Git]] instead, using:</translate><syntaxhighlight lang="bash" copy="1">cd extensions/git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/MyExtension</syntaxhighlight>
- <translate> Add the following code at the bottom of your <tvar name=1>LocalSettings.php</tvar> file:</translate> <syntaxhighlight lang="php" copy="1">
wfLoadExtension( 'MyExtension' );
</syntaxhighlight>
- check <translate> Done</translate> – <translate> Navigate to <tvar name=special>Special:Version</tvar> on your wiki to verify that the extension is successfully installed.</translate>
Expression error: Unrecognized punctuation character "[".
This only works if the version specified is Expression error: Unrecognized punctuation character "[". or later, otherwise the template assumes nobody cares about ancient versions and falls back to #Require registration.
Require registration
{{ExtensionInstall
|registration=required
}}
- <translate> [[<tvar name=2>Special:ExtensionDistributor/MyExtension</tvar>|Download]] and move the extracted <tvar name=name>
MyExtension</tvar> folder to your <tvar name=ext>extensions/</tvar> directory.</translate>
<translate> Developers and code contributors should install the extension [[<tvar name=git>Special:MyLanguage/Download from Git</tvar>|from Git]] instead, using:</translate><syntaxhighlight lang="bash" copy="1">cd extensions/git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/MyExtension</syntaxhighlight>
- <translate> Add the following code at the bottom of your <tvar name=1>LocalSettings.php</tvar> file:</translate> <syntaxhighlight lang="php" copy="1">
wfLoadExtension( 'MyExtension' );
</syntaxhighlight>
- check <translate> Done</translate> – <translate> Navigate to <tvar name=special>Special:Version</tvar> on your wiki to verify that the extension is successfully installed.</translate>
Everything
{{ExtensionInstall|Example
|download-link=[http://bits.wikimedia.org/example.zip Download]
|vagrant=example
|localsettings=
$wgUseAjax = true;
|db-update=Yes
|composer=Yes
|custom-steps=
* Lorem ipsum dolor sit amet
* Foo bar baz quux [[sandbox]]
|registration=yes
}}
- <translate> <tvar name=1>Download</tvar> and place the file(s) in a directory called <tvar name=name>
Example</tvar> in your <tvar name=ext>extensions/</tvar> folder.</translate>- <translate> Only when installing from Git, run <tvar name=composer>Composer</tvar> to install PHP dependencies, by issuing <tvar name=code>
composer install --no-dev</tvar> in the extension directory.</translate> <translate> (See <tvar name=phab>Template:Task</tvar> for potential complications.)</translate>- <translate> Add the following code at the bottom of your <tvar name=1>LocalSettings.php</tvar> file:</translate> <syntaxhighlight lang="php" copy="1">
wfLoadExtension( 'Example' ); $wgUseAjax = true; </syntaxhighlight>
- <translate> Run the [[<tvar name=update>Special:MyLanguage/Manual:Update.php</tvar>|update script]] which will automatically create the necessary database tables that this extension needs.</translate>
- Lorem ipsum dolor sit amet
- Foo bar baz quux sandbox
- check <translate> Done</translate> – <translate> Navigate to <tvar name=special>Special:Version</tvar> on your wiki to verify that the extension is successfully installed.</translate>
Expression error: Unrecognized punctuation character "[".
<translate> Vagrant installation:</translate>
- <translate> If using <tvar name=vagrant>Vagrant</tvar>, install with <tvar name=code>
vagrant roles enable example --provision</tvar></translate>
[[Category:Installation guide templates{{#translation:}}]]