By default, cPanel calculates a user's disk usage based on their home directory files. MySQL databases are stored separately (typically in /var/lib/mysql) and may not be included in the usage calculation. Enabling this setting ensures that database sizes are factored into each cPanel account's total disk usage, giving a more accurate picture of the space each account actually consumes on your server.

Step 1: Log in to WHM

Navigate to https://your-server-ip:2087 and log in with your root credentials.

Step 2: Open Tweak Settings

In the left-hand sidebar, go to Server Configuration ยป Tweak Settings.

Step 3: Locate the Setting

Use the search bar at the top of the Tweak Settings page and type database to quickly find the option. Look for the setting named Include databases in disk usage calculations.

Step 4: Enable the Setting

Toggle the setting to On. This tells cPanel to include MySQL and PostgreSQL database sizes when calculating each account's total disk usage.

Step 5: Save Changes

Scroll to the bottom of the page and click Save to apply the change.

Important Notes

  • After enabling this setting, disk usage figures shown in cPanel and WHM will increase for accounts that have databases, since those sizes are now included in the total.
  • Accounts that were previously under their quota limit may now appear to be approaching or exceeding their quota once databases are counted. Notify your users if this change may affect them.
  • This change affects all accounts on the server and cannot be toggled per-account from this interface.
  • Disk usage statistics are updated during the nightly cPanel maintenance. You can force an immediate update by running /scripts/quotacheck via SSH or the WHM terminal.
  • The settings are stored in /var/cpanel/cpanel.config. Always use the WHM interface to make changes rather than editing this file directly.

Troubleshooting

  • Disk usage not updating after enabling: Run /scripts/quotacheck from the command line to force a recalculation. Allow some time for large servers with many databases.
  • Cannot find the setting: Ensure you are on a current version of cPanel and WHM. Use the Tweak Settings search bar to locate it quickly. The setting may also appear under the Stats and Logs tab depending on your WHM version.
  • Discrepancies in reported usage: Make sure no other custom scripts or quotas are overriding the cPanel disk usage calculations. Check /var/cpanel/usage for raw usage data.

For more details, refer to the official cPanel documentation.

Was this answer helpful? 0 Users Found This Useful (0 Votes)