Sometimes you may find that you just plain need more disk space. Perhaps you’re regularly uploading large files to build an online archive for a project or you work with video files that need to be stored locally. As Reclaim Hosting has grown over the years we’ve consistently increased our storage options and luckily upgrading is an easy process! That being said we always encourage folks to diagnose the source of disk space issues to be sure there’s not any other issues at play. Automated backups you weren’t aware of in a folder on your account because of a plugin, or a log file that has grown rapidly could be the source and simply deleting a few files could free up large amounts of space in your account. But how to find that large needle in the haystack?
cPanel has a tool called Disk Usage which is found under the Files section. Disk Usage will calculate the size of every folder in your account and display it in a nice graph. That said, this particular view does not allow you to see which subdirectory or folder is consuming the most space. More often than not you’ll find that the public_html folder which houses all of your web content is the largest, but that could still leave you searching blindly for more information on where within that folder the culprit is.
Thankfully cPanel has now provided an update to this feature. If you scroll down the new tool is at the bottom of the page.
Clicking the > symbol in front of the directory you wish to examine will expand it and show the subdirectories as shown in the example below. Each directory with a > in front of it can be expanded further.
We also have a program called Ncdu added to our servers which is available from the command line. You’ll need to be logged in via Terminal with your SSH account to take advantage of this. Once connected, simply navigate to the folder you want information about and type the ncdu
command to get a text-based graphical representation of the largest folders.
Because the folders and files are ordered by size, we recommend starting at the root of your account and running the command there. You can use the arrow keys to move up or down and enter to navigate into a folder and get a readout of the size of its contents. In our experience it makes quick work of analyzing disk space issues and finding any opportunities to clear out the cruft. When you’re finished simply hit the q
key to quit.
If for some reason ncdu
is not available in your account on Reclaim Hosting put in a support ticket and we’d be happy to make sure it gets added.
One last item to be aware of is that when deleting anything through the cPanel File Manager, it's important to always check the Skip the trash and permanently delete the files option otherwise any deleted files will be put into your .trash folder which still consumes space until emptied.