Everybody starts a Magento performance fix the same way: install a "speed optimizer" extension, bump PHP-FPM workers, maybe add a server. Sometimes it helps for a week. Then it's slow again, and now there's one more module on every request.
The problem isn't effort. It's order. Magento is slow for a handful of boring, specific reasons, and each layer hides the next one. If full-page cache isn't working, profiling PHP is a waste of time. If cron is dead, your indexers are lying to you. So you measure top-down, and you don't touch anything until the numbers point somewhere.
Rule of thumb
Measure first, change one thing, measure again. If you can't say which number a change moved, you didn't optimize — you gambled.
Here's the checklist, in the order I actually run it.
1. TTFB per page type, not "the site"
"The site is slow" is not a measurement. Pick the pages that make money — home, a category, a product, cart, checkout — and measure time to first byte for each, both cached and uncached. A category page at 150 ms when cached and 4 s when not tells a completely different story from one that's 4 s either way.
Write the numbers down. That's your baseline, and every later change gets compared against it.
2. Is full-page cache actually working?
Start with the obvious and check that the caches are enabled at all:
bashbin/magento cache:status
bin/magento deploy:mode:show
Every cache type should be 1, and production should be in production mode. You'd be surprised how often full_page is disabled "temporarily" by someone debugging something two years ago.
Then look at the hit rate. With Varnish:
bash# One-shot counters since Varnish started
varnishstat -1 -f MAIN.cache_hit -f MAIN.cache_miss -f MAIN.cache_hitpass
# Hit/miss per URL, live — tells you *which* pages never get cached
varnishncsa -F '%{Varnish:hitmiss}x %U'
The global ratio is cache_hit / (cache_hit + cache_miss), but don't stop there — it mixes everything Varnish serves. The per-URL view is where the real finding usually is: a product page that is always a miss almost always has a block with cacheable="false" somewhere in its layout, which quietly turns off FPC for the whole page. Grep for it:
bashgrep -rn 'cacheable="false"' app/code app/design vendor --include=*.xml | grep -v vendor/magento
Also check what purges the cache. An integration or cron job calling a full cache:flush after every stock sync means your hit rate resets all day long, and no amount of tuning fixes that.
3. Indexers: mode and backlog
On a store with real catalog traffic, indexers should be on Update by Schedule, so saves don't trigger reindexing inside the request:
bashbin/magento indexer:show-mode
bin/magento indexer:status
Example output (illustrative, trimmed):
textCategory Products: Update by Schedule
Product Categories: Update on Save
Product Price: Update by Schedule
Anything on "Update on Save" that should be scheduled goes on the list (bin/magento indexer:set-mode schedule <indexer>). Then look at the Schedule Status column in indexer:status, which shows the backlog as idle (N in backlog). A backlog that only grows means the changelog is being written but nobody is processing it — which brings us to cron.
The trade-off: scheduled indexers apply changes after cron runs, so a saved product takes a short while to show up on the storefront. And not every indexer supports schedule mode — customer_grid, for example, doesn't — so don't treat "Update on Save" on those as a finding.
4. Cron health
Scheduled indexers, email queues, price rules and cleanup jobs all depend on cron. When cron dies, the store keeps "working" and slowly rots. Check what's been happening:
sqlSELECT job_code, status, COUNT(*) AS jobs
FROM cron_schedule
WHERE scheduled_at > NOW() - INTERVAL 1 DAY
GROUP BY job_code, status
ORDER BY jobs DESC;
Lots of missed, error, or jobs stuck in running for hours are findings. So is a cron_schedule table with millions of rows — that alone makes every cron run slower.
5. MySQL slow query log
Turn on the slow log over a short, representative window (staging with production-like data, or production if your DBA agrees), then summarize it. A threshold of 1 second misses what usually hurts Magento: queries of 50–300 ms that run hundreds of times per request. Go lower for the window and let the digest rank them by total time:
sqlSET GLOBAL slow_query_log = 'ON';
SET GLOBAL long_query_time = 0.1;
-- when the window is over:
SET GLOBAL slow_query_log = 'OFF';
bash# your log path: SELECT @@slow_query_log_file;
pt-query-digest /var/lib/mysql/slow.log | head -100
Run EXPLAIN on the top offenders. Missing indexes on custom tables, EAV joins across too many attributes, and collections loaded inside loops all show up here.
6. Profile the uncached request
Only now do you profile PHP. Use whatever you have — Blackfire, Tideways, New Relic — or Magento's built-in profiler on staging:
bashbin/magento dev:profiler:enable html
You're looking for where the milliseconds go on an uncached category, product and checkout request: which classes, which queries, which third-party code. Turn it off when you're done with bin/magento dev:profiler:disable.
7. Plugins and preferences on hot paths
Every plugin and preference on a class that's called hundreds of times per request is paid on every page view. Magento will tell you exactly what's attached to a class:
bashbin/magento dev:di:info 'Magento\Catalog\Model\Product'
An around plugin on a hot method, or a third-party preference replacing a core class wholesale, is both a performance cost and an upgrade risk. Note them.
What not to "optimize" blindly
- Don't add hardware first. A bigger server hides a low hit rate or a slow query; it doesn't fix it, and the bill stays.
- Don't install a speed extension to fix a problem you haven't measured. It's one more module on the hot path.
- Don't enable JS/CSS bundling or minification settings without testing on your theme. Magento's built-in bundling can make things worse, not better.
- Don't flush all caches as a "fix". If flushing helps, something is invalidating or poisoning the cache — find that.
- Don't reindex everything on a schedule "just in case". That's usually a cron problem wearing a disguise.
Reading the results
Put the findings in one list and rank them by impact × effort. Cache problems usually come first, because they multiply everything else. Then cron and indexers, then the slow queries, then the code. Each finding should have three things: the evidence (the number), the cause, and the specific change that fixes it. If a finding has no number behind it, it's an opinion — label it that way.
If you'd rather have someone who has done this many times run the checklist on your store and hand your team a prioritized, evidence-backed fix plan, that's exactly what the performance audit below is for.
Want more on Performance?
Get the next articles on it by email.