Disk usage in cPanel

In website optimization, there are three resources which are connected. Increasing the usage of one of them will also increase the usage in the other two left. We are talking about the Disk/Bandwidth/Inode trio. In this tutorial we will talk about Disk Usage and how to keep a healthy hosting environment by maintaining an optimized your hosting account's disk usage.

 

Further reading:

How can i check the speed of my website?

How to Address Excessive Resource Usage on a Web Hosting Account

On-Page and Off-Page Search Engine Optimization - Keys to SEO Success

Web Hosting Options to start your online business

How to optimize your SMF forum website

WordPress Website Speed Optimization Tutorial

How to Speed Up Your Joomla Website

How to Speed Up Your Drupal Website

 

But first, what is disk usage and why is there a limit on your account's disk space?

 

The term "Disk Usage" can be defined by all files, folders, and emails taking space on your hosting account. As disk space is a finite resource and disk usage is directly connected with bandwidth generation, disk space has to be capped to avoid hosting unusually large or too many files. This can slow down your web hosting package when those files are being accessed or downloaded. The backup service which we offer for free could also be significantly slowed down or even impossible to maintain if excessive disk space was used.

Furthermore, our disk space quotas have been created with the industrial standards and the average resource usage of thousands of shared hosting accounts in mind. Meaning that if you need extra space in order to maintain the same website which you have been growing on your Plan for a year or more, you will also have increased needs for other resources from that plan which you have outgrown. The natural outcome in such cases is to increase the resources in order to accommodate the increased traffic and content which can be done via upgrading to a higher shared hosting plan or VPS/Dedicated Server solution.

 

Further reading

How to prevent your website from a hack

A General guide to Safe Website Updating

CPanel Security

Step by Step Approach to Password Protect a Directory in cPanel

How to check your PHP version and configure your PHP settings

7 Security Tips for a WordPress Website

Basic Guide to WordPress Security

How to Fix a Hacked WordPress Website

How Secure is Your Joomla Website

How to Fix The Joomla White Screen of Death

 

How to check your Disk Usage

 

Disk usage can be easily checked regardless of the application which you use for building a website. This is due to the fact that the information is available in your Client Area and cPanel, despite many applications actually having plugins that can show you the disk space they use in specific. The Resource Monitoring System and cPanel visual representation of the Disk Usage is easy to understand. The latter is also provided at all times in the right corner of your cPanel which makes it really hard to miss.

To check the General Disk Usage information about your hosting account, log in as a client in your Client Area with us and click on the Resource Monitoring button for the plan which you want to check.

This will bring you to the Monitoring System which will show you more information regarding the resources used by your hosting account. In this example, we have reached the disk space usage quota for the account and even went a bit overboard, so we got a red warning message informing us of that.

You will also get an email notification to be always informed, in case the disk usage is generated without you actually uploading new files - by receiving emails or cache being generated by an application.

To do the same via your cPanel, please log in your cPanel and bring your attention to the right of the interface window.

The color of filling will change based on the amount of disk space left before you reach 100% of your hosting account's capabilities from green to yellow and red respectively. If you are in the green, you have nothing to worry about. Being in the Red, however, brings up concerns about your disk usage, and at that point, you should take measures as per our tutorial on how to reduce your disk usage.

To see your disk usage in detail, click on the link type Disk Usage text from within your cPanel (or access it by typing disk usage in the search field) and read more about it in our Detailed Disk Usage tutorial below.

 

How to check your Disk Usage in details

 

Let us dive deeper into the disk usage statistics and how to locate excessive usage of this resource. Seeing one file or folder using most of your disk space is a clear indication that you need to further check the given file/folder and take measures. As mentioned in our previous tutorial, you have to first log in your cPanel and click on the Disk Usage text link to get into the detailed statistic window. The same can be done by typing "Disk Usage" in the search field and entering the corresponding section.

Please note that, if your web hosting account above the disk usage limit and access the Disk Usage section, you will not be able to load the statistics about your disk usage.

Your hosting account will be so full that it won't even be able to execute commands, like the one being used in the background by cPanel which should bring this usage statistic. You will have to go below the quota limit by using File Manager to remove some data in order to get this statistic to load.

Now that the account Disk Usage is below the limit, we can see that there is one folder with excessive use of disk space. Usually, such folders will be custom ones like in our case or the public_html folder holding your websites.

cPanel has done a great job of separating different disk usage generators. Therefore you can see your email accounts being separated from the main disk usage statistics which is handy to have. If the emails are your bane, simply check our Mail Optimization for more information on how to get a local copy of your important emails and bulk clean spam and trash.

At the bottom of the page, you have yet another sorting method for your directories by name or size.

Again, upon clicking on a directory, you will enter it via the cPanel File manager, ready to remove unwanted or obsolete files.

 

How to reduce Disk Usage

 

As we mentioned in the intro of these tutorial, Disk, Bandwidth, and Inode usage are intertwined. This also means that most of the tips on how to reduce your Bandwidth or Inodes Usage will also apply in case of Disk Usage issues. Regardless, we have summarized a list of procedures which you can do in order to considerably reduce the Disk Usage on your hosting account and maintain a healthy environment for your website and business

Quick Access Sections:

  • Optimizing Images
  • Media Files
  • Old Backups and Testing
  • Emails
  • Databases
  • Themes and Plugins
  • Log Files
 

Optimizing Images

Whether you choose lossy or lossless image optimization, you are on the right track to shedding a big chunk of misused disk space. Images intended for the web generally can be compressed a lot without a noticeable difference. Kraken.io is a great tool in which you can choose which compression type to use for your images.

Furthermore, you should reduce the actual pixel size of your images to the one which will be used on your website. Uploading a 4K or 8K image which will be shown as a 700x300px on your website is a waste of disk space and bandwidth. This is due to the entire image being fetched before it being resized to the size which your visitor's browser shows.

Removing from 30% to 80% of an image is a great way to reduce your disk usage especially if your website is built upon visual representations of art, items, products, etc.

 

Media Files

Again, media files appear to be a no-no. Since the web hosting space provided for your account is for web hosting purposes and not storage ones you should consider moving your music and video files to an actual storage service. Amazon Web Services (AWS) is good as a general fix to this issue while platforms like YouTube and Vimeo can be used for your videos. Just embed them back to your site afterward, and they will again look like an inseparable part of it.

 

Old Backups and Testing

Are you doing extra backups outside of the free daily ones which we offer - Great! The habit of making backups before changes can save you valuable time and nerves in the long term. However, you should also remove old backups after they become obsolete or download them on your local environment and then deleting them from your hosting account. Again, you can use Amazon AWS or even Dropbox if your own disk space is scarse.

Testing and more specifically, A|B testing can effectively double your disk usage. While this could be beneficial when your website was small, once you get into the big numbers doubling the disk usage can get you to the disk quota very fast. Removing separate test pages and website sections is also advised when done testing.

 

Emails

Using a local mail client such as Outlook or Thunderbird you can download your emails from the server to your local device. For more information on how to do this, you can check our Email Basics tutorial.

Email forwarding is another great way to save space and prevent emails taking up too much of this resource in the future. As forwarders tell the mails to move to the place which you have specified (Gmail mailbox in most cases) the mails will not even get stored on the server which your hosting account is located so they won't take any space there.

Lastly, don't forget to clear your spam folders and trash regularly or set up rules to do the same for you automatically.

 

Databases

While databases are not counted as Inodes, they are counted towards you Disk Usage quota. WordPress databases, in particular, are infamous for getting bloated overtime, especially considering that each revision is like a separate post of its own. Most people make 5-15 revisions before publishing a post and then some which can make your WordPress website huge without the actual useful content.

Other things to consider when dealing with WordPress databases is to remove spam comments, trashed pages and no longer used plugin tables. The last can be a hard task if you are new to SQL however, there are awesome plugins that can do most of the work for you like WP-Optimize or RVG Optimize Database Plugin. On top of configuring different elements for deletion like spam, pingback, and trackbacks in RVG you can also isolate tables which you don't want to alter.

Similarly, you can find tutorials online on how to optimize different application's databases. Here is a list of the most popular apps and our guides on how to do it:

section

Themes and Plugins

Having the choice of switching to one of the many themes you have available is nice, but surely when you are approaching that disk usage quota, you can cut some of the fat and keep only the current and essential theme for your website. This can also include the child themes which you no longer have use of.

Plugins, especially caching, ones and those that keep logs of many elements for a long time can increase your disk usage substantially. Purge your cache and logs from time to time to minimize their impact on your account.

Backup plugins like BackupBuddy are great for staging, backups and have tons of features. This includes Local Backup Storage Limits for keeping a tight backup size on your account as well as a Remote Destinations feature which allows you to send the backup directly to an offsite location. This can be their very own 1GB cloud storage stash, Amazon S3, any FTP account and Dropbox among others. As a free alternative, you can check UpdraftPlus which supports many of the same features.

 

Log Files

The most common log file which many webmasters check on a regular basis is the error_log. This file is essential as it logs errors which occur on your website for you to investigate and fix. However, sometimes the error produced can be unimportant but it could be logged thousands of times per day growing the size of the error_log file to a few gigabytes. You can open the error log via SSH or File Manager as per your preferences.

Due note that some applications must be reconfigured to work with the error_log and write in it..

If you ever find yourself looking at a big log file in which you can either not interpret the content of, or you are cautious to remove, you can contact our Technical support team via the ticketing portal in your Client Area and submit a query.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

I have a full backup of account through cPanel. How do I restore it?

It is recommended that you maintain healthy backup of your website and possibly download the...

How To Create, Edit, and Delete a File in cPanel Using File Manager

This tutorial will be useful for you to understand how to create a file, edit a file or delete...

How to Create and Manage a MySQL Database

Create MySQL Database and User via cPanel The MySQL Database Wizard is another useful tool...

How do I create and remove an Addon Domain?

An add-on domain is a separate domain name that you add to your web hosting subscription with...

How to Set Up and Delete a Cron Job

A cron job allows you to run a certain command at times set by the job. For example, you could...