Last updated: 29 June 2021
cPanel’s Disk Usage page provides a breakdown of how much space is used on your account. This includes website files, email accounts and databases.
The report is mainly used to identify the cause of disk space issues. When your account is running low on disk space it is often possible to create some free space, for instance by downloading large backup files.
When the amount of free space gets to around 10% the server sends you a notification email. These emails are sent to the contact email address on your account. You can change the address via the Contact Information link.
The Disk Usage page is divided in two parts. The first section shows the following disk usage information:
You can quickly open a directory in the file manager by clicking on a folder name. You can also open the Databases or Email Accounts menu.
Image: viewing the locations that use the most disk space.
Disk space issues are often caused by large email accounts. You can quickly see how much space email accounts are using via cPanel’s Email Accounts page. You can also check the Email Disk Usage interface. The latter page let’s you view how much space is used by individual email folders, and you got the option to delete emails.
Usually, a better way to reduce the amount of space used by email is to archive old emails using an email client, such as Outlook or Thunderbird. Emails you archive still exist in your email client, but they are no longer stored on the server.
It is also possible that the default email account is using a lot of space. The email account collects emails for your account that can’t be delivered, and you can normally empty the mailbox. However, it is worth checking the emails in the mailbox. The emails might just be spam, but it is also possible that there is an issue that needs to be resolved.
Large databases are less common. However, if the Disk Usage page shows that there is a very large database then you can check the size of the database via the MySQL page.
Usually, the issue is caused by one or two database tables. You can view the size of individual tables via phpMyAdmin. You can sort the tables by size (by clicking on the Size header), so you can quickly identify the largest tables. Often, it is possible to reduce the size. For instance, if you got a WordPress website you may find that there are lots of spam comments or draft posts that can be deleted (via the WordPress dashboard).
One thing to bear in mind that deleting data from tables using the InnoDB storage engine doesn’t free up space automatically. To reclaim space you need to run an OPTIMIZE TABLE
command. For instance, to reclaim space in a table named example_db you can run OPTIMIZE TABLE example_db
.
If you don’t like entering commands then you can alternatively select the table in phpMyAdmin and then select Optimize from the with selected drop-down menu (at the bottom of the list with tables).
It is worth noting that the OPTIMIZE TABLE
command only works if the database server uses the innodb_file_per_table setting. Luckily, that is the default on cPanel servers.
If most of the space is used by files then the second part of the Disk Usage page is quite useful. This section again shows all the folders in your home directory, but here you can sort them by disk usage. That way you can quickly navigate to the directories that use the most space.
Image: viewing the locations that use the most disk space.
The above image shows that the public_html directory is using the most space (45.30MB). Inside that directory, the /wp-includes folder is responsible for the majority of the disk space usage (30.08MB). If you want to view that directory in the file manager, you can do so by clicking on the directory’s name.
As an aside, a disk space usage of 45MB is very little. Our starter package, the Mega Deal, comes with 500MB of disk space.
Disk space issues are often caused by large backup files. An easy solution is to download the files to your computer, using the file manager. You can then delete the files to create more free space.
Large error_log files are another common reason for disk space issues. You can safely delete these files but we recommend to first check the errors. It is very likely that there is an issue with your website’s code that needs to be fixed.
The disk space figures shown on the Disk Usage page are never 100% up to date. cPanel updates the statistics every few hours, which means that recent changes are unlikely to be reflected on the page. You can force cPanel to update the stats by renaming the .cpanel/datastore folder. Note that this is a hidden folder in your home directory. If you can’t see the folder then you need to tick Show Hidden Files (dotfiles) in the file manager settings.
Also, if your email accounts use the mdbox storage format then the disk space stats won’t change when you archive or delete emails. We can update the stats for you.
You can upgrade (or downgrade) your hosting package at any time: either log into your billing account or submit a ticket. We are always happy to talk you through your options.