Fixing Page Speed on a Shopify Store
Shopify runs the servers and the content delivery network, so store owners often assume speed is out of their hands.
In practice, most slow Shopify stores are slow because of things the owner controls: a theme that has grown heavy through years of edits, code left behind by apps that were removed long ago, and a handful of live apps that each add more script than anyone agreed to. This guide is about load speed, meaning how fast pages arrive and appear. It shows you how to measure it, find slow Liquid, weigh your theme and put every app on a budget.
Why is Shopify so slow on many stores? Usually it is theme weight and leftover app code, not Shopify itself.
What you can and cannot change
Before spending time on a Shopify speed problem, it helps to be clear about which layer is responsible. Shopify's platform handles a lot, and some things are simply not editable on a standard plan.
| Layer | Who controls it | What you can do |
|---|---|---|
| Servers, caching and CDN | Shopify | Nothing directly. There is no caching plugin to install and no hosting plan to upgrade. |
Scripts injected by content_for_header | Shopify and installed apps | You cannot edit the output, but you choose which apps are installed and which app embeds are switched on. |
| Liquid templates and sections | You or your theme developer | Everything: loops, sections, snippets and the files each one loads. |
| Theme CSS, JavaScript and fonts | You or your theme developer | Everything, although edits to a paid theme may need re-applying after updates. |
| Checkout | Mostly Shopify | Limited, through checkout settings and supported extensions. |
| Content | You | Image sizes, video, the number of sections and products per page. |
So the useful question is not "how do I make Shopify faster", but "what have we added on top of Shopify that is slowing it down". The answer is almost always somewhere in the theme and app rows.
Measuring load speed on a Shopify store
Run the Page Speed Analyzer on four templates: the home page, a collection page, a product page and the cart or a content page. It measures each with real-user and lab data and names the requests, files and scripts holding the page back. For each template, write down:
- Server response time. How long the first byte of HTML takes. On Shopify this mainly reflects how much work your Liquid does when a page is not already cached.
- Total page weight and request count. These show how much the theme and apps ask the browser to download.
- The list of heaviest files and third-party requests. These become the raw material for the theme and app audits.
Testing without skewing the results
- Test in a private window. When you are logged in to the admin, Shopify can add a preview bar and extra scripts that visitors never see.
- Use a throttled mobile profile. Most shoppers browse on phones, and heavy stores feel very different on a mid-range device.
- Test the same URLs each time. A collection with a handful of products is not a fair comparison with one showing a full page of them.
- Take each test more than once. Lab results vary, so compare typical values rather than the single best run.
Shopify's admin also includes a web performance report under Analytics, based on real visits. It is useful for tracking the trend over time, but it does not tell you which file is responsible, so use it alongside the analyzer rather than instead of it.
Slow Liquid: when the delay is on the server
If the analyzer shows a slow server response on some templates but not others, the cause is usually the Liquid on those templates. Shopify caches rendered pages, but pages still need to be built when the cache is empty or has been cleared, for example after a product edit, and heavy Liquid makes those builds slow.
Profiling with Theme Inspector
Shopify publishes a Chrome extension called Shopify Theme Inspector. When you are logged in with access to the store, it records how long each part of the Liquid took to render and shows it as a flame graph. Wide bars are the slow parts, and each bar names the file and line, such as a snippet or section.
Patterns that make Liquid slow
- Loops inside loops. A mega menu that loops through every collection and then every product in each one can do a very large amount of work on every page.
- Looking up products one by one. Fetching products by handle inside a loop, or leaning
on
all_products, is slow and has built-in limits. - Large collection pages. A high
paginatecount means more product cards, more images and more Liquid per page. - Filtering in Liquid. Looping over a whole collection to find a few matching products, when a smaller collection or Shopify's own filtering would do.
- Legacy
includetags. Older themes useinclude, which Shopify has deprecated in favour ofrender. Changing them is good housekeeping, though the speed gain varies.
A typical improvement is to limit how much a menu or section loops over:
{%- comment -%} Before: every product in every menu collection {%- endcomment -%}
{%- for link in linklists.main-menu.links -%}
{%- for product in link.object.products -%}
{%- render 'menu-product-card', product: product -%}
{%- endfor -%}
{%- endfor -%}
{%- comment -%} After: four featured products per collection {%- endcomment -%}
{%- for link in linklists.main-menu.links -%}
{%- for product in link.object.products limit: 4 -%}
{%- render 'menu-product-card', product: product -%}
{%- endfor -%}
{%- endfor -%}
Auditing theme weight
Themes gain weight gradually. A developer adds a slider library, a marketing agency adds a countdown timer, a seasonal banner brings its own stylesheet, and nobody takes anything out. The simplest way to see how much has been added is to compare your live theme with a clean copy of the same theme.
- From the theme library, add a fresh copy of the same theme at the same version, and leave it unpublished.
- Preview both themes on the same product URL in a private window, with the cache disabled.
- In the Network panel, compare total transfer size, request count and the CSS and JavaScript files each one loads.
The difference is what your store has added. Some of it will be deliberate and worth keeping. Much of it usually is not.
Where the extra weight usually comes from
| Source | How to spot it | Typical fix |
|---|---|---|
Extra libraries added to theme.liquid | Script tags for sliders, animation or jQuery that the stock theme does not load | Remove, or load only on the template that uses them |
| Section CSS or JavaScript loaded on every page | Files for one section appear on templates that do not use it | Load them from inside the section file instead |
| Custom fonts | Several font files and weights, sometimes from an outside font service | Use fewer weights, and use Shopify's font library where possible |
| Background video | A large video file on the home page | Replace with an image, or use a poster and load video only on larger screens |
| Snippets pasted from tutorials | Inline scripts in theme.liquid with no clear
owner | Find what each does and remove what is no longer used |
A script budget for every app
Apps are the most common reason one Shopify store is much slower than another built on the same theme. Each one can add scripts, stylesheets, fonts and images, and some load further files from their own servers. The fix is not necessarily fewer apps. It is knowing what each one costs and deciding whether that cost is worth it.
Measuring one app at a time
Chrome DevTools can block requests to a domain or a single URL. Open the Network panel, right-click one of an app's requests and choose to block its domain, then reload and test again. The difference in bytes, requests and load time is roughly what that app costs. Unblock it and repeat for the next app. This works without uninstalling anything and without affecting real visitors.
Setting the budget
Write a short table for each app with its purpose, the pages it needs to run on, the files it loads and an agreed limit. An illustrative table for a fictional store, Harbour Lane Candles, might look like this:
| App (fictional) | Needed on | Budget | Decision |
|---|---|---|---|
| Reviews widget | Product pages | One script, loaded after the page appears | Keep; turn off its home page carousel |
| Currency switcher | Every page | Small script, no extra fonts | Replace with Shopify Markets, which is built in |
| Countdown timer | Sale pages only | Nothing on other pages | Restrict to the sale template |
| Pop-up builder | Home page | Loads only after interaction or a delay | Keep, but switch to delayed loading |
Many apps built on theme app extensions can be switched on or off per template or per block in the theme editor. Older apps may load everywhere; if so, ask the developer whether they can load only where needed, and treat the answer as part of your decision to keep the app.
The fix, step by step
Step 1
Record a load-speed baseline on four templates
Choose one home page, one collection page, one product page and one cart or content page, and test each in a private window on a throttled mobile profile. Save the server response time, total page weight, request count and the list of heaviest files and third-party requests. Test each page more than once and note typical values. Use exactly the same URLs later, because product counts and images differ between pages and would otherwise make the comparison meaningless.
Step 2
Profile Liquid render time on the slow templates
If any template has a noticeably slower server response than the others, install
Shopify Theme Inspector for Chrome, log in and profile that page. Look for the widest bars in the flame
graph and note the file and line they point to. Mega menus, featured collection sections and product
recommendation snippets are frequent culprits. Reduce loop sizes with limit, remove nested
loops where a smaller collection would do, and replace legacy include tags with render.
Step 3
Weigh your theme against a clean copy
Add an unpublished fresh copy of your theme at the same version and preview it next to the live theme on the same product URL. Compare transfer size, request count and the list of CSS and JavaScript files. Every file that appears only in your live theme needs an owner and a reason. Libraries nobody can explain, section assets loaded on every template and extra font weights are the usual findings, and each one is a candidate for removal.
Step 4
Strip code left behind by removed apps
Uninstalling an app does not always remove code that was pasted into the theme. Duplicate
the live theme, then search theme.liquid, the snippets folder and the assets folder for
the names of apps you no longer use. Look for render tags, script tags pointing at app domains
and snippet files named after old apps. Remove them one at a time on the duplicate, previewing the storefront
after each deletion to make sure nothing else depended on them.
Step 5
Give each remaining app a script budget
List every live app, what it does and which pages actually need it. Use request blocking in DevTools to measure what each one adds to bytes, requests and load time. Agree a budget for each, such as loading only on product pages or only after the page has appeared. Switch app embeds and blocks off on templates where they are not needed, ask developers about lighter loading options, and remove apps whose cost clearly outweighs what they deliver.
Step 6
Slim the home page section stack
Home pages often collect a long list of sections, each with its own images, scripts and styles: sliders, featured collections, video, logo lists, testimonials and Instagram feeds. Open the home page in the theme editor and ask what each section achieves for shoppers. Remove duplicates, reduce the products shown in featured collections, replace background video with a still image, and keep only one slider. Every section removed takes its images, Liquid and scripts with it.
Step 7
Keep theme files and fonts on Shopify
Check
the Network panel for theme files loaded from outside hosts, such as libraries from public CDNs or fonts
from an external font service. Each new host adds a connection before its files can arrive. Upload needed
libraries to the theme's assets and load them with asset_url, and choose fonts from Shopify's
font library, which serves them from Shopify's own CDN. Where an outside host must stay, load its files
late rather than in the head.
Step 8
Publish, retest and log the change
Before publishing the duplicate theme, test the full buying journey: browsing, filtering, choosing variants, adding to the basket and reaching checkout, on both a phone and a desktop. Publish, then rerun the analyzer on the same four URLs and compare against your baseline. Record what you removed, which apps have budgets and the new figures in a simple change log, so the next person to edit the theme knows what to protect.
Edge cases
- Paid theme updates. If you edit a paid theme's code, updating to a new version can bring back what you removed or overwrite your changes. Keep a list of edits, and consider putting custom code into separate snippets so it is easy to carry across.
- Apps that write to Liquid. Some older apps edit theme files directly during installation. Their code will not show up as an app embed, which is why searching the code in step 4 matters.
- Markets and translations. Stores with several markets or languages can have slower Liquid on some variants of a page, so test at least one URL in each main market.
- Headless storefronts. If your store uses Hydrogen or another custom front end, the theme advice here does not apply. Speed depends on the framework and hosting, and a framework guide such as the Next.js speed guide is closer to your situation.
- Checkout speed. Checkout runs on Shopify's own pages and is not affected by theme code in the same way. If shoppers complain about checkout, check payment and checkout apps and extensions rather than the theme.
Keeping the store fast
Shopify stores tend to slow down again through small, well-meant additions. A few habits keep the gains:
- Trial apps on a duplicate theme first. Measure what an app adds before it reaches customers, and compare it with the budget it would need.
- Remove what you uninstall. Whenever an app is removed, search the theme for its name the same day.
- Keep the change log. Note every script or section added to the theme, who asked for it and why.
- Retest after sales campaigns. Timers, banners and pop-ups are often added for a promotion and forgotten afterwards.
For the underlying causes that apply on any platform, the third-party scripts guide covers tag audits in more depth, and the render-blocking guide covers files that delay the first paint.
1. Why is my Shopify store slow if Shopify handles the hosting?
Shopify provides fast servers and a content delivery network, but the pages it serves are built from your theme and your apps. If the theme loops through large collections, loads libraries on every page, or carries code from apps you removed years ago, every visitor pays for it. Most of the difference between fast and slow Shopify stores comes from these additions. Measuring your theme against a clean copy is the quickest way to see how much has built up.
2. Does uninstalling an app remove its code from my theme?
Not always. Apps that use theme app extensions are removed cleanly, because their code lives outside your theme files. Older apps sometimes added snippets, script tags or asset files directly to the theme during installation, and those stay after you uninstall. Search your theme code for the app's name and any domain it loaded files from, remove what you find on a duplicate theme, and preview the storefront before publishing to make sure nothing still depends on it.
3. How many apps is too many for a Shopify store?
There is no fixed number. A store with fifteen lightweight apps that only load where needed can be faster than one with five apps that each load large scripts on every page. What matters is what each app adds to bytes, requests and loading time, and whether it earns that cost. Measure apps one at a time by blocking their requests in DevTools, then decide which to keep, which to restrict to certain pages and which to remove.
4. Can I install a caching or speed plugin on Shopify like on WordPress?
Shopify already caches storefront pages and serves files from its CDN, so there is no caching layer for you to add. Speed apps on the app store usually work by delaying scripts, lazy-loading images or compressing files, and some add their own script in the process. Some can help, but check what they actually change and measure before and after. Removing unnecessary theme code and app scripts at the source generally gives more reliable results.
5. Will a premium theme make my store faster?
It depends on the theme and on how you use it. Some themes are built with speed in mind and load little by default, while others include many features that all load whether you use them or not. Shopify's own free themes are a reasonable reference point. Whatever theme you choose, speed will fall again if you add heavy apps and sections on top, so a theme change without the app and section audit rarely solves the problem on its own.
6. What causes a slow server response time on Shopify?
Shopify's infrastructure is generally quick, so slow server response usually means the page takes a long time to build when it is not already cached. Heavy Liquid is the usual reason: large nested loops in menus, product recommendations that loop through whole collections, or high product counts per collection page. Shopify Theme Inspector for Chrome shows how long each part of the template takes to render, which lets you find and simplify the slow sections rather than guessing.
7. Is this the same as fixing Core Web Vitals on Shopify?
They overlap but are not identical. Load speed is about how quickly pages arrive and appear and how much they weigh. Core Web Vitals are three specific measurements from real visitors: loading of the main content, responsiveness to taps and clicks, and layout stability. Reducing theme weight and app scripts helps all of them, but passing Core Web Vitals may also need work on the main product image, layout shifts from widgets and slow variant pickers, which have their own guide.
The Page Speed Analyzer measures your store pages with real-user and lab data and names the specific server responses, files and scripts causing each slow metric, so you can see which theme code and apps to deal with first.
Open Page Speed Fixes โ