Every hosting package has a finite amount of disk space. On top of that, individual email accounts or FTP accounts may also have quotas. When a quota has been reached you can no longer write data to the server’s file system.
When you have run out of disk space incoming emails can’t be delivered to your inbox. In that case emails will be kept in the mail queue for up to a week. During that time the server will try to deliver the emails at set intervals. After a week the mail server gives up, and the emails are bounced back to the sender.
As said, FTP is also affected. When you try to upload files via FTP you may see an error 451. For instance, in FileZilla you will see “451-error during write to file” in the message log.
Image: FileZilla showing an error 451 (“Error during write to file”).
Or, when you try to upload a file using cPanel’s file manager you will get the error “Maximum file size allowed for upload: 0 bytes”.
Image: cPanel is not allowing files larger than zero bytes to be uploaded.
In short, when you run out of disk space pretty much everything stops working. The only exception are databases. There is a good reason why databases are not directly affected by disk space quotas: your data gets corrupted if writes fail.
Each email address has its own individual quota. The quota can be set to “unlimited”, which sounds ideal. However, changing the quota to “unlimited” only means that the mailbox will never be considered full. It does not mean that you suddenly have unlimited space for email. Once you hit the quota for your hosting package your email will still stop working.
To illustrate the point, let’s imagine that your hosting package has 500MB of disk space. You got one email account, and the quota is set to 1GB. When the mailbox is 500MB in size the hosting package has run out of disk space, even though the mailbox is only half-full.
Image: the ‘Email Accounts’ overview in cPanel. Here, email@example.com has a quota of 1GB, and the mailbox is using 500MB.
On cPanel servers you get a notification email when your account is using over 80% of disk space. The emails are sent to the email address(es) shown under Preferences » Contact Information. It is a good idea to have at least one email address that is not hosted on the server. That is because your email will stop working when you suddenly run out of disk space – you wouldn’t receive the warning email.
You can check how much disk space your account is using via cPanel’s Disk Usage interface. One thing to bear in mind is that the statistics shown are unlikely to be bang up to date. The disk usage statistics are refreshed every few hours, so cPanel may still show that your account is over its quota after you have cleared some space.
If you got SSH access then you can get more accurate data. The following command lists the 20 largest files and directories, sorted by size:
$ du -ah ./ | sort -hr | head -20
You might also want to look for backup files. This command lists all .gz, .wpress and .zip files that are larger than 5MB:
$ find ./ -type f -name *gz$ -or -name *wpress$ -or -name *zip$ -size +5M -ls
Please feel free to contact us when your account has reached its disk space quota. We can check if it is possible to clear some space, and if needed we can temporarily increase the quota. The latter is useful, as even removing files can be difficult when your account has run out of space.
The two most common reasons for disk space issues are large backup files and email accounts. There can be other reasons though, such as large log files or databases.
If you are using Softaculous or a WordPress plugin to take backups then you probably want to stop doing so. In particular if your website has lots of images backup files will be very large. Keeping those backup on the server doesn’t make a lot of sense. You can instead use cPanel’s Backup tool. Doing so has two advantages:
A downside of cPanel’s backup feature is that you need to make the backups manually. In general, it is good practice to make a backup before you do any major work on your website. That way you can always roll back any changes you made. In addition you may want to do the occasional backup – say, once a month.
Also, we take full backups of all our servers every night, and we keep backups for seven days. That means that we can roll back your website if disaster strikes.
Email accounts can grow very quickly. If you are using an email client such as Outlook, Mac Mail or Thunderbird then you can archive old emails locally. Emails you archive are moved from the mail server to your email client, which means that you still got access to your emails.
If you prefer to store all your emails on the mail server then you may want to consider separating your website and email hosting. For instance, our Office 365 plans come with 50GB mailboxes. By using Office 365 you are unlikely to ever need to worry about disk space quotas, and you get some other benefits as well, such as shared contacts and calendars.
Another option may be to delete emails that are older than a certain date. You can do so via cPanel’s Email Disk Usage feature.
You can also have a look at the default mailbox. This mailbox collects bounce emails for emails that have been sent by a script, cron job messages and, depending on how the mailbox is set up, emails sent to non-existing users. If the mailbox is very large then you can probably empty it. At the same time you may want to check why the mailbox is collecting lots of emails. Often, a large default mailbox points to an issue with your account. For instance, lots of bounce emails in the inbox may indicate that a lot of spam is being submitted via forms on your website. Or, lots of cron emails may indicate that one or more cron jobs you created aren’t working correctly.
There are other possible reasons why your website is using a lot of disk space. If your website is generating lots of PHP notices, warnings and/or errors then there may be very large error_log files. You can safely delete these files, but we strongly suggest to first investigate the errors.
When you upload an image via WordPress it will, by default, create three additional image files: a thumbnail, medium-sized and large-sized image. That is useful, as it enables your WordPress install to serve relatively small images (which makes web pages load faster). It also means that you don’t have to worry about the size of the original image you upload.
Uploading really large images does mean, however, that you are wasting disk space. It is best practice to optimise images before you upload them, for instance by cropping and/or resizing them.
It is also worth noting that some WordPress themes will create lots of additional images files from images you upload. Most of these image sizes may never be used, but the images do of course take up space. You may be able to limit the number of images that are created in the theme’s settings.
You can see the size of databases on cPanel’s Databases interface. If you got a large database then you can check the size of individual tables via phpMyAdmin. If you click on the database name in the left-hand pane you get an overview of all tables. The last two columns show the Size and Overhead. You can click on the header to sort the tables. For instance, clicking on the Size header will sort the tables by size.
Troubleshooting disk space issues can be tricky. If you are not quite sure how to deal with a disk space issue, please do contact us.