Magento 2 is powerful, but its default configuration is not optimised for production. Across 30+ Magento production stores we've worked on, the same performance bottlenecks appear repeatedly. These are the ten optimisations that consistently deliver the most measurable improvement โ€” ranked by impact.

1. Full-Page Cache with Varnish

Magento 2's built-in FPC is a good start, but Varnish in front of it delivers dramatically better cache hit rates and lower TTFB. Configure Varnish with Magento's provided VCL and tune the TTL for category and product pages. Properly configured, Varnish reduces server load by 80%+ for anonymous traffic.

2. Redis for Session & Cache Storage

Replacing the default file-based session and cache storage with Redis is a day-one configuration change on every Magento project we deploy. Redis delivers sub-millisecond reads, handles concurrent sessions without file locking, and allows cache invalidation by tag. Use separate Redis instances for session and cache storage to avoid cache eviction affecting sessions.

3. MySQL Query Optimisation

Run SHOW PROCESSLIST and EXPLAIN on slow queries. Common Magento query issues: missing indexes on EAV attribute tables, N+1 query patterns in custom modules, and unoptimised flat table rebuilds. Enable the MySQL slow query log (threshold: 1 second) and address every query that appears in production.

4. Flat Catalog Indexing

Enable flat catalog for categories and products. This denormalises the EAV structure into standard database tables, dramatically reducing query complexity for category and product listing pages. The trade-off is increased indexing time โ€” mitigate by scheduling reindexing during low-traffic windows.

5. JavaScript Bundling and Minification

Magento 2's default JavaScript loading strategy (RequireJS with hundreds of individual files) is one of its biggest performance liabilities. Enable JavaScript bundling in production and use Grunt/webpack to generate optimised bundles. For high-traffic stores, consider replacing RequireJS with a Vite-based build pipeline.

6. Image Optimisation Pipeline

Implement WebP conversion for all product images (70% smaller than JPEG at equivalent quality). Use Magento's built-in image resizing but add a CDN with image transformation capability (Cloudflare Images, Fastly IO, or imgix) to serve correctly-sized images to every device.

7. CDN Configuration

All static assets (CSS, JS, images) should be served from a CDN. Configure Magento's base URL for static content to point to your CDN origin. Use cache-busting via content hashing, not query strings, for optimal CDN behaviour.

8. Elasticsearch for Catalog Search

Magento's MySQL-based search is slow and returns poor results. Elasticsearch (or OpenSearch) delivers sub-100ms search results, supports faceted filtering without full table scans, and enables relevance tuning. This is non-negotiable for any store with more than 500 SKUs.

9. PHP-FPM Tuning

The default PHP-FPM configuration is conservative. For production Magento, tune: pm.max_children based on available RAM (Magento uses ~100MB per worker), pm.max_requests to 500 to prevent memory leaks from accumulating, and enable OPcache with opcache.memory_consumption=512.

10. Database Connection Pooling

High-traffic Magento stores exhaust MySQL connection limits under load. Use ProxySQL between Magento and MySQL for connection pooling. This alone has resolved "too many connections" errors and stabilised response times under traffic spikes on three stores we've optimised this year.