Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
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.
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
Once you’ve logged into your server, navigate to the home directory:
cd /home
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.
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.
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.
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.
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.
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.