This page contains notes about MediaWiki I collect(ed) during my journeys while working with or on the software.

On Extension:TranslateEdit

TODO: There's more where this came from


  • Using ?action=delete will remove the whole page; it's translations and the translation units.



  • Flags --dbuser and --dbpass(file) work for general installing. They will result in the accompanying values finding themselves a nice and snug place in LocalSettings.php.
  • So do flags --installdbuser and --installdbpass(file), but their values don't end up in LocalSettings.php.
  • In case both are set, undocumented behavior appears: the values for --dbuser and --dbpass(file) are used by the installer to create a new account with those credentials, using the installdbuser and installdbpass credentials during the installation.
    • However, this does not happen if both values are equal to each other.


  • Enabling the Echo and Flow role also installs CentralAuth and some other extensions but does not enable that role.
  • In the rare case that an enabled role has composer dependencies that have been installed are not loaded, rebooting the vagrant virtual machine with vagrant reload can resolve the issue.

Debugging MediaWiki maintenance scripts run on MediaWiki-Vagrant with PhpStormEdit

This is an absolute pain.
  1. Ensure you've correctly setup PhpStorm to detect Vagrant.
  2. Setup a PHP Script in the Run/Debug Configurations screen, which can be reached by clicking Run > Edit Configurations...
    • The script file MUST be MWScript.php! Maintenance scripts will not work otherwise.
    • Add the path to the script as you'd have done with MWScript regularly as the first argument
  3. Comment out the security check in MWScript.php

Running unit testsEdit

  • Whenever an error message related to TestUser.php is shown (before it can run any tests), then this could be caused by $wgActorTableSchemaMigrationStage , whenever it is set to anything higher than MIGRATION_WRITE_BOTH.

Running unit tests for Code snifferEdit

Which is a pain on Windows. However, you can get it to run (with the usual line ending failures) by removing the $PHPUNIT_ARGS from composer.json.

To run an individual sniff test, you'll have to run vendor/bin/phpunit -c ./ --filter MediaWikiStandardTest::testFile@SNIFF_NAME.php. Replace testFile with testFix to test the autofix.

Creating a new projectEdit

Think extension, library, skin or what have you.
  1. Request a gerrit repository: Gerrit/New repositories/Requests.
  2. Request a project on Phabricator:
  3. Add CI, depending on your needs:
  4. (optional) Add i18n support from Gerrit/L10n-bot