Articles in this section

How to configure the web and traffic statistics storage period in Plesk?

Plesk for Windows kb: how-to Plesk for Linux ABT: Group B

Applicable to:

  • Plesk for Linux
  • Plesk for Windows

Question

By default, on the Plesk server, web and traffic statistics are stored for 3 months.

How to configure the web and traffic statistics storage period in Plesk?

Answer

For a Service Plan
  1. Log into Plesk
  2. Go to Service Plans > select a plan > Logs & Statistics tab.
  3. Specify the number of months required for the parameter Retain web and traffic statistics.
  4. Click Update & Sync to apply the changes.

    logs_n_stat.png

    Note: Service plan changes will be applied to the newly created subscriptions. For existing subscriptions refer to the command-line solution.

For a Service Plan using CLI
  1. Connect to the server via SSH or RDP
  2. Execute the command below, where "Example" is the service plan name and "X" is a number of months for storing statistics:

    # plesk bin service_plan -u "Example" -keep_traf_stat X

To apply changes to an existing subscription, use the following command:

# plesk bin subscription_settings --update example.com -keep_traf_stat X

Server-Wide
  1. Log into Plesk
  2. Go to Tools & Settings > Info & Statistics > Server Settings (top right corner button)
  3. Increase the Retain web and traffic statistics for value
  4. Press Save
Server-Wide using CLI
  1. Connect to the server via SSH or RDP
  2. Execute the command below, where "X" is the number of months for storing statistics:

    # plesk bin server_pref -u -stat-keep X

Was this article helpful?

Comments

1 comment
Date Votes
  • looking to do this for an existing domain. we've already done the entire server, but that doesn't change existing domains.

    0

Please sign in to leave a comment.