Back to the blog

Five checks before you spend money on a faster OpenCart store

· 4 min read

Most slow stores don’t need a bigger server. They need someone to find the one or two things that eat the time. These five checks take an afternoon and tell you where to look first.

1. Measure before you change anything

Run the main pages of your store through Google’s PageSpeed Insights, mobile first, and write down the scores. Then look at how fast the server answers on a category page and on a product page. As a rule of thumb, web.dev treats about 0.8 seconds or less to the first byte as good.

If the server is slow to answer, the problem sits on the server or in the database, and tweaking images alone will not fix it.

2. Find out which database queries are slow

Every page of a store with a big catalog is built from database queries, and a few heavy ones usually cause most of the delay. You do not need to read them yourself: ask your developer or hosting provider to switch on the slow query log for a day and send you the ten slowest queries. Typical culprits are search, filters and category pages that pull data in several languages.

For your developer

In MySQL, switch the slow query log on for a while:

SET GLOBAL slow_query_log = 'ON';
SET GLOBAL long_query_time = 1;
SHOW VARIABLES LIKE 'slow_query_log_file';

Then summarize the log file that the last command points to:

mysqldumpslow -s t -t 10 /path/to/slow.log

When you are done, switch the log off again with SET GLOBAL slow_query_log = 'OFF';. Usual suspects: searches with LIKE '%word%', filters without a matching index, and category pages that join many tables across languages.

3. Check what is cached

Is anything cached at all? Repeated database results can be kept in a fast memory cache (for example Redis) instead of being rebuilt for every visitor. Static files such as images, styles and scripts should be kept by the browser for a long time and served through a CDN such as Cloudflare.

Cache static files first. Caching whole pages on a store with carts and logged-in customers needs care, so do it last and test it well.

4. Look at images and page weight

Large product images are the most common reason for a poor mobile score. Check that images are resized to the size they are shown at, use modern formats such as WebP where your theme supports them, load lazily below the fold, and have their width and height set so the layout does not jump.

5. Check the bot traffic

On a store with a big catalog, a large share of visits can come from crawlers and scrapers instead of customers. Look at your server logs or Cloudflare analytics: which kinds of visitors and which pages take the most requests?

When you are unsure, use challenges rather than hard blocks, and always keep Googlebot and Bing allowed so your SEO does not suffer.

What to do next

Fix the biggest finding first and measure again. If you would like a second pair of eyes, send me your store’s address and I will tell you where I would look first. If the checks show a slow store, see OpenCart speed optimization.