WooCommerce performance: why your Indian e-commerce store is slow (and what fixes it)
12 min read · 05-Nov-2024
villagehosting.in team
5 November 2024
WooCommerce loads 40+ database queries per page by default. Add a few unconfigured plugins, stock photos in original resolution, and a shared hosting account, and you have a 7-second store that loses customers at the checkout. Here is the systematic fix.
WooCommerce cart and checkout pages must never be cached
Full-page caching tools (WP Rocket, LiteSpeed Cache) cache HTML to serve requests without running PHP. The cart, checkout, and account pages contain user-specific content — cached versions cause wrong cart totals, wrong user data, and failed payments. All caching plugins have WooCommerce exclusion rules — verify they're active before enabling caching on a WooCommerce store.
Why WooCommerce is slow by default
1. No object caching — WooCommerce makes repeated database calls for product data, pricing, stock levels, and cart contents. Without an object cache, each page request re-runs these queries.
2. Unoptimised images — Product images are often uploaded at original camera resolution (4–12 MB). WordPress resizes them but rarely compresses them efficiently.
3. Cart and session handling — WooCommerce creates a session for every visitor, even unauthenticated ones. This writes to the database on every page load.
4. Uncached checkout and cart pages — These pages are excluded from page caching by default because they're personalised. If your caching plugin is configured wrong, they may also block caching of product pages.
5. Sequential plugin loading — Most WooCommerce stores run 15–30 plugins. Each adds PHP execution, database queries, and HTTP requests.
6. Shared hosting CPU limits — On shared hosting, PHP processes are throttled. WooCommerce's complexity pushes you into these limits fast.
Fix 1: Enable Redis object caching (biggest win)
An object cache stores the results of expensive database queries in memory. When the same query runs again, the result comes from memory instead of the database.
# On VPS, install Redis
sudo apt install redis-server -y
sudo systemctl enable redis-server
# Test it's running
redis-cli ping
# Should return: PONG
Install the Redis Object Cache plugin in WordPress:
- Plugins → Add New → search "Redis Object Cache"
- Install and activate
- Go to Settings → Redis → Enable Object Cache
For shared hosting without Redis access, use Memcached if available, or the W3 Total Cache disk-based object cache as a fallback.
Impact: 30–60% reduction in database queries on product and shop pages.
Fix 2: Enable High Performance Order Storage (HPOS)
WooCommerce traditionally stored orders as WordPress custom post types in wp_posts — a table not designed for order data. HPOS stores orders in dedicated wc_orders tables, dramatically improving order query performance.
Enable in WooCommerce → Settings → Advanced → Features → High-Performance Order Storage.
Impact: Order admin pages 3–5× faster on stores with 10,000+ orders.
Fix 3: Configure page caching correctly
Product pages and the shop archive can and should be cached. Cart, checkout, and My Account pages cannot.
With LiteSpeed Cache (best for LiteSpeed servers):
- Enable Page Cache
- Add checkout, cart, and my-account to the "Do Not Cache URIs" list
/cart/
/checkout/
/my-account/
/wc-api/
With WP Rocket:
- Enable page caching
- Enable cache for logged-in users (on per-user basis for WooCommerce)
- Add
/cart/and/checkout/to excluded pages
Test caching is working: visit a product page in an incognito window, view source, and look for an HTML comment like <!-- Cache served by LiteSpeed Cache --> near the bottom.
Fix 4: Optimise product images
Large, uncompressed images are the most common cause of slow product pages in Indian WooCommerce stores.
Target sizes:
- Product thumbnail: 300×300px
- Product main image: 800×800px
- Maximum file size: 150 KB per image
Tools:
- Smush or ShortPixel plugins for bulk compression of existing images
- WebP conversion: both plugins can automatically serve WebP to browsers that support it (most browsers since 2020)
- Enable lazy loading for below-the-fold product images
CDN for images: Cloudflare's free plan caches static assets including images. For high-traffic stores, BunnyCDN's India PoPs (₹500–2,000/mo) dramatically reduce image load times.
Fix 5: Database query optimisation
Run Query Monitor plugin to see which queries are slow:
- Activate Query Monitor
- Load a slow product page
- Click "Query Monitor" in the admin bar → "Queries" tab
- Sort by time — look for queries over 50ms
Common culprits:
- WooCommerce product variation queries: each variable product runs multiple queries for its variations. Limit variations to under 100 per product.
- Custom meta queries: plugins that query
wp_postmetawith LIKE operators are notoriously slow. Review what each plugin adds.
Fix 6: Reduce plugin count
Run the P3 Plugin Performance Profiler or Query Monitor's plugin impact view. Identify plugins contributing more than 20% of load time.
Common offenders on Indian WooCommerce stores:
- Slider plugins loading CSS/JS on every page (not just where the slider appears)
- Chat widgets loading multiple third-party scripts
- Currency switchers making external API calls on each page load
- SEO plugins running redundant checks on product pages
Disable plugins one by one, reload the page, and measure. You'll often find 2–3 plugins responsible for 50%+ of load time.
Fix 7: Use a checkout optimisation plugin
Checkout abandonment is the biggest revenue leak for Indian e-commerce. Slow checkout pages accelerate it.
- Checkout Field Editor: remove unnecessary fields (middle name, fax, alternative phone)
- One-page checkout: reduces the multi-step process to a single page
- Guest checkout: ensure it's enabled (WooCommerce Settings → Accounts & Privacy)
Indian shoppers abandon at the payment step more often than international users. Test your complete checkout with a real INR payment at least weekly.
Hosting requirements for WooCommerce
The minimum for a responsive WooCommerce store:
| Traffic | Hosting | RAM | PHP Workers |
|---|---|---|---|
| < 500 orders/month | Shared (good host) | 512 MB | 1 |
| 500–3,000 orders/month | VPS (1 vCPU, 2 GB) | 2 GB | 2 |
| 3,000–15,000 orders/month | VPS (2 vCPU, 4 GB) + Redis | 4 GB | 4 |
| 15,000+ orders/month | Managed WordPress / Dedicated | 8 GB+ | 8+ |
If you're on shared hosting and your WooCommerce store is getting more than 200 orders/month, you've outgrown shared hosting. The time saved on hosting administration alone justifies moving to a managed VPS or managed WordPress host.
Measuring improvement
Use these tools before and after each change:
- GTmetrix (free, India test servers available): shows Time to First Byte, LCP, and resource waterfall
- Google PageSpeed Insights: Core Web Vitals score — aim for LCP under 2.5 seconds
- WooCommerce Performance tab (Settings → Status → Tools): shows database query count and page generation time
A well-optimised WooCommerce store on a properly resourced server should load its shop page in under 2.5 seconds on a desktop and under 3.5 seconds on a 4G mobile connection in India.