When managing a website, maybe you will not notice the size of the entire website’s source code. But really it is very important to help your website operate stably in the future. For example, if the total website capacity is low, then moving the website to other servers is easier, or backing up data is also fast without any problems. On the contrary, the size is too high for the actual size of the website, which will cause a lot of difficulties, especially the backup will be much harder, or when the page load will also take longer. In this article MangoWP team will show you how to optimize the source code capacity of your website without affecting its performance.

What is Disk Space

It’s storage space that’s owned and maintained by your hosting provider, and they impose limits on how much of it you can use.

All the elements of your website take up space, including:

Your WordPress installation files,
CSS elements and HTML code files,
Media content, like pictures and videos.

When you created a new page, upload a new image or install a new plugin, it gets stored on the disk space. The more files you uploaded to your disk space or server, the more full it becomes. In this guide, we’ll show you how to optimize your website disk space so you never run out.

Analyzing Your Current Disk Space Usage

It’s good to check periodically how much disk space your site is using. It’s very simple when you use cPanel.

Step 1: Log in to your cPanel dashboard.

Step 2: In the main window, look for a small table under the Statistics section. You’ll see the Disk Usage statistic. This will show you how much disk space your site is currently occupying.

Disk Usage statistic
Disk Usage statistic

Step 3: Check how much space each file is taking up. Click on Disk Usage under the Files section of cPanel. You’ll see all the source code files of your website listed, with data about the amount of disk space being used by each file.

data about the amount of disk space
The data about the amount of disk space

By following these steps, you’ll track exactly how much disk space you’re using, and which files require the most space.

Tips to Optimize The Source Code Capacity

1. Remove WordPress Backups

Do not store your backups on your host server. It is very wasteful disk space and unnecessary. You should keep these backup files in really safe places like cloud storage services like Dropbox, Google Drive or Amazon S3 because your computer is not necessarily safe and stable. To simplify this task, you may want to use a plugin, like BackWPUp or BackupBuddy . They will help you to automate the process of moving backup files to a separate location.

2. Optimize Images Or Store It Elsewhere

As a rule of thumb, the larger the size of an image the longer it will take to load, it also can use up a great deal of your disk space. You can use one of the many image optimization plugins and tools to automatically compress images by up to 80% without any visible loss in image quality.
Here’s an example of an optimized vs unoptimized image:

The image optimization plugins and tools
The image optimization plugins and tools

As you can see, when optimized properly the same image can be 75% smaller than the original without any loss in quality.

What about videos?
You should use a video hosting service. With services like YouTube, Vimeo, and Wistia, all you have to do is upload your videos and then embed them on your website. They’ll run exactly like they would if they were stored on your site.

As for the compressed files for others to download, you can upload them to storage services such as Mega.co.nz, Fshare or paint to find a cheap server service but have a high hard drive to upload and for users to download there.

3. Clean Up Your WordPress Media Library

When you upload an image to your Media Library, WordPress makes several copies of it. Additionally, different themes and plugins may also request a variety of image sizes. Consequently, your Media Library can amass a lot of files that you may not be aware of. Ultimately, this can bog down your entire website, as all those images take up space on your web server.

You should clean the Media library up regularly to remove the self-generated image files of WordPress that we sometimes do not need to use. Also, you need to clean up junk files, which accumulate on your website over time. For example:

  • Old spam comments;
  • Emails that are no longer important;
  • Unneeded themes;
  • Pending comments, drafts, and posts that have no purpose;
  • Media files, like images and videos, that got uploaded but never used.

To get rid of junk files without having to hunt for them, install a database cleaner plugin Media Cleaner that will scan for unused files and remove them from your website.

4. Delete Unnecessary Plugins

One thing that may be using a lot of space on your website is plugins. Plugins generate a lot of data while performing functions. The programs themselves require disk space, plus, they store log files, folders, and more.

Delete all plugins that you’re not using. Get rid of duplicate plugins that perform the same task, like two security plugins with the same features, for example.

Even after you uninstall a plugin, chances are, there will be leftover files taking up disk space.

There’s an easy way to remove any files that deleted plugins left behind. After deleting the plugins, install the Plugins Garbage Collector, which will scan your disk space for the residue files and folders, and remove them.

5. Check the ‘wp-content’ directory

There are many plugins that save unnecessary data in the wp-content directory like plugin log files or temporary files. In the wp-content directory, except the cache and images folder, we should not save anything here. You should clean up the wp-content directory regularly


These are the easy ways to remove all the clutter from your hosting disk space. You can see that Optimize the source code capacity is actually not too complicated as we think but its benefits are huge. So that you don’t have to buy more disk space and the light data will help us move the site to a new host faster and simpler.

1 Comment

  1. Booker
    Nov 12, 2020

    If some one desires to be updated with most up-to-date technologies then he must be visit this web site and be up to date
    every day.

Leave A Comment