You are currently viewing How to Clear Space on a cPanel Server

How to Clear Space on a cPanel Server

As your website grows, so does the amount of data stored on your server. This could eventually result in an accumulation of superfluous files running out of space on your cPanel server. This may result in system faults, reduce functionality, and slow down performance. Maintaining disk space on your server is essential for optimum stability and performance.

We’ll go over how to free up space on a cPanel server in this blog post. This blog will assist you in avoiding common errors and maintaining the optimal performance of your server.

Why is Disk Space important in a cPanel Server?

Disk space is essential in a cPanel server since it stores website files, email accounts, and databases. If your server runs out of disk space, you may not access your cPanel or web-mail accounts.

Disk space is the amount of storage on your server for files, databases, emails, and other vital data. Running out of disk space can cause a variety of concerns, including: 

  • Decreased performance: A full disk can cause your server to slow down as there’s no room for temporary files or caching.
  • Backup issues: If your server has no available space, automated backups may fail, putting your data at risk.
  • Service interruptions: Email services, databases, and websites may stop functioning if they can’t write new data to the disk.

Thus, managing disk space is essential for the efficiency of your cPanel server.

Steps to Clear Space on the cPanel Server

As we understood in the last topic, the disc is important to optimize your website performance and to get access to cPanel. Follow these steps to clear space on the cPanel server.

1. Delete user Cpanel backups

The panel includes a backup feature. If activated, your cPanel control panel settings and other data will be saved in the backup folder. On larger servers, this folder could take up a significant amount of storage space. In that instance, the best option to free up disk space in cPanel is to delete some files from the backup folder. You can either erase the data individually or wipe the entire user’s cPanel. 

    You can delete all user cPanel backups on the server with this command via SSH:

    for user in `/bin/ls -A /var/cpanel/users` ; do rm -fv /home/$user/backup-*$user.tar.gz ; done

    2. Move your backups offsite

    However, you might think about utilizing an alternative way of backing up your server that doesn’t need keeping the backups locally, or mounting a backup server to your hosting server and storing the backups there (you may mount external media in WHM > Configure Backups). Local backups are generally worthless in the event of a server failure, notwithstanding their occasional convenience.

    3. Delete cPanel File Manager temp files

    A temporary file is created when users upload files using the cPanel File Manager; this file may or may not be deleted after upload. With SSH, you can use the following command to delete these files:

    rm -fv /home/*/tmp/Cpanel_*

    4. Move or archive logs

    The majority of the server logs are kept in /var/log, which on systems with higher traffic counts can grow rather enormous. In /etc/logrotate.conf, you can adjust the rotation period and frequency of the logs. You can also enable compression to save more space, but doing so will use more CPU power while gzipping the logs. In order to free up space on your hosting account for older logs, think about setting up a cron job to move them to a backup or log server on a regular basis.

    5. Clean up Yum files

    Yum updates leave package cache files on the server. You can clean up all unneeded Yum files by running:

    yum clean all

    6. Remove pure-ftp partials

    When your users upload files to the server via FTP when your server runs pureFTP as an FTP daemon, the FTP server creates temporary files starting with .pureftpd-upload* that get renamed the the actual filename when the upload completes. If the upload doesn’t complete, these files are left on the server. You can find and delete these by running this command via SSH:

    locate .pureftpd-upload | xargs rm -fv

    7. Consider upgrading the disk server on your account

    It is possible that you will need a significant amount of disk space and that you won’t be able to maintain a decent amount of disk space consumption on your account. In order to service clients with larger websites, several hosting companies employ backup servers with lots of disk storage capacity but fewer capabilities. It could be wise for you to think about purchasing a larger disk capacity.

    Common File Types and How to Manage Them on cPanel

    File types on the cPanel server that typically consume space and how to manage or clear them.

    File type Description Potential size How to manage space 
    Email AttachmentsEmails with large attachments can take up significant space, especially for multiple accounts.Medium to LargeRegularly clean inboxes, archive old emails, or increase mailbox quota limits.
    Old BackupsUnused or outdated backup files stored locally can quickly accumulate and use substantial space.Large Delete old backups or move them to external storage (cloud/remote server).
    Log Filesrror logs, access logs, and other logs grow as website traffic increases or errors occur.Small to medium Delete or  archive log set up automatic log rotation
    Temporary FilesCache files and session files that are created by web applications like WordPress and Joomla.Small to MediumClear cache files manually or set up automatic cache cleaning.
    Database DataDatabases for CMS platforms can grow significantly, especially with frequent posts, comments, or ordersMedium to LargeOptimize databases through cPanel or phpMyAdmin, and delete unused database tables
    Media Files (Images/Video)High-resolution images, videos, and other media uploaded to the server can consume a lot of spaceLarge Compress media files or use external storage/CDNs to reduce load on server storage.
    Unnecessary ApplicationsInstalled but unused web applications and plugins can add to storage usage and security risksMedium Uninstall or remove applications through 
    Unwanted Install FilesOld installation files (e.g., for software, CMS) may be left over after software installationsmallDelete old installation files from the server using File Manager.

    SupportFly cPanel Server Management Services

    Support fly’s expert and certified team members are available 24×7 to provide support, solutions, and consulting services for cPanel server support and cloud infrastructure management.

    Installation and Setup Services: We ensure that all configurations are optimized for your specific needs, providing a solid foundation for your hosting environment.

    Server Migration: Our experts manage the entire migration process to minimize downtime and ensure a smooth transition.

    Server Security Audit: Our team implements necessary measures to enhance server security and protect your data from threats.

    Server Optimization: We fine-tune server settings, optimize resource allocation, and implement caching mechanisms to enhance website loading speeds and overall server performance.

    Hacking Prevention: Our team continuously monitors server activity, detects suspicious behavior, and implements security protocols to safeguard your data.

    Disk space clean-up: Our experts identify and delete unused or temporary files, freeing up disk space and improving server performance.

    Backup Notifications: Our system sends regular notifications to ensure you’re aware of backup completion and any potential issues that may arise.

    Blacklist Monitoring: Our team proactively monitors blacklists and takes necessary actions to remove your server from blacklists, minimizing email delivery issues.

    Security checkups: Our experts identify security gaps, apply necessary patches and updates, and implement additional security measures to protect your server from emerging threats.

    Why Choose SupportFly For cPanel Server Support

    Choosing SupportFly for your cPanel server support means opting for reliability, expertise, and comprehensive care. Our dedicated team ensures your cPanel servers are running optimally, providing you peace of mind to focus on your core business activities.

    Installation and setup of servers

    Our experts handle the complete installation and setup of your cPanel servers, ensuring everything is configured correctly from the start. This includes server configurations, software installations, and initial performance optimizations to get your server up and running smoothly.

    Excellent Response Time

    We pride ourselves on our excellent response times. Our support team is always ready to assist you, whether through chat, ticket systems, or phone calls. We understand the importance of timely support in minimizing downtime and addressing issues promptly.

    Monitoring servers 24/7

    Our team monitors your cPanel servers round-the-clock to ensure continuous performance and security. With 24/7 monitoring, we can quickly identify and resolve any issues, preventing potential problems before they affect your operations.

    Data Backup and Management

    Data is the lifeblood of your business, and we treat it with the utmost importance. We provide robust data backup and management services, ensuring that your data is securely backed up and can be restored quickly in case of any data loss incidents. 

    Conclusion 

    Maintaining enough free space on your cPanel server is crucial for optimal performance and service availability. By regularly checking disk usage, clearing unnecessary files, and optimizing databases, you can ensure your server runs smoothly without interruptions. Follow the steps outlined in this guide to keep your cPanel server’s disk space under control and avoid the common pitfalls associated with overfilled storage. 

    Regular maintenance not only helps prevent crashes and downtime but also improves the overall speed and user experience of your websites. Additionally, it reduces the chances of encountering issues during crucial updates. A well-maintained server leads to better resource allocation, ensuring long-term stability and efficiency.

    FAQs

    Q1. How often should I clear space on my cPanel server?

    It’s recommended to check your disk usage monthly. Regular maintenance helps you catch large files, outdated backups, or log files before they cause performance issues. If your website sees heavy traffic or frequent updates, consider checking more often.

    Q2. Can clearing cache files affect my website?

    Clearing cache files generally won’t harm your website but may temporarily slow it down as new cache files are generated. It’s a good practice to clear cache regularly to avoid accumulation, especially for dynamic websites.

    Q3. How do I prevent my server from running out of space again?

    Set up automated backups with external storage, enable log rotation, optimize databases frequently, and remove unused email accounts. Regular monitoring of disk usage helps in proactive space management.

    Q4. What should I do if I can’t free enough space on my cPanel server?

    If you’re consistently running out of space, it may be time to upgrade your hosting plan to a higher tier with more disk space or move large files like backups to external storage solutions like cloud services.