Applicable to:
- Plesk 12.0 -17.8 for Linux
- Plesk 12.0 -17.8 for Windows
Question
Web statistics tools operate by processing information from log files, including visitors’ IP addresses. How to disable the web statistics?
Answer
As a workaround, the web statistics can be disabled using the steps below:
-
Log in to Plesk administration panel
-
Go to Tools & Settings > Updates and upgrades and click Add/Remove components.
-
Find and remove the “Webalizer” and “AWStats” components (they can be found either in the main list in the “Web hosting features” section):
Plesk for Linux
-
Remove web statistics’ files from the following directories:
# rm -f /var/www/vhosts/system/exampledomain.com/plesk-stat/statistics/anon_ftpstat
# rm -f /var/www/vhosts/system/exampledomain.com/plesk-stat/statistics/ftpstat
# rm -f /var/www/vhosts/system/exampledomain.com/plesk-stat/statistics/webstat
# rm -f /var/www/vhosts/system/exampledomain.com/plesk-stat/statistics/webstat-ssl -
Disable WebStatistics either for all sites:
# plesk db -Ne”select name from domains where htype=’vrt_hst'” | while read i; do plesk bin site –update $i -webstat none; done
Or for one domain:
# plesk bin site –update exampledomain.com -webstat none
Note: replace ‘exampledomain.com’ and ‘examplesubscription.com’ with actual domain and subscription names.
Plesk for Windows
-
(open PowerShell):
PS del $env:plesk_vhostsexamplesubscription.com.pleskstatisticsexampledomain.comwebstat*.*
del $env:plesk_vhostsexamplesubscription.com.pleskstatisticsexampledomain.comftpstat*.*
del $env:plesk_vhostsexamplesubscription.com.pleskstatisticsexampledomain.comanon_ftpstat*.* -
Disable WebStatistics either for all sites:
PS plesk db -Ne”select name from domains where htype=’vrt_hst'” | % { if ($_) { plesk bin site -u $_ -webstat none}}
Or for one domain:
C:> plesk bin site.exe –update exampledomain.com -webstat none
Additional information
Plesk Onyx 17.5 and Plesk Onyx 17.8 allow disabling the logging of client IP addresses. This way, web statistics may be kept running, although the quality of its reports will decrease. For instructions, please check the article below: