|Site Statistics: $wgDisableCounters|
|Disable page view counters.
|Introduced in version:||pre 1.1.0|
|Removed in version:||still in use|
Details[edit | edit source]
$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 X times"
This setting also determines whether Special:PopularPages is available.
This variable is initialized in
includes/DefaultSettings.php. The initial value is
false. To override the default value, add the line
$wgDisableCounters = true; to the file
The value of the counter is updated in
includes/WikiPage.php in the function
doViewUpdates(). The variable
$wgDisableCounters is also referred to in other script files.
|Warning:||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.
Alternatives[edit | edit source]
You can also retrieve such statistics through your apache (or squid if using squid caching) request logs.
|Language:||English • français|