How to reduce your disk space usage in OpenCart

Posted by Joe on July 31, 2025

Running out of disk space on your OpenCart website can lead to serious problems - from failed checkouts and broken backups to complete site crashes. The good news? Many of the files eating up space are unnecessary. In this article, we'll show you practical, effective ways to free up space and keep your store fast, reliable, and fully functional. Let's dive in - and if you need expert help, we're here for you.

Images

Product photos, website logos, home page banners - if not properly optimised for delivery over the web, they can be using more disk space than they need to.

Reduce the resolution of your images. Resolution is distinct from file size but the two are linked to each other. Resolution is essentially how many pixels wide and tall the image is - the equivalent of physical dimensions. Product images in particular rarely need to be larger than 1000 pixels wide or high. If lots of images on your website are bigger than this, consider replacing them with scaled-down versions.

Prefer JPEG or WEBP format over PNG. The file format you use for images makes a big difference. PNG files are high quality but their file size is often much larger than necessary. JPEG is a better choice for most photos, as it compresses images by removing details the eye can't see. This reduces file size dramatically without a noticeable drop in quality. WebP offers even further improvements, though it's not supported on all older browsers. OpenCart versions 3.0.3.9 and above have built-in support for WebP in the admin panel - we can help you upgrade if you're running an older version. If your product photos are .png files, you should replace them with .jpg or .webp files.

Check for images that aren't used on the website. If you have images in the file manager that aren't added to products or other pages, they are wasting valuable disk space without ever being seen in the storefront! Images that are not used on any pages, modules or descriptions should be deleted from the file manager. There are extensions available on the OpenCart Marketplace to help with finding unused images but we always recommend store owners exercise discretion and diligence when deleting files.

Cache Files

Caching is great for speeding up a website, but it can also cause stale cache files to accumulate on the disk. It is worth clearing the website caches once in a while to clean up any lingering cache entries that are no longer needed. Refer to our comprehensive guide on how to clear all of the most commonly encountered caches in OpenCart.

Some caching extensions offer the ability to clear their caches automatically. This should ideally be set up to run when the site is least busy, such as evenings or weekends, to keep the size of the cache within limits while giving it time to warm up for the busiest times of the day.

Log Files

Error logs and debug logs are often one of the biggest culprits of excessive disk usage. Log files should be written to only when necessary and kept within size limits.

One quick way to keep the size of your OpenCart logs in check is by installing an extension that automatically 'trims' them when they grow too large. Our free Log Trimmer extension does just that. This is an effective short-term solution, but if you find the log files being trimmed often, you should investigate the root cause as it could be a sign of bigger underlying issues on the website. (link to blog article about error logs / techaudit here?)

Check the settings of your installed extensions and disable any settings that write to the logs. These settings should only be enabled when investigating an issue - otherwise they'll quickly fill up your disk with useless debug information. Depending on the extension, the setting might be named 'Debug mode', 'Test mode', 'Log level', or similar. If in doubt, check the extension documentation or contact the extension developer.

Check other server logs. In addition to OpenCart's own logs, your server may be generating other log files that quietly build up over time. Without proper handling by the server, these can quickly consume valuable disk space, especially on high-traffic sites. Typically, keeping logs for the past 3 months is more than enough. Depending on your setup, configuring this might require help from your hosting provider. That's why it pays to host your website on servers specifically optimized for OpenCart - like our OpenCart Web Hosting.

Other ways to reduce disk space

Check the website file manager for any old backups, temporary files or archive files that can be moved offsite or deleted.

If your website has a lot of video files, consider loading them from a third-party video hosting platform such as Vimeo or DailyMotion.

Check the website database for any excessively large tables. SEO and analytics extensions in particular often store vast amounts of data on every single activity performed by every visitor to the site including bots, causing the database to grow to gargantuan proportions. If the database contains unnecessary data, clearing this can free up huge amounts of disk space.

We're here to help

If your OpenCart site is running into issues - or you're not sure what's eating up your disk space - we're here to help. We've worked with countless OpenCart stores to identify and fix space-related problems, optimise performance, and prevent future issues. Our OpenCart Health Check takes a deep dive into your site to uncover what's slowing it down or putting it at risk. Get in touch today and let us help you get your store running smoothly and efficiently.

blog comments powered by Disqus