Jump to navigation Jump to search
This page is a translated version of the page Manual:$wgDisableCounters and the translation is 33% complete.

Other languages:
català • ‎Deutsch • ‎English • ‎español • ‎suomi • ‎français • ‎italiano • ‎日本語 • ‎Nederlands • ‎polski • ‎português • ‎português do Brasil
Site Statistics: $wgDisableCounters
Disable page view counters.
Introducido en la versión: pre 1.1.0
Eliminado en la versión: 1.25.0 (git #90d90dad)
Valores permitidos: (booleano)
Valor predeterminado: false
Otros configuración: Alfabéticamente | Por Función


$wgDisableCounters determines whether or not to update the number of times a page has been viewed. If $wgDisableCounters is set to false, each page will have a counter in its footer saying: "This page has been accessed 256 times."

This setting also determines whether Special:PopularPages is available.

This variable is initialized in includes/DefaultSettings.phpManual:DefaultSettings.php. El valor inicial es false. To override the default value, add the line $wgDisableCounters = true; to the file LocalSettings.phpManual:LocalSettings.php.

The value of the counter is updated in includes/WikiPage.phpManual:WikiPage.php in the function doViewUpdates(). (In a previous version, this was includes/Article.phpManual:Article.php in the function incViewCount().) The variable $wgDisableCounters is also referred to in other script files.

Advertencia Advertencia: Once disabled you will lose the correct view counts forever!
If you are using squid caching, you will want to disable these counters, as squid caching prevents mediawiki from seeing all requests, which makes these counters inaccurate.


If performance problems due to high hit counts updating the pageManual:page table table is a concern, a less dramatic alternative to disabling them may be to tweak $wgHitcounterUpdateFreqManual:$wgHitcounterUpdateFreq.

You can also retrieve such statistics through your apache (or squid if using squid caching) request logs.

Disabled in 1.25.0. See Requests for comment/Removing hit counters from MediaWiki core and other alternatives

Véase también