You all know that when it comes to web hosting, you can not get unlimited space. So, when you purchase WordPress hosting you will also likely purchase VPS hosting, Shared Hosting, etc. as well. The most important part of the hosting package is disk space.
There is not only one element, but the entire compartment of elements that take place in your disk space quota.
These items may include:
- Installation files of the WordPress
- Coding Files
- Images and Videos
Some hosting providers will provide you with a host that includes an unlimited website within the hosting package. At the same time, you need to be very careful with the disk space as well, because each site has files, images, videos, plugins, etc. which accounts for that additional space.
When first starting, it won’t matter how much disk space you have available. However, as time goes on, you will be adding to the website and its content, and you will see that there is less to no disk space available. So, when this happens, many people often purchase additional disk space. When you go to buy this additional resource, you will need to pay for it. However, what if you could optimize the hosting space you already have?
Your website can use all the files which are in your control panel, but you should keep only those files that are mandatory. Also, if you reduce the code of the data, then you should upload a minimized version of the data to the server and keep the original file in the local system.
In the following information, we’ll explain how to manage and how to optimize your disk space. But first, let’s discuss how the average WordPress website uses disk space.
The below shows a few calculations from the WordPress site. This data gives an average of disk space usage taken from a pool of production WordPress sites.
- WordPress core ( 8.9 MB )
- Plugin Directory ( wp-content/plugins ) ( approx 100 MB )
- Theme Directory ( wp-content/themes ) ( approx 30 MB )
- Upload Directory ( wp-content/uploads ) ( approx 820 MB)
- SQL Database ( approx 70 MB )
By the above data, we can say that WordPress uses around a 1GB disk. So, on average, a single WordPress website can take 1GB of space.
Now, if you are interested in knowing how much your existing website is regarding the disk space, then there are several ways to figure out this information.
- Analyze your current disk space usage
- How do you Optimize your WordPress Disk Space?
- (1) Optimize Images
- (2) Remove Backup
- (3) Remove Unnecessary Plugins
- (4) Delete Junk Files
- (5) Do Not Use a Flash Element
- (6) Backup & Reinstall
- (7) Remove Page Revisions
- (8) Delete Trashed Pages
- (9) Abandoned Databases
- (10) Malware
- (11) Caching Plugin
- (12) Various Logs
- (13) CPmove Files
- (14) Core Dumps
- (15) Do Not Allow User Uploads
- (16) Use Cloud Services for Scripts
- (17) Minimize CSS and Use External
- Conclusion: Learn how to Optimize your WordPress Hosting Disk Space
Analyze your current disk space usage
Perhaps the most straightforward approach is to introduce the plugin My Simple Space. This plugin will add a simple widget to your WordPress dashboard, and it will display details about your website. These details may include the entire size of your website, the size of the database, and an overall breakdown.
If you are using cPanel, then it will show your disk space usage on the dashboard. Focus on the Statistic option.
When you click on the disk usage, it also shows you detailed information about the disk space.
If you are using the Plesk Panel, then you can find the option “Statistic” from there. You can see your website usage along with all of your other important hosting information.
Above, these are a few options where you can see the space of your hosting package and website as well. So, it is now possible to have only one well-working website, and in the future, that you think about expanding your original website or creating a new website. Again, disk space comes to mind when starting all over to create a new website. If you want to add a new website, then you will need more disk space for that. How will you go about doing this? You might question yourself into purchasing another host or adding the new website into the existing plan. However, what will you do regarding disk space? There are multiple ways you may streamline yours and have all the disk space you need and more.
How do you Optimize your WordPress Disk Space?
Here are some tips you may use to optimize your disk space.
(1) Optimize Images
Review your website and remove unnecessary images on your website. You may use the plugin Media Cleaner. This will help you find pictures and delete them, while also placing them under media. You can compress the images with an image optimization tool such as Imagify. This tool shrinks your images, removes useless information, and helps load your website more quickly. If you would like to compress pictures, then it is helpful to use the plugin Compress JPEG & PNG images.
If you need to optimize video, this will work differently from photos since there are no easy-to-use plugins available to install and optimize the video. One source you may use is the plugin Lazy Load for Video. This plugin will improve page load time and Google page speed score.
(2) Remove Backup
You may not know that you are making regular backups, and it might not be of any use to you. However, you can remove the excess reserve from your file manager or you can delete it via FTP. Make sure that you use Dropbox or Google Cloud to store your backup. This way it will not consume space on your hosting package.
Your website may have a plugin that makes a regular backup of your website. There are also chances that the plugin is saving the backup in your hosting package. That valuable disk space should not be used for the backup files.
(3) Remove Unnecessary Plugins
You may use a variety of plugins for one site. The downside to this is that plugins will generate a lot of data while performing functions, which makes for unnecessary clutter. Remove unnecessary plugins and get rid of any duplicate plugins. Once you remove these, install the plugin Garbage Collector. It will scan your disk space for reduced files and folders.
(4) Delete Junk Files
As time goes on, your website accumulates a lot of junk files. You should remove any of these unwanted files to save space. Old spam comments, emails that are not useful, unneeded themes, media files (images, videos, gifs), etc. should consistently be updated and deleted.
If you do not want to take these steps or feel it would take too long, then install the Database Cleaner plugin. This plugin is helpful in that it will scan your unused files and will remove them from your website.
(5) Do Not Use a Flash Element
Flash elements are not used often now, but if you somehow have this option on your site, you should remove it simply because it takes up a lot of space. The best option, if you want to include images, video, or animation on your site, is HTML5.
HTML5 is much faster than Flash, it can run on any device, and it uses less space than flash files.
(6) Backup & Reinstall
One of the best strategies you can use to free up disk space is by completely wiping your hosting database and freshly installing it with the current back up. This way, you will not lose any data.
If you do not have your backup, then you can create backup and store it on Dropbox or Google Cloud service. You can use the plugin for backup and reinstall WPBackitup. This plugin will make your tasks much easier. Once your website is backed up, the next step is to go to your public_html folder and delete all other files. In the second step, log in to cPanel, go to MYSQL Database, then remove all the database files and database users from it.
When you have finished with the above directions, you will next need to install a fresh WordPress from Softaculous. In this third step, you will need to install the plugin WPBackitup and choose the themes, plugins, database, etc. you want to restore. This is the best way to completely clear your disk space.
(7) Remove Page Revisions
Page revisions are a significant cause of wasted disk space. This happens when each revision is stored as a separate page in the database. Anytime you save a change to a post or page, a new copy is created and stored in the database.
You can disable any of this revision content. To do this, simply disable it by adding a line into the wp-config php file. Once you add a border, a review will no longer save.
define( WP_POST_REVISION’, false );
However, you may also decide that revisions are essential. For example, if you own a multi-author blog. In that case, post revisions to a maximum of 3 reviews to keep your database as less cluttered as possible.
Below is the code.
define( WP_POST_REVISION’, 3 );
Please flush out your revisions from time to time to clear up space.
(8) Delete Trashed Pages
Have you recently deleted some pages or posts? If yes, then make sure to remove it permanently. Just because you deleted a file, does not mean it is no longer in the system. When files are first deleted, these are sent to the deleted or trashed files. Make sure the deleted or trashed files are deleted as well.
(9) Abandoned Databases
Your website may have an entire database that is unused. For example, these databases can be abandoned by modules or past establishments of WordPress. Be cautious before erasing anything. Make a reinforcement first!
It is a smart thought to filter your site now and then. There are numerous devices accessible to peruse for your site.
(11) Caching Plugin
This plugin can speed up your website, but it needs some space to perform and function. It will store any special requests as well.
(12) Various Logs
(A) Error Logs
Whenever an error occurs on your website, it is logged and stored on the log files. If you want to check error log files, then you open them from the file manager. Also, you can check your error log from that error logs text files.
(B) Other Logs
There are many logs generated such as system logs, exception logs, AWstats, Webalizer, Analog, and other reports on your cPanel account. You can delete certain logs if you don’t need them. At the same time, it’s beneficial if your site got an error, then you can check it from it and resolve it.
(13) CPmove Files
The file named “CPmove.XXXX” is automatically created when the site gets restored and when the site moves from one server to another. This should be deleted automatically after that process, but sometimes this does not happen. You can delete it to save a little room.
(14) Core Dumps
Core dumps are caused when a process is not working correctly. When this happens, a program terminates abnormally then dumps its memory into a file that can become massive. You can delete the dump, but if the root cause is not corrected, the data will continue to generate. Before removing the file, check which process is not working correctly so that you can resolve it.
(15) Do Not Allow User Uploads
Do not enable blog readers or forum users to upload photos and videos. Treat your hosting disk space and bandwidth with care because space is limited.
(16) Use Cloud Services for Scripts
(17) Minimize CSS and Use External
You can increase your website’s efficiency by using external CSS. When you use external CSS, this will load your page significantly faster. It will also save your hosting plan several spaces.
To make CSS light, minimize the CSS code indentations and non-essential spaces. We know that managing one line CSS is not always so simple, but you can store CSS on your local drive as a human-readable form. You can then upload a minimized version of CSS on the server.
Conclusion: Learn how to Optimize your WordPress Hosting Disk Space
When you learn all the ways to save space and optimize your WordPress hosting, this will help your overall system run efficiently. Simply follow each of the above steps and tools for the best optimization options depending on your unique needs.