Manual:recountCategories.php

From Linux Web Expert

<td class="mw-version-versionbox" title="<translate nowrap> The latest stable version is <tvar name=1>1.41</tvar></translate>">
<translate> ≥</translate> 1.30
<translate> MediaWiki version:</translate>

recountCategories.php is a maintenance script used to update the counts of category members, if the numbers displayed on category pages are inaccurate. Durante il normale funzionamento, non dovrebbe essere necessario eseguire questo script. Tuttavia, un bug può far sì che i conteggi non vengano aggiornati correttamente (vedi <translate> task <tvar name=1>T18036</tvar></translate> e <translate> task <tvar name=1>T85696</tvar></translate> e <translate> task <tvar name=1>T170737</tvar></translate>, lo script è stato eseguito su tutte le wiki pubbliche di Wikimedia il 2021-06-23).


Options/Arguments

Option Description Required?
--mode Which category count column to recompute: one of pages, subcats or files. <translate> Required</translate>
--begin Only recount categories with cat_id greater than the given value <translate> Optional</translate>
--throttle Wait this many milliseconds after each batch. Default: 0 <translate> Optional</translate>
--skip-cleanup Skip running cleanupEmptyCategories if the "page" mode is selected <translate> Optional</translate>

Usage

php maintenance/recountCategories.php --mode modeName [ --begin| --throttle| --skip-cleanup ]


With pages mode

Terminal

With subcats mode

Terminal

With files mode

Terminal

See also