Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors

Physical Address

304 North Cardinal St.
Dorchester Center, MA 02124

Solving Disk Usage 100% in CyberPanel: A Step-by-Step Guide to Reclaim Storage Space by Deleting Large Files

Running a website with CyberPanel is convenient until you realize your server is running out of storage space. Large files can quickly eat up your storage, affecting the performance and functionality of your website. In this guide, we’ll walk you through the process of identifying and deleting large files to free up valuable storage space.

Step 1: SSH into Your Server

The first step in reclaiming storage space on your CyberPanel server is to SSH into your server. Open your terminal and use the following command:

ssh root@your_ip_address

Step 2: Navigate to the Home Directory

Once you’ve logged into your server, navigate to the home directory:

cd /home

Step 3: Identify and Delete Large Files

List the directories in the current directory and their sizes, sorted in descending order:

du -h –max-depth=1 | sort -rh

This command will provide a list of directories and their sizes, helping you identify which directories are consuming the most storage.

Dive Deeper:

In our case, we found one of our websites was consuming more than 15GB of storage. So, we went inside that website’s directory and repeated the previous command:

cd /home/yourwebsite.com
du -h –max-depth=1 | sort -rh

This narrows down the culprits within that website’s directory.

Continue Navigating:

In our case, we discovered that the ‘public_html’ directory was consuming more space. We entered this directory and ran the command again:

cd public_html
du -h –max-depth=1 | sort -rh

This further narrows down the space-consuming elements.

Identify the Final Culprit:

In our exploration, we found that the ‘wp-content’ directory was consuming more space. We navigated into this directory and repeated the command:

cd wp-content
du -h –max-depth=1 | sort -rh

This step-by-step approach helps pinpoint the exact location of the storage-hogging files.

The Grand Finale:

Eventually, we uncovered a large log file that was consuming a whopping 7GB of storage. To remove it, we used the following command:

rm /home/yourwebsite.com/public_html/wp-content/uploads/wr2x_yKVwGxc0.log

Replace ‘yourwebsite.com’ and the filename with the relevant details for your server.

Conclusion:

Managing storage space is crucial for the performance and reliability of your CyberPanel server. By following these steps, you can efficiently identify and remove large files that are hogging your storage, ensuring your server continues to run smoothly.

Leave a Reply

Your email address will not be published. Required fields are marked *