|MediaWiki file: updateCollation.php|
|Source code:||master • 1.31.0 • 1.30.0|
|Classes:||Find code • Find documentation|
This script updates category collations. You need to run this script after $wgCategoryCollation has been changed. It is also needed to be run after upgrading to 1.17 and later from a version of MediaWiki before 1.17. Normally it is run as part of
If your category collations are messed up (aka things sort incorrectly in categories), you can use the
--force switch to forcibly fix all the category collations. See
php updateCollation.php --help for a list of all options.
The run time of the script depends on the number of rows in the categorylinks table, and for extremely large wikis may take over 24 hours. (A run on the English Wikipedia in September 2016 took around a week: phab:T136150.) The script can process on the order of 10,000 rows per minute (depending on your setup); you can view the estimated number of rows on your wiki before running the real script by using
updateCollation.php --dry-run. Wikimedia wikis of various sizes have been painlessly switched to different collations over time (phab:T47443), just make sure to estimate how long the script will run before you start it.