How to Keep Your WordPress Installation Small
Most hosts, including my own hosting service, limit the amount of storage space your website(s) can occupy. This is for a straightforward reason: much like your laptop or phone, servers have a limited amount of hard drive space.
If your hosting provider has indicated that you’re going over your storage capacity with your WordPress installation, there are ways you can remedy this without paying for additional storage.
Remove Unnecessary Files in the Media Library
The vast majority of storage on a WordPress site comes in the form of images and other files you upload to your site. Every time you upload an image, WordPress saves the original upload, and makes multiple different sized copies to use in different places on the front end of your site (i.e., in the site’s Theme.)
If I built your theme for you, you have only the sizes you specifically need, no more and no less. If you’re using a theme you bought from a 3rd party site, got for free on WordPress.org, or had someone else build for you custom, it’s likely that the theme is creating many more sizes than you need.
If you upload an image and your theme makes 10 copies of it, that’s going to start eating up your storage quickly.
The first step is to go into the Media Library and delete any files you know are not being used on your site.
You can switch to a list view using this blue icon near the top of the list of items:
You can use a plugin like Media Files Tools to add more information here, such as filesize.
If a file was uploaded to a specific Page, Post, etc., you’ll see that page in this column:
If it was uploaded via the Media Library > Add New functionality in the lefthand navigation menu of WordPress, that area will say “Unattached.”
You can use these tools to help remove images and files you no longer need, though note that if you delete an image that has been used somewhere on your site, such as for a featured image or in a post or page’s content, that image will now show as broken on the front end of your site.
Reduce the Size of Existing Images on Your Site
There are plugins that can go in and reduce the file sizes of images that are already on your site. Smush is a great one that is not dependent on your hosting company. The plugin can reduce your file size and storage space consumption considerably with no image quality degredation.
If you host with SiteGround or use my hosting service, you can use the SG Optimizer plugin to do the same. This plugin will not work with other hosting providers.
Once installed, you’ll have a navigation item just for the plugin. This plugin can do many things to increase your site’s speed, but here we’ll focus on images:
Make sure New Images Optimization is toggled on. In my screenshot above, all of my images have been optimized. If you’re doing this for the first time, and I haven’t done it for you in the past, you’ll see an option to optimize your existing images in the second section there.
You’ll also see the Generate WebP Copies of New Images which can help your site’s speed and SEO, but will also increase the number of files, and therefore file size, of your site.
Upload Optimized Images in the First Place
The best thing you can do moving forward then is to only upload images of the size you need. If you know you’re adding an image that will only be displayed at 1200px, upload it at 1200px. A typical iPhone will take a photo that is 2048 x 1536 pixels. If you’re uploading that raw, it’s a huge file. If you capture a screenshot with your computer, that file is also massive.
For example, when I initially captured the screenshot in the SG Optimizer section above, it was 243.7KB. By opening the image in Photoshop and saving it at the right dimensions for what I am using it for, and optimizing it as an 8-bit PNG file instead of the defaults Mac uses for screenshots, the file was reduced to 16KB. I also use a Mac app by the name of CodeKit which can optimize images. That reduced the filesize to only 15.1KB. All in all I saved over 228KB on one image.
I realize this is a lot of work, and the Smush and SG Optimizer plugins noted above will do what CodeKit does on my end, but at the very least being able to upload images at a decent size, instead of just using whatever you have originally, will make a massive difference.
Hire Me to Reduce File Space
I can take a detailed look at your site and let you know what optimizations can be made, both to image size and your website’s performance in general. I do charge for this time, though, and as of 2/26/2021 my rate is $100 / hour.
Pay More for Hosting
If you don’t want to do any of this, you can likely just pay your hosting company for a larger plan or more storage space. If you host with me, the details on that can be found here.