
So…you started out with a new hosting account, and had plenty of disk space. But now you’ve had your website for a while, and you’re running out of space. How did that happen?
It is perfectly natural for the amount of space your website needs to grow over time. After all, you add webpages, blog posts, images, and maybe music or video files, all of which add to your disk space usage.
As your site grows older, the log files associated with it grow incrementally as well. These files include statistics about your website visitors and various processes, and any errors which have occurred.
Unused plugins and themes chew up space, as do forgotten or unnecessary backups and databases.
Let’s go through all of these things one-by-one to see how you can reduce the amount of disk space you’re using.
1. Backups
CPanel makes it easy to make backups of your site. But it’s possible to forget to delete backups after they are no longer needed. Usually they are saved to the root folder of your account. By clicking “Backup Wizard” in CPanel you can see if there are any existing backups stored on the server. You can also click the Disk Usage icon in CPanel, or explore via FTP.
If you do wish to keep a backup which is currently stored on your website, it’s a good idea to download it to your own computer or to an offsite location such as Dropbox.
If your site is built on WordPress, there are various WordPress backup plugins which can automatically backup your website on a schedule, and store the backup on a third-party site such as Amazon AWS or Dropbox, so your own disk space isn’t used for permanent storage. My favorite such plugin is UpdraftPlus but there are other good ones, too.)
2. Email
Forwarding saves space.
Do you access your mail on the server, or is it merely forwarded to another address? Forwarding your email to another address (e.g., Gmail) rather than storing it on the server will save some disk space. Check with your web host if you’re not sure how to set up forwarding.
Do you use an email app?
If you use an app such as Outlook, Windows Live Mail, or Thunderbird to download your email from the server, go into that app’s settings and make sure “leave a copy on the server” is un-checked. Otherwise, in addition to downloading each mail, it will also leave it on the server, which can quickly add up to use a lot of space.
Check your Spam Assassin settings.
If you have Spam Assassin enabled via your CPanel account, be sure to either select “Enable Auto-Delete of Spam”. If you choose to have suspected spam sent to a folder where it is not automatically deleted, you’ll need to check that folder often to prevent saved spam mail from chewing up your disk space.
Have you forgotten an email account?
If you have an email account you no longer use, check to see if old mail is still being stored on the server.
3. WordPress themes
If you’ve installed WordPress themes that you’re not using, go ahead and delete them. Unused themes serve no purpose, taking up disk space and even potentially introduce security risks.
4. WordPress plugins
WordPress plugins can add important functionality to your website. But if you don’t really need a particular plugin, it should be deleted. Not only do unnecessary plugins use up disk space, but they can also slow down your site, and even introduce security risks.
There are two steps to getting rid of an extra plugin. First, click to deactivate it; once deactivated, you can click to delete it.
Some plugins will ask, upon deletion, if you would also like to delete all information associated with it. This is your call — but if you don’t plan on using that plugin again, there is no point in saving all its settings and stored information in your database. That just bloats your database and takes up unnecessary disk space.
Some active plugins may be poorly written, causing them to take more space than necessary, or to generate files which eat up space; incorrect settings may also cause problems. If you’ve deleted unnecessary plugins and still have issues, you might take a deeper look to see if any of your active plugins are causing issues. (This can be hard to diagnose; get help from your host or web developer if necessary.)
Please note that some plugins log information, and these logs can increase in size over time. For instance, a security plugin may keep a log of banned IPs. To reduce space used, you can purge these logs, but if you do so, the security of your site may be somewhat compromised.
5. Your database(s)
The WordPress database contains all of your website’s posts and pages, as well as settings for your site, theme, and many of your plugins. Its health is critical to your site.
But, the database is susceptible to bloat. An over-sized database not only takes a lot of room, but it can slow down your site. Here are some ways you might wish to clean it out:
Delete page revisions.
This is, potentially, a big cause of wasted disk space. Each revision is stored as a separate page in the database.
So, every time you save a changed post or page, a new revision is created and stored in the database. It is best to flush out the revisions from time to time. You would be amazed at how bloated your database can become due to revisions!
Delete trashed pages.
Did you toss a page or post in the trash? Go ahead and delete it permanently. It still takes up space in the trash.
Delete spammed comments.
These can pile up fast and can really eat up disk space.
Don’t want to do it manually? Me neither!
Fortunately, there is a plugin which will clean up the items above — and more — in less than a minute. It’s the RVG Optimize Database Plugin.
I use it on most of the sites I build. (On one of my larger sites which is often updated, it cleans out up to 5MB every time I use it. Over the past couple years it’s saved me over 600MB of disk space!)
This is a very fast and easy way to potentially reduce your disk space.
Abandoned database tables
Another thing to do is to check to see if your database is bloated with tables left behind by plugins no longer in use. Most deleted plugins will completely uninstall themselves. But some don’t, leaving tables full of old data behind in your database. Cleaning these up can not only reduce the amount of disk space used, but can also speed up your website.
I would not recommend doing this if you don’t know your way around the database, however. In that case it would be better to hire someone experienced to do it for you, as any errors made can result in your website going down — or in the worst-case scenario, being deleted altogether. (If you do work on your database, always make a backup first!)
Abandoned databases
Its possible your site may actually have some entire databases which are unused. For instance, these can be left behind by plugins, or previous installations of WordPress. Be careful before deleting anything (make a backup first!) — but if you do find an extra database, deleting it can save a whole lot of room.
6. Optimize your images!
Lossy compression
Your images should be compressed as small as you can get them without greatly compromising image quality, before you ever upload them to your site. Most image editing software will do this as you save your file; you can choose the level of compression you wish to have. For web use, I most often compress my images to about 30% of the original. This is called lossy compression — because you do lose some image quality (although you can do it so that the loss is minimally noticeable). This type of optimization can save you huge amounts of disk space.
Lossless optimization
However, you can take this a step farther. Plugins such as EWWW Image Optimizer will knock down the file size of your images even more. This type of optimization is lossless, meaning that it doesn’t affect the quality of the image at all.
(Bonus tip: Image dimensions are important, too. Don’t upload an image which is larger in dimensions than will be displayed on the page. For example, if you’ll only ever display the image at 500 pixels in height, uploading one that is greater in height than 500 pixels is a waste of disk space.)
If you only need a For more on this topic, check out my article that explains image optimization in depth.
7. Large media files
Large images aren’t the only space eaters. Music and video files are huge and a single file can chew up a whole lot of precious disk space.
Many web hosts restrict the amount of space you can use for large media files, as they can slow down the server. You might consider hosting them elsewhere — such as YouTube or Amazon Web Services (AWS), which has a very low cost. (Yep! Amazon offers more than a shopping site — many companies, large and small, use their servers for storage and more.) AWS S3 hosting services has a very low cost based upon space used. Here’s how to host files at AWS S3.
8. Malware
It’s a good idea to scan your site for malware. Try Sucuri.net for a free scan, or use their WordPress plugin.
9. Caching plugins
A caching plugin can speed up your site. But it will need extra space to store the cached files. A misconfigured plugin can also cause issues; check your settings.
10. Various logs
Error logs
When errors occur on your site, they are usually logged. If some aspect of your site is generating errors regularly (perhaps a script, plugin, or database error), some very large error logs can be produced!
FTP into your site or use CPanel’s File Manager to look for error logs; these are text files and often named “error_log”.
If you find an error log, open it up and see what is generating the error. The error should be fixed, or it will continue to generate error logs. Then, delete the error log.
Other logs
Depending upon the specifics of your particular site, there may be other logs which will grow over time. Check carefully to see if this is the case.
Statistics logs are what are used to produce the AWStats Webalizer, Analog, and other reports on your CPanel account. But as your site ages, these logs grow. If you don’t use the stats (perhaps, as most webmasters do, you prefer to use Google Analytics), you can delete these logs periodically. They are found in your account’s root in the /tmp/ folder. They can be deleted via FTP or CPanel’s File Manager.
11. CPmove files
Files named “cpmove.xxxx” are automatically created when a site is restored, or moved to a new server. They should be automatically deleted after that process, but occasionally that doesn’t happen. Check for these as you would for error logs as described above. You can safely delete these files to save a little room.
12. Core dumps
A core dump is caused by a process which is not working correctly. When this happens, the program terminates abnormally and then dumps its memory into a file. These files can get very big!
You can FTP into your website or use the CPanel File Manager to find any core dumps. (The file name of a core dump will begin with “core.xxxx”) You can delete the dump, but if the root cause isn’t corrected, these files will continue to be generated. Before deleting the file, open it up to see what the faulty program may be, so it can be disabled or corrected.
A bonus tip…
Some processes need extra space to operate. For example, even if you backup your site to an offsite server such as S3, the backup still needs to be created and temporarily saved, on your own server. Other processes require disk space during their normal operation, too. It is wise to keep a certain amount of disk space available; headroom equal or greater than 30% of your allotted space is a pretty good rule of thumb. If you do backups, be sure to allow for that. (More is always better.) By keeping disk space usage to the least amount possible, you’ll avoid running into future problems.
A note on web hosting
If you’ve done everything you can to get your disk usage down — or just don’t want to bother with it — you can always ask your web host to upgrade your hosting package to one that has a greater disk space allowance.
Have you had issues with disk space?
There are quite a few things which can eat up your disk space. Finding the cause can be tricky — but it is worthwhile because cleaning up your disk space can make your site faster, more efficient, and can save you money.
Have you ever had a disk space problem? Please share your experience by leaving a comment below!
And, if you need assistance with your disk space issues, do get in touch. I’d be happy to help.




