Magento 2 is a powerful, flexible platform with robust out-of-the-box features and deep customization options. But that same flexibility can become a liability if left unoptimized. Without the right configuration or ongoing maintenance, your store might not be performing at its full potential.
In many cases, Magento isn’t broken. It’s simply not running as efficiently as it could. That includes how well your store scales under pressure, how smoothly it handles backend operations, and how easily your team can continue building without encountering slowdowns or regressions.
Skip the guesswork! TMO’s Magento optimization and development services help global brands improve performance, reduce technical debt, and scale confidently.
If your store is struggling in any of these areas, the good news is that you don’t always need to rebuild your tech stack or invest in costly infrastructure upgrades. Sometimes, small configuration changes and better upkeep can deliver significant performance gains.
In this guide, we’ll walk through 10 quick configuration wins you can apply today, along with 7 deeper optimizations for teams that have already covered the basics and still feel held back.
Magento Speed Configurations You Can Apply Today
Many Magento 2 stores lag simply because the default setup was never fully tuned or because minor technical oversights have accumulated over time. Luckily, there are low-effort, high-impact configuration fixes that can significantly improve both front end speed and back end responsiveness. These are the first areas we review when auditing Magento performance, and in many cases, they resolve more than clients expect.
Think of them as foundational hygiene: changes that don’t require replatforming or redesigning, just smart setup and consistent maintenance.
# | Quick Win | Why It Matters |
---|---|---|
1 | Switch to Production Mode | Speeds up page loads and reduces runtime resource usage |
2 | Deploy Static Assets & Enable Minification | Reduces file size and improves load time |
3 | Enable Full Page Cache (Use Varnish) | Dramatically improves load speed for non-logged-in users |
4 | Check Flat Catalog for Products/Categories | Speeds up category and product page rendering |
5 | Switch to Scheduled Indexing | Prevents slowdowns during catalog updates or bulk edits |
6 | Clean Up Logs and Datalog Tables | Keeps database lean and responsive |
7 | Use Redis for Cache and Session Storage | Improves response time and handles concurrency better |
8 | Properly Configure ElasticSearch | Speeds up filtering and reduces catalog page load bottlenecks |
9 | Ensure Cron Jobs Are Healthy | Avoids backlogs in indexing, email sending, sitemap updates, etc. |
10 | Set Up a CDN for Static Assets | Improves asset delivery speed and reduces origin load |
We’ve also covered broader speed pain points in our Not Broken, Just Slow? 5 eCommerce Issues Costing you SalesSite speed can be the culprit behind poor UX, ROI, and scalability. We explain common technical issues, where to look, and how to fix them.top 5 eCommerce speed issues that cost you sales blog.
1. Switch to Production Mode
Magento can run in one of three modes: default, developer, or production. Production mode is designed for live environments. It disables real-time error output, enables all caching layers, and requires precompiled static files. If your site is running in developer or default mode, Magento generates static content on the fly and logs more information than necessary. This consumes server resources and significantly slows down page load times.
To enable, this action must be done via the command line (terminal) and not the admin panel. Make sure to back up your environment and run this on staging first if possible.
- Check your current mode: php bin/magento deploy:mode:show
- Deploy static assets: php bin/magento setup:static-content:deploy -f
- Switch to production mode: php bin/magento deploy:mode:set production
2. Deploy Static Assets & Enable Minification
Magento’s front end relies on JavaScript, CSS, and HTML files. When these assets are uncompiled or unminified, they take longer to load, especially on mobile or slower networks. Deploying static content ensures these files are pre-generated, and enabling minification compresses them for faster delivery.
To enable, go to Stores → Configuration → Advanced → Developer in the Admin Panel. Then, under both JavaScript Settings and CSS Settings, select:
- Merge Files = Yes
- Minify Files = Yes
Note: These options are only visible when the site is in developer mode. For production environments, enable these settings in staging, then export and deploy your configuration.
To deploy static content via the command line, run php bin/magento setup:static-content:deploy -f to pre-generate assets. Repeat for all store views and languages you support, and clear the cache afterward.
3. Enable Full Page Cache (Use Varnish)
Magento 2 supports full page caching to store and serve entire pages for non-logged-in users. This can be done using built-in file storage or an external reverse proxy like Varnish, which is significantly faster and more efficient under load.
Go to: Stores → Configuration → Advanced → System → Full Page Cache and select Varnish Cache under Caching Application. Then configure:
- TTL for public content (recommended: 86400 seconds for 1 day)
- Access List, if needed
Click Export VCL for Varnish to generate the appropriate configuration file (compatible with Varnish 4, 5, or 6 depending on your setup). Important server steps:
- Install and configure Varnish on your server or hosting environment
- Update your web server (Apache/Nginx) to route traffic through Varnish
- Ensure Varnish listens on port 80 and Magento runs on port 8080 or similar
If you're unsure whether Varnish is active, try loading a page as a guest user and inspect the response headers for X-Magento-Cache-Debug: HIT.
4. Enable/Disable Flat Catalog for Products/Categories
In Magento 2.3 and earlier, enabling flat catalog tables denormalized product and category data into simplified tables, reducing the number of database joins required for catalog queries.
Still on Magento 1? See Magento 1 vs. Magento 2: What Changed & is it Time to Rebuild?Does Magento 2 bring enough improvements to justify a rebuild? We break down the key changes in performance, features, and scalability.what changed in Magento 2 and whether it’s time to rebuild for better performance and support.
While this feature once helped speed up large catalogs, it is now deprecated and no longer recommended by Adobe. On Magento 2.3.x and above (including all Adobe Commerce and Magento Open Source versions), enabling flat catalogs can cause indexing issues and degrade performance. Only consider enabling if:
- You're using Magento 2.2 or below
- You're running legacy third-party extensions that rely specifically on flat tables
- You've thoroughly tested indexing and frontend behavior in a staging environment
How to enable (older versions only): Stores → Configuration → Catalog → Catalog → Storefront
5. Switch to Scheduled Indexing
Magento maintains index tables to improve performance for catalog, pricing, stock, and search data. When indexing is set to "Update on Save," every time you update a product or category, Magento immediately reindexes the affected data. Alternatively, you can defer these tasks to background cron jobs that will run during quieter periods.
Go to Stores → Configuration → Catalog → Catalog → Storefront and under the Product Fields Auto-Generation section, set Indexing Mode to "Update on Schedule".
After saving, make sure your Magento cron jobs are properly set up. You can use php bin/magento cron:run to verify cron is working, and monitor indexing status with php bin/magento indexer:status
6. Clean Up Logs and Datalog Tables
Magento logs store activity across your site, including visitor sessions, product views, search queries, and more. These logs are saved in database tables like log_visitor, log_url, report_event, and report_viewed_product_index.
By default, Magento does not automatically purge old data. Over time, log and report tables can grow large and impact database performance, particularly during admin operations, report generation, and indexing. Cleaning up these logs reduces query time, improves admin responsiveness, and decreases overall DB size.
Depending on your data retention policy, you can enable the number of days to save logs under Stores → Configuration → Advanced → System → Log.
If your store has been running for years without cleanup, some tables may contain millions of rows. You may need to truncate or optimize specific tables manually via MySQL.
7. Use Redis for Cache and Session Storage
Magento can store session data (such as customer logins, carts, etc.) and cache objects (blocks, layouts, etc.) using Redis, an in-memory data store designed for speed and concurrency that is especially helpful if you’re running a multi-node Magento setup or expecting high user concurrency.
By default, Magento uses the file system for both session and cache storage. This works fine for small stores but becomes inefficient under high traffic. Redis dramatically reduces read/write latency, scales better with concurrent users, and prevents file system bottlenecks, especially important during promotional campaigns or flash sales.
Redis must be manually configured in Magento’s app/etc/env.php file and must be installed and running on your server beforehand. You can confirm it's working via the redis-cli monitor command.
8. Properly Configure ElasticSearch
Magento 2 uses ElasticSearch as the default search engine and layered navigation backend. It powers catalog search, product filters, and category page queries. Elasticsearch indexes product data in a format optimized for fast retrieval.
If poorly configured, search and filtering can become slow or unresponsive, especially with large catalogs or complex attributes.
- Set Search Engine to ElasticSearch on Stores → Configuration → Catalog → Catalog → Catalog Search
- Verify host, port, and timeout settings
- Reindex after changes: php bin/magento indexer:reindex
9. Ensure Cron Jobs Are Healthy
Magento relies on cron jobs to run scheduled tasks like indexing, email sending, cache cleanup, sitemap generation, and more. Healthy cron is essential for keeping performance optimizations (like scheduled indexing) running smoothly.
If cron jobs are overlapping, misconfigured, or stuck, important processes fail silently, leading to stale search results, delayed updates, or growing cache issues. Check via command line using php bin/magento cron:run
10. Set Up a CDN for Static Assets
A CDN offloads static files (JS, CSS, images) to globally distributed servers. Properly set up, this can reduce load times globally, offload bandwidth from your origin server, and improve page speed for users in regions far from your hosting location.
- Configure in Admin: Stores → Configuration → Web → Base URLs (and Base URLs (Secure))
- Set Static View Files URL and Media URL to your CDN URL
- Clear cache after updating
Note: Your CDN (e.g., Cloudflare, Fastly, AWS CloudFront) must be configured to pull content from your Magento origin server, as well as proper cache headers and enabled cache invalidation rules.
Still Struggling with Performance? Consider these Optimizations
While quick fixes can improve speed noticeably, they only go so far. Long-running Magento stores often carry years of accumulated technical baggage, from layered extensions and theme customizations to rushed updates and patchwork fixes.
Want to understand how backend complexity affects speed and growth? Explore our full guide on Technical Debt in eCommerce: Causes, Costs, & How to Manage ItFrom conversion loss to rising costs, learn how tech debt builds up, how to identify it, & how to tackle it without starting from scratch.technical debt in eCommerce and how to manage it.
If your site still lags in speed, scalability, or ease of development after applying the basics, the problem likely lies deeper in the system’s architecture. These next optimizations require more planning and expertise, but they unlock lasting benefits: smoother scalability, cleaner code, faster release cycles, and a better experience for both users and developers:
# | Fix | What It Involves | When You Need It |
---|---|---|---|
1 | Extension & Module Audit | Remove/replace bloated or conflicting plugins | Admin panel is laggy or buggy |
2 | Custom Code Review | Refactor non-compliant or redundant logic | Frequent bugs or dev slowdowns |
3 | Theme Optimization or Rebuild | Streamline or replace bloated themes | Poor mobile UX, large page weight |
4 | Advanced JS Bundling Strategy | Split/optimize JavaScript for performance | Poor interactivity scores (CLS, TTI) |
5 | Database Indexing & Query Optimization | Tune DB structure and reduce query load | Large catalogs or slow admin performance |
6 | Frontend Decoupling (Headless) | Pair Magento with Next.js or PWA | Need fast UX + scalable dev velocity |
7 | Infrastructure Scaling | Right-size hosting, enable autoscaling | Traffic spikes or cross-border latency |
1. Audit Third-Party Extensions
Magento’s flexibility comes at a price, it’s easy to overload your store with extensions that conflict, duplicate functionality, or load inefficient code. Many were not built with performance in mind and may inject blocking scripts or unnecessary DB calls.
- What to do: Audit all installed extensions. Remove unused ones, and replace bloated ones with lighter alternatives or custom solutions. Avoid overlapping feature sets.
- When to act: Admin panel feels slow, errors increase after updates, or frontend assets feel heavier than expected.
2. Review and Refactor Custom Code
Custom modules and modifications (especially legacy ones) often violate Magento’s best practices or include logic in the wrong layers (e.g., business logic inside templates).
- What to do: Review customizations for duplication, performance hits, and dependency conflicts. Refactor outdated patterns.
- When to act: Bugs keep recurring, development velocity is slow, or upgrades regularly break functionality.
3. Rebuild or Streamline Your Theme
Legacy themes like Luma or heavily customized frontends often include unnecessary scripts, render-blocking CSS, or overly complex layouts. This bloats page weight and tanks mobile performance.
- What to do: Streamline your theme to remove unused elements, defer non-critical JS, and reduce layout complexity. Consider a lightweight custom theme or PWA.
- When to act: Poor Core Web Vitals, long time to interaction (TTI), or mobile bounce rates rising.
4. Tune JS Bundling Strategy
Magento’s default JavaScript bundling can backfire, creating massive bundles that delay page interaction. Done right, advanced bundling can reduce unused code and improve load order.
- What to do: Enable advanced bundling techniques or defer non-essential scripts. Explore async loading or hybrid bundling models.
- When to act: Time to Interactive (TTI) is high even on high-performance hosting.
5. Optimize Your Database
Large product catalogs, unindexed queries, or bloated tables can slow everything down, from search to checkout.
- What to do: Analyze slow queries, add missing indexes, and normalize overly complex data structures.
- When to act: Backend actions take too long, or catalog navigation/search is slow under load.
6. Decouple Your Frontend (Headless)
For merchants looking to future-proof performance and development agility, decoupling the front end can deliver major wins. A headless architecture allows you to retain Magento’s backend while replacing the frontend with a faster, modern stack, like Next.js.
- What to do: Move to a headless setup with Magento powering data and a custom frontend handling UX.
- When to act: You’ve hit the limits of your theme, need greater UX flexibility, or want to unify storefronts across regions.
Thinking long-term? Learn why Why Headless + PWA is the Future of Scalable eCommerceLearn how headless commerce and PWA empower faster launches, superior mobile UX, and future-proof your enterprise operations and global expansion.headless commerce and PWA are the future of scalable eCommerce and how they improve speed and flexibility.
7. Evaluate Infrastructure and Scaling Limits
Sometimes, it’s not the code, it’s the environment. Shared hosting, limited CPU, or improperly tuned infrastructure can choke even well-built stores.
- What to do: Assess whether your hosting supports horizontal scaling, load balancing, and CDN integration. Consider cloud-native deployments.
- When to act: Performance fluctuates under high traffic, or you’re expanding across markets.
Tip: To check if hosting is your bottleneck, install a clean copy of Magento 2 on the same server as your live site. If the fresh install is also slow, your hosting environment may be the issue, whether due to limited resources or geographic latency.
Together, these structural improvements reduce long-term technical debt, improve conversion rates, and free up your dev team to build, not fight fires.
Tips to Maintain Magento 2 Performance Over Time
Even after applying performance fixes, Magento isn’t a platform you can “set and forget.” Traffic grows, product catalogs change, and third-party modules evolve. All of these can introduce new performance risks if left unchecked. That’s why consistent maintenance is just as important as initial optimization, helping prevent slowdowns, regressions, or scaling issues from creeping in unexpectedly.
Below is a list of key considerations to guide your long-term Magento maintenance plan. Whether you manage your store internally or with an Adobe Commerce partner, these tasks can form the basis of a schedule you define and revisit regularly.
- Keep Magento core and extensions regularly updated: Avoid performance regressions and security risks from outdated code.
- Schedule periodic store audits: Evaluate speed, UX, and backend health to catch new bottlenecks early.
- Track error logs and monitor slowdowns: Continuous logging and alerting help you spot performance dips before they impact users.
- Stay on top of security vulnerabilities: Performance and security go hand in hand, since unpatched systems can be exploited and drained.
- Review and refactor legacy custom code: Remove technical debt that silently degrades performance over time.
- Maintain your hosting environment: Ensure PHP, database, and cache layers are properly tuned and scaled to your store’s growth.
- Test before deploying changes: Use staging environments that mirror production to catch regressions under realistic conditions.
- Create and verify regular backups: Recovery plans ensure you can respond quickly to critical errors without long-term damage.
How TMO Helps Magento Stores Perform at Their Best
At TMO, we help brands across Asia and beyond make Magento work harder and faster, without guesswork. Our Magento performance services are tailored to your store’s maturity, architecture, and goals:
- Magento Performance Audits: We examine configurations, extensions, theme code, database health, cron jobs, and infrastructure bottlenecks.
- Ongoing Maintenance & Cleanup: From log cleanup to code refactoring and extension audits, we help reduce technical debt that accumulates over time.
- Theme Optimization & Headless Frontend Setup: For brands ready to take the next step, we help implement or migrate to fast, scalable frontends using PWA or Next.js.
- Magento + Regional Deployment Expertise: We help optimize Magento for multi-market delivery, whether you’re struggling with site speed in Asia or preparing for peak traffic events like Double 11 or 618.
Magento’s performance depends not just on the platform, but on how it’s configured, extended, and maintained over time. Whether you’re dealing with leftover legacy bloat, planning a frontend rebuild, or just unsure what’s slowing you down, identifying the right course of action is key.
If you're unsure where to start or need help defining a performance-focused maintenance plan, get in touch with us for a tailored Magento assessment and roadmap built around your store's needs.