MediaWiki Extensions Installation and Management
You can install and use extensions to add more functions and options to your MediaWiki site. In this article we'll outline the basic steps related to installing and enabling extensions. For some more details you can also check out the tutorial on how to install and manage extensions in MediaWiki.
MediaWiki comes preconfigured with some extensions that you can enable and disable.
To install an extension:
- Download on your local computer the extension that you want to install. There's an alphabetical list of extensions on the official MediaWiki site, and there's also a page on which the extensions are grouped into categories according to their functions. From any of these two pages you can go to the page of the extension on the MediaWiki site. There you'll find a link for downloading the extension and additional information about it.
- Upload the extension from your local computer to your MediaWiki hosting account. You should put the files of the extension in a subfolder in the /extensions directory of your MediaWiki. If, for instance, MediaWiki is installed in the public_html directory on your hosting account, then the content of the extension should be in public_html/extensions/name-of-extension (where name-of-extension should be replaced with the actual name of the extension).
You can upload the extension with an FTP client or from the Files section of the Pixie control panel.
After you upload the extension on your hosting account, in order to activate it you have to put a line with code in the LocalSettings.php file of your MediaWiki. The file is located in the root MediaWiki directory on your hosting account. You have to put the following line at the end of the file:
Replace name-of-extension with the name of the folder in which the extension is stored on your hosting account, and name-of-extension.php with the name of the main PHP file of that extension; this file is located in the folder of the extension and it bears the name of the extension (with a .php file extension at the end). After you save the change to the LocalSettings.php file you should be able to use the options/functions provided by the extension.
Note that depending on the particular extension you may need to do some additional things in order to install the extension. You should check the information on the webpage of the extension.
Disable and Uninstall Extensions
To disable an extension, remove its line in the LocalSettings.php file. If you want to completely remove the extension, in addition to removing its line in LocalSettings.php you should also delete its folder in the /extensions directory of MediaWiki.
To upgrade an extension with a newer version:
- Download the new version of the extension on your local computer.
- Upload it on your hosting account in the subfolder of the extension; the subfolder is in the /extensions directory of your MediaWiki (e.g. /extensions/name-of-extension). Replace the old files of the extension with the new ones.
- For some extensions you may have to update the database schema. One way to do it is with a web-browser. If the frontend of your MediaWiki site is accessible at yourdomain.com, then open the URL address yourdomain.com/mw-config and follow the instructions. Another way to do it is via SSH.
For some more details you can also read ourÂ MediaWiki extensions tutorial.