Tech:Add an extension
This is a simple guide showing any user how to add an EXISTING extension to their wiki. If the extension doesn't exist or is not configured, you cannot add it this way.
- Create a GitHub account/Login
- Check the extension on MediaWiki
- Go to our LocalSettings page
- Look for 'wmgUseNameofExtension', and like the
default, the name of the wiki (ending with
- If the extension is VisualEditor or Flow, you'll have to add the name of the wiki to the Parsoid config list.
If you are confused or want someone else to take care of your request, please request here.
Getting a new extension[edit source]
All of this stuff needs to be done before the steps above:
- Open a ticket for a Security Review
- Wait. We will review the security checklist, among other things. If we notice a bug, we'll try to fix it or wait for the extension developers to fix it. (Reviews are generally done by Labster)
- On passing review, the extension needs to be added to the mediawiki repository:
git submodule add -f -b <extension-branch> <extension-repo-url> extensions/<extension-name>. We generally use the branch for the current wiki version (e.g. REL1_31) if available.
- LocalExtensions.php gets a $wmgUseFoo variable added.
- LocalSettings.php gets this setup:
'wmgUseFoo' => array( 'default' => false,);
- It is not required that you also load it on test1wiki in order to make sure that everything works as intended
- Setup any other extension globals here.
- Then run the following script as www-data
mergeMessageFileList.php --output /srv/mediawiki/config/ExtensionMessageFiles.php --wiki loginwiki
- Rebuild Localization Cache as www-data on all mw servers.
- If the extension has database tables, run "/usr/local/bin/foreachwikiindblist /srv/mediawiki/dblist/all.dblist /srv/mediawiki/w/maintenance/sql.php <file.sql>" for all SQL queries ran on wikis. Ideally, you should *never* need to run update.php. If this is not done for one reason or another, email operationsmiraheze.org with an explanation and it will be acknowledged, discussed or fixed.