How to manage and reduce your Disk Usage in cPanel
Over time, certain hosting accounts can grow in size and cause performance slowdowns. This article will show you how to use the Disk Usage tool in cPanel, and suggest several ways to reduce the amount of disk space used on your account to help improve performance.
- How to detect and reduce large files
- How can I find the large files on my account?
- How do I reduce my multimedia file usage?
- How do I reduce my backup storage?
- How do I reduce my log file storage?
- How to detect and reduce large email usage
- How to detect and reduce large database usage
- Other types of large disk space usage
How to detect and reduce large files
How can I find the large files on my account?
The easiest way to do this is by inspecting your directory using the Disk Usage cPanel tool:
- Log in to your cPanel
- Go to the Files, then click Disk Usage
- Scroll down to the area under Sort directories by, and click the Disk Usage radio button
- Click on the arrow that corresponds to the largest folder, to locate and examine your disk usage
- In the above example, we see the public_html/images/videos folder contains a large number of video files, which are using a significant amount of space on the server.
How do I reduce my multimedia file usage?
- Open File Manager (see How to use File Manager)
- Locate the folder/s containing large multimedia files, then click the down arrow in the Size column, to sort in descending order
- Once the large files have been identified:
How do I reduce my backup storage?
If you use a shared hosting service, duplicate files (including backups, archives, etc.) cannot be stored on the server for more than 24 hours without written consent. If duplicate files are detected, you may be sent a notice to comply with our Acceptable Use Policy. If so, please follow these steps to reduce your usage:
- Remove manual backup archives saved in your account
If you generated the backup, please remove it after having downloaded it to your computer. - Disable or reduce the frequency of automated backup plugins
If using a backup plugin, consider using a remote storage provider (eg Dropbox, Google Drive, or Microsoft OneDrive) in order to reduce the amount of disk space used on the server.
Consider upgrading your service to a Cloud or Dedicated server, which does not impose these disk usage restrictions.
How do I reduce my log file storage?
In general, the size or the presence of a log could depend on the log level, log type, and the software that is generating the log. In a web environment, the majority of logs are generated by PHP, or by various web applications, if they have the logging or debug mode enabled. What follows are some suggestions that may help you to reduce or eliminate large log files from your server:
- Keep your software up to date, including any plugins, add-ons, themes, etc. Outdated PHP software may generate a lot of warnings/errors that will increase the size of your log file.
- Make sure you meet the requirements specified by your software. For example, for a WordPress website, ensure all active plugins and themes are made for the PHP version that you are currently running.
- If your error_log file is large and unreadable, you can delete it (using File Manager). If your website is currently producing errors or warnings, depending on the log level, the error_log file will be regenerated. The log level can be adjusted; for more details please refer to the official PHP documentation: https://www.php.net/manual/en/errorfunc.configuration.php.
- You can completely disable the generation of error_log files. Depending on your account, you can do so via php.ini, .htaccess, or inside the PHP Selector tool. You may contact our support team if you need help disabling the logging functionality of PHP.
- Avoid using the debug mode of your web application for long periods of time.
- Suppress the output of automated tasks (cron jobs). Some web applications are designed to pipe the output of a cronjob to a specific file. Use the cPanel’s Cron Jobs tool to inspect your cron jobs and edit them if necessary.
How to detect and reduce large email usage
Your recommended mailbox limit depends entirely on your package. To ensure that you don’t exceed the limit, please follow the below procedure.
- Log in to your cPanel
- Go to the Files, then click Disk Usage
- Scroll down to Email Accounts
- Check the Disk Usage column
If your email has significant usage (as indicated in the Disk Usage column), you’ll need to take action to reduce your disk usage, as follows: - Delete unused email accounts that you no longer require
- Remove old messages
- Empty out your trash
- To locate individual accounts that may have high usage, see the Storage column, click Used to show the disk usage per account
How to detect and reduce large database usage
- Log in to your cPanel
- Go to the Databases, then click MYSQL Databases
- Under Current Databases, review your database usage and size
- Delete any unused databases, OR (for power users) clean up your existing databases using phpMyAdmin
Other types of large disk space usage
Our support team will be happy to guide you to help reduce your usage on a case-by-case basis or to upgrade to the right service for your requirements.