15 Tips to Speed Up Magento Open Source Performance

Discover how to enhance the speed of your Adobe Commerce (Magento) store and optimize performance for better user experience and increased sales.
Header - tips to Speed Up Adobe Commerce

In this article, we will discuss how to speed up your Magento Open Source website. A speedy website helps convert visitors into customers, keeps customers happy, and helps you sell more effectively. We’ll explain why speed matters for Magento Open Source and give you easy tips for speeding up your site.

The article will include:

  • Common sources of performance issues for Magento stores

  • Why performance is more critical now than ever

  • 15 tips to speed up your Magento Open Source storefront

  • 7 extensions you can use to optimize your speed

  • How to know when it’s time to upgrade to Adobe Commerce on the Cloud

Many of these same performance tips will also apply to Adobe Commerce On-premise, the licensed, more full-featured implementation of Magento’s eCommerce platform.

What Causes a Magento Site to Be Slow?

Developers can influence many internal factors to speed up a Magento Open Source store. The top reasons for Magento Open Source (Magento) performance issues include:

Insufficient hosting

Choosing the right hosting solution for your Magento website is essential for ensuring fast load times, high uptime, and secure operations. While budget hosting may save money in the short term, it often leads to slower performance, unreliable service, and security vulnerabilities, which can hurt a site’s reputation and conversion rates.

Let’s look at configuring an Amazon EC2 instance according to store size and needs. Please note that the following numbers are high-level and can vary depending on the number of attributes and level of site customization.

  • For Small Stores with under 1,000 SKUs, an EC2 T3.medium instance should be sufficient, providing a 2–3 second response time under low traffic.
  • For Medium Stores (1,000–10,000 SKUs), an M5.large instance can handle up to 5,000 visitors per day with 1.5–2.5 second page load times.
  • For Large Stores (10,000–50,000 SKUs), more robust setups like M5.2xlarge or C5.2xlarge instances are necessary, ensuring sub-2 second response times with efficient caching and optimized database performance.

Enterprise Stores (50,000+ SKUs) will need high-end EC2 instances (C5.4xlarge or larger), Amazon Aurora with read replicas, and extensive caching to maintain under-one-second response times even with millions of visitors daily.

Insufficient Server Locations

The location of your servers plays a significant role in how quickly the website loads for customers in different regions, a primary concern for global e-commerce sites.

Hosting providers with only a single server location can cause significant latency (the time it takes for data to travel from the server to the user’s device) for customers accessing your site from a region far from the data center.

For example, if the server is located in the U.S., customers from Europe or Asia may experience delays due to the increased distance. In general, a website hosted in the U.S. can experience an average latency of 150-250ms for users in Europe and 200-300ms for users in Asia.

To solve this problem, choose a global hosting solution such as AWS or Google Cloud, which offers multiple data center locations worldwide. These solutions allow content delivery networks (CDNs) to use edge servers to reduce latency by caching content closer to users.

No CDN

Without a CDN, the server hosting your Magento website is the only source for delivering content to users worldwide. This causes high latency, particularly for users far from the server’s location.

A website without a CDN, the result is the following:

  • All assets (images, CSS, JS files, etc.) must be loaded from the origin server in a single location—the further a user is from the origin server, the slower the load time due to latency.
  • As the number of resources increases (such as larger product catalogs or more complex designs), page load time can skyrocket due to the limited bandwidth available from a single server.
  • Slow latency can be a huge detractor to the customer experience on e-commerce websites, which typically have heavy multimedia content (e.g., product images, videos, and customer reviews). This can be a huge detractor for the customer experience, leading to unnecessarily high levels of attrition across the sales funnel.

Let’s look at an example of a website hosting the server in New York, U.S. While you can expect latency to be low for users in the U.S. when a European or Asian user visits the store, the server in New York has to deliver content across large distances, which increases response time.

Without a CDN, we can estimate average latency as:

  • New York to Europe: Latency of 100-150ms on average
  • New York to Asia: Latency of 200-300ms on average

Let’s assume you have a high-traffic Magento Open Source store with 500+ products and several large images per page. Without a CDN, your store can experience slowdowns, especially when users from different regions try to access product pages. This can result in delayed rendering times for those assets.

  • Without a CDN, page load times can exceed 4-6 seconds, especially for product images and other dynamic content such as reviews or related products.

Improper cache management

Magento heavily relies on caching mechanisms to improve performance. These systems store content (such as HTML pages, database queries, and product details) so that it doesn’t have to be regenerated on every user request.

Improper cache management can prevent this process from working effectively, leading to slower website performance, longer server processing times, and higher resource usage.

Without full-page Caching to reduce the load on the server and improve response times, Magento must dynamically generate the entire HTML of a page for each request. This is particularly problematic for product and category pages, which can be complex and require multiple database queries. The impact on performance includes:

1. Increased Page Load Time

The server has to execute database queries and render content for each page request. This results in 4-6 seconds per page load, far above the recommended ideal page load time of 0-2 seconds.

Example: A product page with dynamic content would take several seconds to process and load without cache. Each page load would require 5–10 database queries to fetch product details, images, pricing, and customer information.

2. Excessive Database Query Count

Without caching, each product or category page would require 5–10 database queries to fetch content, which increases as the number of products grows.

Example: If 500 visitors access the same product page, the website will execute 500 x 10 = 5,000 queries to render the page, resulting in slow database responses and potential timeouts.

3. High Server Load

Every request requires fresh content generation, leading to higher CPU and memory usage.

Example: Each user request consumes 1-2 CPU cycles and 200–300 MB of RAM while rendering the page. This will increase as more users visit the website.

Overloaded theme, web content, and plugins

When a theme or web content is overloaded, it means that the site is burdened with excessive or unoptimized resources, such as:

  • Large, unoptimized images and videos
  • Excessive or bloated JavaScript and CSS files
  • Unnecessary third-party integrations and plugins
  • Complex and heavy theme structures
  • Unoptimized fonts, animations, and other design elements

Images

Images, especially high-resolution product or banner images, are some of the most commonly used resources on e-commerce sites. If these images are too large, not properly compressed, or in the wrong format, they can significantly slow down page load times.

Code inefficiency

Errors and unnecessary lines lead to performance issues. While large files are an issue for all web code (e.g., JavaScript and CSS), they are particularly relevant for render-blocking resources that take longer to load (particularly on mobile).

Extensions

Too many extensions or plugins within a page introduce additional third-party scripts that can slow down the page, particularly if they are unoptimized or reliant on third-party hosting.

Poorly implemented third-party integrations and plugins

The most commonly overlooked issue is third-party plugins. Many Magento sites load third-party integrations, such as analytics tracking codes, social media widgets, live chat widgets, or advertising scripts. Each integration may require additional JavaScript files, API calls, and resources, adding to the page load. While these tools are useful, they can slow down the site if they are not implemented efficiently or if they add unnecessary overhead.

For example, in a recent Magento optimization project, we examined the implementation of 5 different third-party services: Google Analytics, Facebook Pixel, a live chat widget, a product recommendation engine, and external advertising scripts. Each of these integrations contributed to overhead, estimated as follows:

  • Google Analytics: ~50 KB
  • Facebook Pixel: ~30 KB
  • Live chat widget: ~200 KB
  • Advertising Scripts: ~150 KB
  • External API calls: ~100 KB per call
  • Total Overhead: 500–700 KB of additional resources just for third-party services.

In this example, scripts were loaded synchronously. They blocked the rendering of the page, increasing the time to first paint (TTFP) and time to interactive (TTI), both critical measurements of website performance. The result was an increase in page load time by 2–3 seconds or more, depending on whether external services were slow to respond or if there was network congestion.

Solution: Asynchronous Loading of Scripts (async attribute)

The async attribute allows scripts to be loaded in parallel with other resources (e.g., images and CSS) without blocking the page rendering process. When a script is loaded asynchronously, it doesn’t stop the browser from painting the page, allowing for faster initial rendering. Later on in this post, we’ll address more tips to speed up your Magento performance.

Too many redirects

Too many or long chains of redirects cause inefficiency.

Lack of mobile optimization

Page loading speed on mobile devices must be fast enough to transfer over unreliable networks and be read on small screens.

However, not all themes are responsive to mobile devices, and not all developers have created image, extension, or caching policies that reflect mobile needs.

Continue reading to see how to address these performance issues and reap the full benefits of Magento.

Why Does Speed Matter for Magento?

Addressing performance is critical to Magento best practices. The speed at which your page loads is critical to user experience and search engine optimization (SEO) page rank.

User experience (UX)

Page load impacts the user experience, particularly for first-time web visitors. According to research, an eCommerce site that loads in 1 second has a conversion rate of 3x for B2B or 2.5x for a B2C compared to a site that loads in 5 seconds.

So a faster site will have more conversions, a lower bounce rate, lower customer churn, and lifetime customer value, with 70% of consumers who say page speed impacts their willingness to buy.

Impact of Page Load Speed on Conversion Rate

SEO Position

Google states that it looks to “reward content that provides a good page experience” at both the site and page level, as reflected in its Core Web Vitals (see below), and reward content that displays well on mobile devices.

Google provides the following baselines for its Core Web Vitals, which can be monitored in the Google Search Console:

Core Web Vitals

How to measure website speed

Website speed (website performance) or page speed refers to how fast a website or a single page loads its content. The actual user experience of speed is measured in different ways, including the three Google measures: cumulative layout shift (CLS), largest contentful paint (LCP), and interaction to next paint (INP). Others include time to first byte (TTFB), time to interactive (TTI), and first contentful paint (FCP).

Run speed tests and gain insight with tools such as Google PageSpeed Insights, Lighthouse, GTmetrix, and Core Web Vitals in the Google Search Console. These tools will provide store owners with a baseline of their current page speeds and/or insights into problem areas in their online stores.

Tips to Speed Up Magento Open Source

There are several ways that developers can address performance issues with a Magento Open Source web page, including:

Factors Influencing Page Load Speed

Let’s explore each of these performance opportunities individually as Magento Best Practices:

1. Pick reliable hosting & database

Set up one or more hosts for your eCommerce platform that meet minimum system requirements for PHP 8.x, MySQL 8.x, Apache 2.4, Elasticsearch 7.x or 8.x, composer 2.2, and more. Adobe offers advice on setting up hosts here. While Adobe supports both MySQL and MariaDB 10.4, the latter is better able to handle spikes in traffic and larger data stores.

Pick Reliable Hosting & Database

Choosing a hosting provider involves many factors, including whether you want shared (not ideal), dedicated, or cloud hosting and estimating your audience’s anticipated traffic and performance requirements. Look for a hosting provider with a strong security and performance history, including CDN integration and advanced caching. To help you make this decision, read our guide to creating an enterprise cloud strategy.

2. Update Magento regularly

The first step in addressing any page or site speed issues for your Magento Open Source eCommerce store is to ensure you have the latest Magento version from Adobe (after completing a full backup). Each release includes hundreds of quality improvements and enhancements, updated libraries and dependencies, and security improvements.

As of April 2024, the latest version of Magento Open Source is 2.4.7, which includes over 200 quality improvements. Keep in mind that upgrades can cause issues. If you are still on Magento 1 and need to migrate to Magento 2 or are behind on Magento 2 updates, our Magento experts can help. (Read more on 12 things to avoid when hiring a Magento developer).

3. Review dependencies and constraints

If you are using a version of Magento below 2.4.5, follow the system requirement notes to upgrade to MariaDB 10.4 before upgrading Magento.

Adobe has tested versions of third-party software dependencies listed in the system requirements. However, to avoid any dependency conflicts with components when upgrading to the latest release of Magento, it is recommended that all third-party Magento extensions and custom code be reviewed to ensure compatibility with new features, changes, or deprecated functionality. To manage dependencies, it is recommended that you follow the Dependency Inversion Principle by using abstractions and that you use Composer for installation.

4. Improve caching

While the Page Cache module can be used in development, Adobe recommends using Varnish cache as a full-page cache solution to speed up performance for dynamic websites and APIs. Varnish can speed up information delivery by several hundred. Adobe also recommends using Redis Smart Cache to optimize performance and specifically calls out session caching with a separate instance of Redis. Lastly, configure browser caching to increase performance.

This is the architecture Adobe recommends to support scale:

Architecture Recommended by Adobe to Support Scale

5. Keep indexers updated

Magento contains several indexers, and your site may need additional indexers to support products and categories. As data changes, it’s important to keep indexers updated so that data does not need to be calculated for each request. You can set up logic to support partial reindexing each time a change is saved or to update by schedule (preferred), which allows you to pre-schedule an update for low-traffic periods.

6. Reduce Page Bloat

While third-party themes are convenient, they often have more code than necessary to be adaptable for many use cases, adding unnecessary page size. Creating a custom design that is visually appealing but also economical on code can help ensure rapid page speed. Consider the following when creating your design:

  • The biggest contributors to page delays are rich, interactive media elements and images. Optimize and use sparingly.
  • Write clean code
  • Limit the number of third-party scripts that run on the page
  • Limit the number of widgets and sliders
  • Follow AMP protocols for high performance across devices and channels

7. Check third-party services and modules

While Magento is continually being optimized, performance can take a hit as you add extensions and extra modules. Dependencies on slow third-party services can lead to excessive AJAX requests and API calls, leading to performance issues. In contrast, the number of modules can lead to inefficiencies, as each module works independently with your system. Assess if you need all the modules and extensions currently in use or whether simpler options are available. When extensions remain vital, caching can help reduce repeat calls, and code can help reduce unnecessary calls.

8. Optimize for mobile

Optimizing for mobile is essential to support page speed, user experience, and SEO. Mobile optimization can include:

  • Using a mobile responsive design, a progressive web app (PWA), or headless commerce architecture with lighter mobile app(s)
    • A word of caution: mobile responsive designs are more bloated than mobile apps, correlating performance for all channels and devices
  • Separate website and mobile CSS files to optimize loading
  • Offload some CSS functions to the device hardware using translate3d()
  • Minimize forms, support auto-fill and one-click checkout experiences using Apple Pay or Google Pay

9. Optimize multimedia

While high-quality images and video can enhance the user experience, they are also commonly the slowest-loading resources, which impacts LCP.

  • Choose JPEG (photos) and PNG (images) formats
  • Allow Magento to size images responsively based on screen size
  • Compress images to ensure they load faster. You can use built-in compression tools in Magento (default compression is 80%), a third-party tool before upload, or defer to your CDN for lossless compression.
  • Ensure small elements such as icons are loaded in vector or with CSS
  • Use Lazy Load tools to only load out-of-view images if users scroll there
  • Use actual text and fonts overlaid on images vs images with text

10. Make CSS and JavaScript smaller

A heavy use of CSS and JavaScript can impact performance, particularly if single-page CSS elements are combined into the core CSS files. Make files smaller by Magento’s CSS option to Minify CSS files (minification) and Merge CSS files. Review CSS and JavaScript files to ensure they do not have unnecessary style information or scripts, and split files into “critical” and “non-critical,” ensuring that non-critical CSS and JavaScript files are moved to the bottom to reduce load time for “above the fold” content. Using asynchronous JavaScript attributes can also speed up performance.

11. Try Elasticsearch or OpenSearch for quick results

The latest version of Magento Open Source supports Elasticsearch 8.11 (paid) or OpenSearch 2.12 (free), helping speed up search processes, with support for stop words, synonyms, and multiple languages. For brands that see an eventual path to Adobe Commerce, it’s best to begin with OpenSource, as support for Elasticsearch has been deprecated.

12. Activate Gzip compression

Using Gzip is a way to compress and decompress files quickly, helping reduce the data transferred to end users to speed up website loading in a way that’s invisible to the end user. Gzip can reduce data to ⅓ and ½ of its size, making transfer about twice as fast. By default, Magento Open Source now uses Gzip level 6, but this can be customized.

13. Use a Content Delivery Network (CDN)

One thing many of the best Magento eCommerce sites have in common is using a CDN for high performance. A CDN such as Fastly can significantly increase performance, particularly for global audiences. A CDN synchronizes content across web servers, using the closest server to the end user to deliver content. Fastly boasts a 32% faster TTFB than other CDNs and 43% faster than Akamai CDN.

14. Switch to production mode

Magento Open Source can be run in four modes (default, developer, production, and maintenance). Production mode improves performance by populating static files in the pub/static directory and serving them from the cache, reducing server load and ensuring a smoother user experience.

15. Enable advanced JavaScript bundling

In addition to the JavaScript tips above, you can go into the Magento Developer JavaScript settings to enable JavaScript bundling. JS bundling can reduce the number of requests files make to the server by merging JavaScript files into one file. However, these large files can also become inefficient.

An Advanced JavaScript Bundling extension (there are several) will bundle only the JS files needed for each page, helping to reduce load time. The same extension can also delay JS loading only when it’s required.

Magento Speed Optimization Extensions

This section will examine some of the top extensions for speed optimization for Magento Open Source from the Adobe marketplace or from third-party websites, highlighting features, compatibility, pricing, and implementation considerations. All prices are in USD.

Google Page Speed Optimizer by Plumrocket

The Google Page Speed Optimizer improves site performance by addressing code inefficiencies, including product and other site images, and offering built-in JS Bundling.

Google Page Speed Optimizer by Plumrocket
  • Key Features: Minify JS, CSS, and HTML, JS bundling per page type; move JS to the bottom of the page, preload main images and delay off-screen images (lazy load); preconnect to third-party content, preload fonts
  • Compatibility: Magento Open Source 2.4
  • Pricing: $149 (+ optional installation and service)

Advanced JS Bundling by Blackbird

There are several extensions for Advanced JavaScript Bundling, but we like the one from Adobe Commerce Bronze Partner Blackbird. This solution helps improve Magento performance by addressing some of the challenges we mentioned with JavaScript files getting too large.

Advanced JS Bundling
  • Key Features: Configure JS bundles by section, reduce JS libraries in the front-end
  • Compatibility: Magento Open Source 2.4
  • Pricing: $249 with optional service addition. 14-day money-back guarantee, unlimited updates.

Accelerated Mobile Pages by Plumrocket

Google and Twitter created accelerated mobile pages (AMP) to optimize web browsing. Several tools can leverage this framework to load sites faster and in accordance with Core Web Vitals. Although we also like Amasty’s AMP, Plumrocket’s AMP is more affordable.

Accelerated Mobile Pages by Plumrocket
  • Key Features:Creates a mobile AMP theme for each page with a simple HTML structure, loads in 0.4-0.5 seconds, riggers re-indexing, integrates with analytics and chat tools, multi-theme support, includes sandbox mode.
  • Compatibility: Magento Open Source 2.4
  • Pricing: $399 (+ optional support and installation)

Google Page Speed Pro by Amasty

Although similar to the Plumrocket tool of a similar name, Amasty (a Silver technology partner) offers a Google Page Speed Optimizer Pro with additional features for image compression and built-in AMP capabilities.

Improve Your Store Performance with 3 in 1 solution
  • Key Features: Minify, merge, and bundle code, lazy load, AMP extension for mobile, image resizing, move JS to footer, asynchronous indexing, shorten queries, server push for responses, preload images
  • Compatibility: Magento Open Source 2.4
  • Pricing: $859 / year (discounted to $519 year 1)

Ultimate Image Optimizer from JaJuMa

As a standalone image solution, the Ultimate Image Optimizer is the only solution to support AVIF (the newest image format that offers the smallest compression) and WebP conversion in addition to JPEG and PNG.

 
Ultimate Image Optimizer from JaJuMa
  • Key Features: Support for AVIF, WebP, JPG, PNG optimization, regular and background image support, lazy loading, better quality high-res images, adds missing image dimensions for SEO, dedicated optimized image cache, works with Varnish / FPC
  • Compatibility: Magento Open Source 2.4
  • Pricing: $399 (+ optional installation)

Upgrade to Adobe Commerce on Cloud for Peak Performance

Magento Open Source is designed for developers and small-to-medium companies to begin implementing a digital storefront. The eventual goal is to migrate to Adobe Commerce on Cloud to unlock built-in performance, scalability, and a 99.9% SLA for infrastructure and application (Managed Services only). An independent report calculated that merchants who made the switch saw an 18% increase in average order values.

Adobe Commerce on Cloud boasts capabilities to handle significant traffic during peak times with response times of less than 2 seconds:

Adobe Commerce on Cloud Capabilities

How do you know when it’s time to make the switch to Adobe Commerce on Cloud:

  • You have exhausted performance optimization options and cannot achieve a less than 2-second load
  • Your business has scaled significantly in terms of traffic, orders, and locales
  • Development resources are stretched too thin on infrastructure, impeding agility
  • You have a healthy budget to devote to the project
  • You want the advanced personalization, B2B, or AI features of Adobe Commerce on the Cloud
  • You’re increasingly supporting cross-channel sales or multiple brands/stores
  • You need enterprise-level security
  • See more in our comparison: Magento Open Source vs Adobe Commerce

IDC estimates that organizations that switch from Magento Open Source to Adobe Commerce will receive a 516% ROI within 3 years, improvements in customer satisfaction (18%), average order values (18%), conversion rates (15%), and a reduction in risk (70%).

The Bottom Line

Magento Open Source is a cost-effective solution for small and medium businesses to launch a full-featured digital storefront. However, performance and user experience take the forefront as consumer expectations increase. We’d love to assist you if you need help optimizing your Magento site or are ready to switch to Adobe Commerce on the Cloud.

Net Solutions is an award-winning Magento development company that helps deliver engaging B2C and B2B shopping experiences and provide everything you need post-launch to keep your site at the optimal performance level.

Discover tailored eCommerce solutions for your business.

Table of Contents

Related Services

Latest Insights

Stay ahead of the curve with our expert analysis, industry trends, and actionable advice. Our blog offers fresh perspectives on the challenges and opportunities in the tech landscape, helping you make informed decisions and drive innovation within your organization.