Manual:Extensions/Installation and upgrade

Draft

Topics: to covered
 * Download
 * Install
 * Upgrade
 * Migrate
 * Use custom location

MediaWiki is ready to accept extensions just after installation is finished. To add an extension follow these steps:

Before you start
Some extensions provide instructions designed for installation using Unix commands. You require shell access (SSH) to enter these commands listed on the extension help pages.

Download an extension

 * 1) Extension Distributor helps you to select and download most of the popular extensions.
 * 2) Extensions are usually distributed as modular packages.  They generally go in their own subdirectory of  .  A list of extensions stored in the Wikimedia Git repository is located at git:mediawiki/extensions .  Some extensions don't use version control and are not recommended.
 * 3) Some extensions are also available in bundles,  or package repositories.
 * 4) It's recommended to read the README file before installation.  It usually contains important info about configuration.

Install an extension

 * 1) Always check the requirements and instructions that come with each extension. The following summary applies to most extensions, but many extensions require different and/or additional steps to be taken.
 * 2) Ensure that required permissions are set.
 * 3) At the end of the  file, add:  This line forces the PHP interpreter to read the extension file, and thereby make it accessible to MediaWiki. For the earlier method and how to migrate, see notes below.
 * 4) Configure if required or wanted. Configuration settings should typically be added after including the extension. Again, check the extension's instructions for details.
 * 5) You may be required to run a maintenance script.
 * 6) Done!

Possible issues

 * Some extensions can conflict with maintenance scripts, for example if they directly access $_SERVER (not recommended). In this case they can be wrapped in the conditional so maintenance scripts can still run.
 * The maintenance script  will fail for any extension which requires customised namespaces which is included inside the conditional above such as,.

Upgrade an extension
Some extensions require to be updated whenever you update MediaWiki, while others work with multiple versions.

To upgrade to a new version of an extension:


 * 1) Download the new version of the extension


 * 1) Replace all the extension files in the   directory with the new files.  Do not remove the extension configuration present in LocalSettings.php


 * 1) If the extension requires changes to the MediaWiki database, you will need to run the  maintenance script.  Most extensions will mention if this script needs to be run or not.  (Perform backup of your data before executing the script).  If you don't have command line access, you can also use the web updater.
 * 2) Documentation for an extension usually tells you what else you need to do.