Articles in this section

How to disable web statistics in Plesk?

Plesk for Windows DoNotDelete:docref kb: how-to Plesk for Linux

Applicable to:

  • Plesk for Linux
  • Plesk for Windows

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.

  1. Log in to Plesk

  2. Go to Tools & Settings > Updates

  3. Click Add/Remove components

  4. Remove the "Webalizer" and "AWStats" components below the "Web hosting features" section:

    awstats.png

  5. Click Continue

  6. Login to the Plesk server via SSH

  7. 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*/*

  8. 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.

  1. Log in to Plesk

  2. Go to Tools & Settings > Updates

  3. Click Add/Remove components

  4. Remove the "Webalizer" and "AWStats" components below the "Web hosting features" section:

    Remove webstatistic components

  5. Click Continue

  6. Login to the Plesk server via RDP

  7. Open a PowerShell window

  8. Delete existing statistics files by executing the following commands:

    PS del $env:plesk_vhosts\examplesubscription.com\.plesk\statistics\exampledomain.com\webstat\*.*
    del $env:plesk_vhosts\examplesubscription.com\.plesk\statistics\exampledomain.com\ftpstat\*.*
    del $env:plesk_vhosts\examplesubscription.com\.plesk\statistics\exampledomain.com\anon_ftpstat\*.*

  9. 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

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.