WHM provides a setting called File upload required free space that lets you enforce a minimum amount of free disk space on the server after any file upload. This prevents users from uploading files that would leave the server with dangerously low disk space, which could cause services to fail, logs to stop writing, or temporary files from being created.
Step 1: Log in to WHM
Open your browser and navigate to https://your-server-ip:2087. Enter your root credentials to access the WHM dashboard.
Step 2: Navigate to Tweak Settings
In the left-hand sidebar, go to Home » Server Configuration » Tweak Settings.
Step 3: Locate the Upload Space Setting
Use the search bar at the top of the Tweak Settings page and type upload or free space. Look for the setting named File upload required free space.
Step 4: Set the Minimum Free Space
Enter the desired value in megabytes (MB). For example, entering 500 ensures that at least 500 MB of free disk space remains on the filesystem after any upload completes.
- Recommended value: 500 MB to 1 GB for shared hosting servers.
- Dedicated/VPS: You may set a lower value if you actively monitor disk usage.
- Important: This value applies to the entire filesystem/partition, not individual cPanel account quotas.
Step 5: Save Changes
Scroll to the bottom of the page and click Save. The change takes effect immediately — no server restart is required.
Important Notes
- If an upload would cause the available free space to drop below the configured value, the upload will be rejected.
- This setting affects uploads through cPanel File Manager, PHP-based uploads, and other web-based upload methods.
- This is a server-wide setting that applies to all accounts on the server.
- You can check current disk usage at any time via SSH with the
df -hcommand.
Troubleshooting
- Users report upload failures after setting this: Check the current free disk space with
df -hin SSH. If the server is already close to or below the threshold, you will need to free up disk space or reduce the configured value. - Cannot find the option: The setting name may vary slightly between WHM versions. Try searching for
uploadorfree spacein the Tweak Settings search bar, or browse through the All tab. - Uploads still succeed when disk is nearly full: Ensure you saved the setting and that no overrides exist in individual PHP configurations.
For more information, see the official cPanel Tweak Settings documentation.