Gain more disk space on Apache web hosting accounts

Sep 21, 2007 16:35 GMT  ·  By

If you have a web hosting account and your site is hosted on an Apache web server, some day you can run out of hard disk space due to the fact that your site is growing and you add content constantly to it. To buy another hosting account which offers you more hard disk space is not the desired solution. This is the ultimate one.

Even in more critical cases, you can try some simple actions with the attempt to free up as much hard disk space as you can. First, you must identify which files are not needed and occupy the most of your hard disk space. You should know that Apache log files can be bigger at a given time due to an increase site traffic or many errors in your web applications. They could have 500 MB or more in some cases, as a consequence, if you do not need them their deletion is recommended, but if you want to analyse website traffic or errors, then you should archive them.

If you do not have access to a web account administration control panel, you can connect to the webserver using ftp and then find the directory named logs and there you will retrieve the log files. If you still want to have a small error log file, then it is recommended to maintain your website error free as much as possible. On the other side, the disk based file caching should be managed according to the disk size.

Webmail management is also important in order to reduce the degree of hard disk occupation. Unused email accounts should be deleted. If you did any backups on your website it is recommended to keep them on your local hard disk or other storage media. If you want to keep them on the web server, then you should archive them too. In case you use databases, they should also have tables optimized in order to gain disk space and a higher speed of scripts execution. But the best practices in order to have enough disk space is to use lightweight scripts and databases, optimize images and delete the Apache server logs if you do not use them.