Minimized server potential? You might have to clean up your cPanel.
Worry not, here are few tips and tricks that can help free up disk space on your cPanel server and maximize your server potential, reduce server downtime and speed up your website in time.
1. cPanel backups need to go
The backup feature in the cPanel enables users to store the backups on the server instead of downloading them. If you have a large server then this can take up a lot of disk space. Use this following command to delete all the user cPanel backups on the server through SSH :
for user in `/bin/ls -A /var/cpanel/users` ; do rm -fv /home/$user/backup-*$user.tar.gz ; done
It would help if you mount a backup server to your hosting server to store your backups. Consider using a backup method that doesn’t store your backups locally. Local backups are not very useful when the server failure.
2. cPanel File Manager temp files to the bin
cPanel file manager creates a temp file every time a user uploads files in the File manager. There are chances that these files still exist in the File manager even after the upload. Get rid of these temp files with this command ;
rm -fv /home/*/tmp/Cpanel_*
3. cPanel update archives = unnecessary history
CPanel updates leave behind residual files that are unneeded. Free up a little bit of space by deleting these files or by moving them to a backup server ;
/home/cpeasyapache (the actual name may vary depending on Cpanel version)
4. Server log rotation
The server’s logs are stored in /var/log. This can take up large amounts of storage space on populated servers. Consider changing the length of time or frequency of the log rotation and compress it to save space.
5. Yum files are not so yum…
Package cache files are left behind by Yum updates on the server. Clean up this junk Yum files by running this command;
yum clean all
6. Remove redundant accounts
A larger churn rate means you probably have some accounts on the server that are useless. Check WHM > List suspended accounts and search for suspended accounts that need to be removed.
Discontinue the accounts in WHM > Terminate an account
7. Put an end to contraband
Run a few commands to locate files like .avi, .exe, .mp3 which are copyright violations. Make sure you get the customers to remove those files.
This also maintains your business ethics.
8. Or get a larger server…
One of the reasons you are experiencing high disk space usage could be because of your customers requiring a larger amount of disk space. Invest in a server that can occupy a small number of users so that they can use a large amount of disk space.
Was the article helpful? Have more queries? Tell us!