E-commerce

A Magento 2 Performance Optimization Checklist

Most slow Magento 2 stores are slow for the same handful of reasons, and most of the fixes are configuration rather than code. This is the checklist I work through to take a store from a sluggish default to a fast production site. Work top to bottom: the early items give the biggest gains for the least effort. For the reasoning behind each area, the Magento Optimization hub links the deeper guides.

1. Switch to production mode

Developer and default mode generate code and merge files on the fly on every request. Production mode precompiles everything and is the single biggest configuration win. Set it with bin/magento deploy:mode:set production, and never run a live store in developer mode.

2. Fix indexing and cron

Set indexers to “Update by Schedule” rather than “Update on Save”, so a product edit does not trigger a full reindex mid-request. Then make sure cron is actually running every minute, because scheduled indexing, cache flushes and many other jobs depend on it. A store where cron has silently died will drift slower and stranger over time.

3. Turn on full-page caching with Varnish

Full-page cache is what lets Magento serve a page without rebuilding it. Use Varnish rather than the built-in file cache for any real store: configure it under Stores > Configuration > Full Page Cache, and confirm pages are being served from cache. This is covered in depth in Full-Page Caching in Magento 2.

4. Move cache and sessions to Redis

Use Redis for the default cache, the full-page cache backend and session storage. It is far faster than file-based storage and lets multiple web nodes share state. Keep cache and sessions in separate Redis databases so flushing one never wipes the other.

5. Use Elasticsearch or OpenSearch

Catalog search and layered navigation should run on Elasticsearch or OpenSearch, which Magento 2 now requires. A properly sized search cluster keeps category and search pages fast even on large catalogs; a mis-tuned or missing one makes them crawl.

6. Optimize images

Images are usually the largest part of a page’s weight. Serve correctly sized images, compress them, and use modern formats like WebP. Enable lazy loading so below-the-fold images do not block the initial render. This is the biggest single frontend win on most stores.

7. Bundle and minify JavaScript and CSS

In production, enable JavaScript and CSS minification and merging, and use the built-in bundling or, better, a modern build. Reducing the number and size of requests is what improves the metrics customers feel. Watch for third-party scripts, which often undo your work.

8. Put a CDN in front

Serve static assets, and ideally cached pages, from a CDN so they load from a location near the shopper. A CDN cuts latency, offloads your origin, and is close to mandatory for stores with customers across regions.

9. Tune the database

Clean the log tables that Magento grows without bound (use bin/magento log:clean or scheduled cleanup), keep MySQL or MariaDB tuned for your RAM, and archive old orders and quotes on very large stores. A bloated database slows the admin and the storefront alike.

10. Right-size hosting and PHP

Give Magento real CPU and RAM, run a current supported PHP version with OPcache enabled and generously sized, and use Nginx with PHP-FPM. Shared hosting is rarely enough. Most “Magento is slow even on a good server” cases come down to OPcache, PHP version, or a database that was never tuned.

11. Measure, then keep measuring

Benchmark before and after each change with PageSpeed Insights and WebPageTest for the frontend and a profiler like New Relic or Blackfire for the backend, so you know what actually moved the needle. Then monitor in production, because performance regresses quietly as the catalog grows and extensions are added.

Where to go next

The two areas that repay the most attention have their own guides: full-page caching for the server side and Core Web Vitals for the customer-facing side. The Magento Optimization FAQ answers the specific questions that come up along the way.

Frequently asked questions

How can I speed up my Magento store?

Work in order of impact: production mode, full-page caching with Varnish, Redis for cache and sessions, scheduled indexing with cron running, then image and frontend optimization, a CDN, and a tuned database on adequate hosting. That sequence fixes the vast majority of slow stores, and almost all of it is configuration rather than custom code.

What are the steps for Magento speed optimization?

They are the checklist above: production mode, indexing and cron, full-page cache with Varnish, Redis, Elasticsearch or OpenSearch, image optimization, JS and CSS bundling, a CDN, database tuning, right-sized hosting and PHP, and continuous measurement. Do them roughly in that order, because the early ones give the biggest gains.

What should I optimize first on a slow Magento store?

Confirm the store is in production mode and that full-page caching is on and being hit. Those two alone turn most sluggish stores fast. Only after caching is working should you spend time on images, frontend and the database, because optimizing the frontend of an uncached store is polishing the wrong thing.

What should a Magento performance audit include?

Run mode, cache configuration and hit rate, indexer status and cron health, PHP version and OPcache, database size and log-table bloat, search backend, extension profiling to find heavy modules, and frontend metrics (Core Web Vitals, image and script weight). The output should be a prioritized list of fixes with the expected impact of each, not a generic report.

Can I speed up Magento without changing the design?

Yes. Most of the biggest wins, caching, production mode, Redis, indexing, PHP and database tuning, are entirely server-side and invisible to the design. You can make a store dramatically faster without touching a single template. Design and theme work matters for Core Web Vitals, but it is not where you start.

Can I optimize Magento without installing more extensions?

Absolutely, and you usually should. The core levers are built into Magento and your server: production mode, cache, Redis, Varnish, indexing, image and asset settings. Reaching for a “speed optimization” extension is rarely the answer and sometimes adds its own overhead. Fewer extensions is generally faster, not slower.

What are the quickest wins for Magento speed?

Production mode, enabling full-page cache, moving cache and sessions to Redis, and turning on image lazy loading and asset minification. These take hours, not weeks, and typically transform a store’s speed. The slower, deeper work (database archiving, extension refactoring, a new theme) comes after these are in place.

Can Magento speed be improved without changing the server?

Often, yes, up to a point. Configuration fixes (mode, caching, indexing, image and asset optimization, database cleanup) can rescue a store that was never set up properly, even on the same hardware. But if the server lacks CPU, RAM, OPcache or a modern PHP, you will hit a ceiling, and then hosting is the next lever.

How long does Magento performance optimization take?

The high-impact configuration work is usually days, not weeks: an experienced hand can get a badly configured store into good shape quickly. Deeper work, refactoring slow custom code, replacing a heavy theme, or migrating hosting, takes longer. A realistic first pass that delivers most of the gain is a short, focused engagement.

How much improvement can Magento optimization deliver?

On a genuinely misconfigured store, dramatic: multi-second load times dropping to under a second for cached pages, and Core Web Vitals moving from failing to passing. On a store that is already well configured, the gains are smaller and more about the frontend and specific slow paths. The worse the starting point, the bigger the win.

Should I optimize Magento myself or hire a specialist?

If you are comfortable with the command line, caching and server configuration, the checklist here will take you a long way on your own. Hire a specialist when the store is business-critical, when you have already done the basics and are still slow, or when the problem is in custom code or infrastructure you cannot easily diagnose. The value of a specialist is knowing which of a hundred possible causes is actually yours.

How can I optimize Magento for mobile users?

Mobile speed is mostly frontend: optimized and lazy-loaded images, minimal JavaScript, deferred third-party scripts, and a theme that is not doing excessive work. Test on a real throttled mobile connection, not a desktop, because that is where Magento stores most often fail Core Web Vitals. The frontend performance guide covers this in depth.

Related