Question
Web statistics tools operate by processing information from log files, including visitors' IP addresses. How to disable the web statistics?
Answer
The web statistics can be disabled using the steps below:
Plesk for Linux
Note: Replace 'example.com' in the following steps with the actual domain name.
Go to Tools & Settings > Updates
Click Add/Remove components
Remove the "Webalizer" and "AWStats" components below the "Web hosting features" section:
Click Continue
Login to the Plesk server via SSH
Delete existing statistics files by executing the following commands:
# rm -rf /var/www/vhosts/system/example.com/statistics/anon_ftpstat/*
# rm -rf /var/www/vhosts/system/example.com/statistics/ftpstat/*
# rm -rf /var/www/vhosts/system/example.com/statistics/webstat*/*Disable WebStatistics:
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
For one site:
# plesk bin site --update example.com -webstat none
Plesk for Windows
Note: Replace 'exampledomain.com' and 'examplesubscription.com' with actual domain and subscription names.
Go to Tools & Settings > Updates
Click Add/Remove components
Remove the "Webalizer" and "AWStats" components below the "Web hosting features" section:
Click Continue
Login to the Plesk server via RDP
Open a PowerShell window
Delete existing statistics files by executing the following commands:
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:
For all sites:
PS plesk db -Ne"select name from domains where htype='vrt_hst'" | % { if ($_) { plesk bin site -u $_ -webstat none}}
For a single site:
PS plesk bin site.exe --update exampledomain.com -webstat none