This website uses cookies

Our website, platform and/or any sub domains use cookies to understand how you use our services, and to improve both your experience and our marketing relevance.

Is Your Magento Website Slow? Check Out These Magento Optimization Tips & Fixes

September 20, 2021

11 Min Read

Magento is a resource-heavy ecommerce platform that requires the right set of resources and configurations for optimum performance. Even if you have a sound infrastructure, there is a chance that your Magento powered store might be slow.

That’s why here in this blog post, I will discuss some of the best Magento 2 speed optimization tips for improving the performance of your Magento store.

Having difficulties in optimizing Magento performance?

Let a Cloudways Expert optimize your Magento store for you.

Magento 2 Speed Optimization Tips

Developers who are responsible for maintaining the Magento stores generally make sure that they incorporate the best Magento 2 performance optimization practices into the projects. As a result, ecommerce stores perform at peak efficiency 24/7.

Several of the popular Magento 2 speed optimization tips that could add value to your Magento projects are:

Choose The Right Magento Hosting

To make sure your Magento store loads faster, consider hosting it on a provider that is reliable and delivers a smooth user experience that translates into sales and revenue.

Hosting plays an important role for Magento 2 performance optimization. Rather than opting for shared hosting, consider hosting your Magento ecommerce store on a cloud provider like Cloudways that offers a managed Magento cloud hosting experience. These hosting solutions simplify hosting Magento stores and deliver a lot of optimization and enhancements as part of the standard package.

Update the Magento Version

Magento regularly releases new version updates, focusing mostly on the platform’s security and Magento optimization. Thus, the most basic and essential tip for improving Magento 2 speed optimization is to update your Magento store to the latest version.

If you are on Magento 1, we strongly recommend you to migrate from Magento 1 to Magento 2 to experience a better, more reliable, secure, and faster ecommerce solution. Again, migrate to Magento 2 for better optimization performance.

Skip Built-in Cache – Use Varnish

Magento 2 comes with a built-in Varnish solution that offers a perfect performance combo with visible results.

In the previous versions, users had to install modules like “Phoenix” or “Turpentine” to integrate Varnish with the Magento platform. With Magento 2, Varnish integration is provided by default, resulting in supersonic Magento 2 speed optimization and performance.

Wondering why your Magento store is lagging?

Have a Cloudways expert look over its performance.

Speed up Magento 2 via Memcached or Redis

Both are the distributed memory caches that speed up Magento 2 large-scale web applications with dynamic databases. They reduce the load of database requests on servers and deliver cached data if an external data request allows it.

Opting for either Redis or Memcached integrates a high-speed backend cache with full cache tag support, and no need for additional low-level file system cache. As a result, particularly on high traffic Magento stores, the performance is excellent and stable.

Here is the Magento Memcached configuration guide and Magento Redis installation tutorial on Cloudways.

Keep Updating the Indexers

Magento allows you to work with bulk data, thereby reducing the load time. To overcome this, Magento needs to reindex its indexers because the core system updates indexers on every object stored by default. However, the process is not perfect and you need to manually update the indexers.

Indexers can be updated from the  Magento 1 admin panel. For Magento 2, you need to execute the following CLI command on the root directory using the SSH terminal:

php bin/magento indexer:reindex

Inspect Third Party Modules

Auditing third party extensions installed on the store. For this, turn off every module one-by-one, clear its cache, and see if this creates an impact on the store’s performance.

Test all the essential CMS pages (homepage, category pages, product pages, checkout pages). If you disable a Magento module and the store becomes faster, you have found the issue.

Immediately contact the extension providers/developers, ask for a refund, and inform them about the issue you faced.

Enable Magento Flat Catalogs

All the store data is saved in an Excel-like Magento database. When the limits are hit, it “spills over the extra data.”. As a result, the store slows down considerably.

You may reduce the impact of the “spilled” data by enabling Magento Flat Catalog Category and Flat Catalog Product. As a result, you will notice an improvement in the store’s performance.

A Little Help From CSS/JS Minification

Merging and minifying CSS and JavaScript files can make the Magento web page very light and have a dramatic impact on the load speed. Instead of sending 50 to 100 requests, the browser only needs to send just two. On top of that, minification benefits the process with a smaller size of individual files.

Speed up Search Results With ElasticSearch

Elasticsearch provides full-text searching at a very high speed. It offers the fast web content search capability because of the indexing service running on the server instead of searching the entire database for the match.

Elasticsearch is valuable in keeping your Magento store search precise and faster. This enhances the user experience and makes sure that customers can make good use of their time in your Magento store.

CDN For Magento 2 Speed Optimization

A Content Delivery Network (CDN) is a useful tool that caches the static content of Magento stores such as CSS, JavaScript, images, videos, fonts, etc. As a result, the store response time goes down significantly for the users.

Because of globally distributed locations of the nodes, the CDN takes over the request process and starts delivering the static web content to improve the page load time in the user’s browser. Configure CDN to your Magento stores to serve a better shopping experience to your audience.

RM -RF * Database Logs

Despite its market share and performance benchmarks, its database performance is still not up to the mark. One common reason behind this is the space taken up by the logs. When removed, the database performance improves significantly, because of the decreased lag in process execution.

IMPORTANT: Before doing anything to the database, take a fresh backup.

Switch To Production Mode

Running the Magento 2 store live environment in the Production Mode is something many developers miss. Make sure this is a priority task on your Magento 2 speed optimization checklist.

Magento 2 has three modes; Default, Developer, and Production. The Production Mode is optimized for performance and ensures a great user experience.

Optimize Magento Speed Like a Pro

Subscribe now and get a free ebook to your inbox.

Thank You

Your Ebook is on it’s Way to Your Inbox.

Magento Store Speed Optimization Extensions

Here’s a list of the best Magento 2 speed optimization extensions that can enhance the performance of your stores.

Fastly CDN

Fastly CDN Magento Optimiation

Fastly CDN provides an edge cloud platform that provides security and delivery services closer to the customers for faster performance. The Fastly extension helps Magento stores replace the native caching in Magento Enterprise version and results in a great user experience.

Fastly CDN was also selected to be part of the Magento Enterprise Cloud Edition technology stack.

Key Features:

  • Distribute the Magento ecommerce site across a global network which consists of strategically placed points of presence (POPs) in real-time.
  • It uses a Surrogate key that purges related sets of objects in a single request.
  • Manages the Magento store during times of heavy traffic like flash sales, peak holiday season or potential DDoS attacks.
  • It’s a free extension and can be installed in less than 30 minutes.

Compatibility:

  • Open Source (CE): 2.0, 2.1, 2.2, 2.3
  • Commerce on prem (EE): 2.0, 2.1, 2.2

Pricing: $0.00

Accelerated Mobile Pages By Plumrocket

Accelerated Mobile Pages By Plumrocket Magento Optimization

Accelerated Mobile Pages (AMP) plugin for Magento is based on an open source project supported by Google and Twitter (ampproject.org). The idea behind the project was to make all mobile pages load faster. This plugin is an open-code solution that makes website AMP-friendly without additional integration with third-party services.

Each page of the AMP theme has optimized HTML structure with inline CSS, asynchronous JavaScript, and special AMP tags to allow Google to cache the Magento pages easily.

Key Features:

  • This extension is super lightweight and makes minimum HTTP requests to speed up page load time.
  • Extensions helps to automatically generate Google AMP Pages for Homepage, Category Pages, Product Pages, and CMS Pages etc.
  • It allows easy editing of AMP homepage content from the Magento backend.
  • AMP extension works smoothly with any native or third party Magento 2 themes.
  • Free technical support available for the first 3 months.

Compatibility: 

  • Open Source (CE): 2.0, 2.1, 2.2, 2.3
  • Commerce using on prem (EE): 2.1, 2.2, 2.3

Pricing: $149

Cron Scheduler By KiwiCommerce

Cron Scheduler By KiwiCommerce Magento Optimization

With the help of this Cron Job Scheduler, you can easily set up cron jobs and run them as per your business requirement. You will also get access to cron jobs management options where you can enable, disable and delete them depending on your business needs. If a scheduled cron job leads to a fatal error, the email feature sends an email to the previously configured email address.

Key Features: 

  • Displays the complete history of cron jobs along with their status, runtime results and other details.
  • Tracks for the longest running cron jobs and kills them if they are no more required.
  • Finds the actual load on CPU and RAM due to cron job execution.

Compatibility: 

  • Open Source (CE): 2.1, 2.2, 2.3
  • Commerce on prem (EE): 2.1, 2.2, 2.3

Pricing: $0.00

Image Optimizer By Apptrian

Image Optimizer By Apptrian Magento Optimization

Apptrian Image Optimizer helps in optimizing the image formats and reduces the file size without losing the quality. You can easily optimize images by clicking a button or by setting up a configurable cron job.

This extension is fully configurable and fully compatible with Google Perceptual JPEG encoder “guetzli”. However, you need to install guetzli and configure the extension to use it.

Key Features:

  • Use the 64-bit Utilities option that allows you to run 64-bit versions of utilities.
  • Option to set cron expression for scan, reindex and other Magento optimization processes.
  • Convenient Progress Bar that gives an info about the percentage and number of optimized images.

Compatibility: 

  • Open Source (CE): 1.5, – 1.9.4
  • Magento 2 Open Source (CE): 2.0, 2.1, 2.2, 2.3
  • Magento 2 Commerce using on prem (EE): 2.2, 2.3
  • Magento 2 Commerce on Cloud (ECE): 2.2, 2.3

Pricing: $0.00

Full Page Cache Warmer by Amasty

Full Page Cache Warmer by Amasty Magento Optimization

Magento 2 is already well optimized for high loads and supports full page caching and Varnish by default. So why use this Full Page Cache Warmer extension for Magento 2? Because it offers the solution for the common problem of cache updating due to a number of reasons. By using this extension, you can automate the process of cache warming to make it invisible for customers and ensure a smooth shopping experience.

Key Features: 

  • Prioritize pages and exclude pages from warming.
  • Use the debug to check if the extension works properly.
  • Compatible with Magento 2 Varnish Cache and default file cache
  • Automate the cache warming processes.
  • User-friendly interface.

Compatibility: 

  • Open Source (CE): 2.1, 2.2, 2.3
  • Commerce on prem (EE): 2.1, 2.2, 2.3

Pricing: $219

Elasticsearch Autocomplete By Wyomind

Elasticsearch Autocomplete By Wyomind Magento Optimization

The Elasticsearch Autocomplete extension allows you to improve (and boost) the default Magento 2 search results by displaying relevant results about products, CMS pages, categories as well as search suggestions. Visitors enjoy an ultra-fast searching mechanism with the help of Elasticsearch server.

Key Features: 

  • Helps to highlight the keywords in the search result.
  • Offer search terms suggestions such as “Did you mean?”
  • Browse the indexed data directly from the admin panel.
  • Capable enough to handle thousands of products easily with ultra fast indexation.

Compatibility: 

Open Source (CE): 2.3

Commerce on prem (EE): 2.3

Pricing: $200

Magento Store Optimization Tips From The Community

Magento experts shared the following crucial tips for optimizing Magento stores.

Artem Pugachev (General Manager at Mobecls)

I would recommend the same things as they were on M1 – JS, CSS, separate mobile template, profiling poor extensions, robust server. Yet M2 gives some more opportunities to use microservices and put some substantial features aside.

Damien Retzinger (Lead Software Architect at Daffodil PWA)

The first rule of Magento 2 speed optimization is addressing abuses of the N+1 query problem. These are typically found via profiling.

I wrote a blog some time back about it, but it still applies.

It’s not anything terribly “click-baity,” but it does explain one of, if not the, most common perf problem found in most custom applications (Magento stores aren’t immune to this either).

Robert Duffner (Founder of Commerce Canary)

Essential tips are to work on the Front-end!  Most importantly optimize for HTTP2, and don’t use antique solutions like out-of-box JS bundling, or merging of CSS/JS files.  This means implementing something like Baler for Magento.

Next, focus on delaying a load of images, using Intersection observer “Lazy loading” and put in fixes for Magento’s poor use of Dom ready. I could go on for days about this topic, but actually do something lol..  I guess I could include some assumed basics, like turn on production mode, disabling logs, index on schedule instead of saving. That’s all I have for my tired brain tonight.

Piotr Siejczuk (eCommerce Solutions Architect at Accenture)

Here are some tips/comments from me if it comes to M2 OOTB Application Setting(s):

S. No. ID & Path Recommended Feedback / DevDocs
1 bin/magento deploy:mode:show Production Set Magento mode
2 System > Tools > Index Management Update by Schedule Meet Magento UK 2019 Presentation
3 Store > Configuration > Catalog > Catalog > Catalog Event > Catalog Events NO Catalog Events Carousel
4 Store > Configuration > Catalog > Catalog > Catalog Event > Catalog Event Widget NO Catalog Events Carousel
5 Stores > Settings > Configuration > Advanced > Developer > Grid Settings > Asynchronous indexing Enable Configuration best practices
6 Stores > Settings > Configuration > Sales > Sales Emails > General Settings > Asynchronous Sending Enable Configuration best practices
7 Stores > Configuration > Advanced > Developer > Template Settings > Minify Html YES Configuration best practices
8 Stores > Configuration > Advanced > Developer > JavaScript Settings > Merge JavaScript Files YES Configuration best practices
9 Stores > Configuration > Advanced > Developer > JavaScript Settings > Enable JavaScript Bundling NO Configuration best practices
10 Stores > Configuration > Advanced > Developer > JavaScript Settings > Minify JavaScript Files YES Configuration best practices
11 Stores > Configuration > Advanced > Developer > CSS Settings > Minify CSS Files YES Configuration best practices


Some important things to keep in mind:

  1.  JS Bundling Requires Strict Coding Regime and may not work correctly with 3rd Party Modules. This should be based on Load Tests: Result Comparison with and without this setting.
  2. Catalog Events Settings are related to usage/lack of usage of this Feature.
  3. JavaScript Bundling Setting: NOT Recommended (linked with 3rd Party Extension Quality within JavaScript Scope).
  4. To Update / Enable Frontend Performance Improvements Features please execute:
    • php bin/magento config:set dev/template/minify_html 1
    • php bin/magento config:set dev/js/merge_files 1
    • php bin/magento config:set dev/js/minify_files 1
    • php bin/magento config:set dev/css/minify_files 1

Last but not the least, I would also add CSS Critical Path and you can also check one script that I wrote some time ago.

Magento Optimization FAQs

Why Is Magento so Slow??

You can find it by the list in the app/etc/ directory.
Magento isn’t actually slow! It becomes slow when it doesn’t get optimized properly since it was built on heavy architecture with complex design patterns. Just ensure, you have strictly followed the optimization techniques in order to maximize your Magento store performance.

Which Mode Is Faster in Magento 2?

Magento 2 has three running modes: default, developer and production. Production mode is the fastest one and it is used to power live sites. Besides, if you’re looking to make tweaks and changes to the store you might want to switch on developer mode.

Wrapping it Up

Speed is a dominant factor in the success of an ecommerce store. A fast-loading Magento store responds quickly, converts better, and brings happiness to the visitors, which automatically leads to an increase in sales and revenues.

On the other hand, a slow Magento web store would make customers run away from the store, resulting in loss of sales and a serious hit to the brand’s reputation. This is why Magento developers must know how to optimize Magento performance.

Share your opinion in the comment section. COMMENT NOW

Share This Article

Customer Review at

“Great speed, features, knowledgebase, dashboard, UX and fast, expert support. Very happy!”

Stefan [Management Consultant]

Fayyaz Khattak

Fayyaz, a passionate Motorbike tourist, works as a Team Lead — Magento Community at Cloudways - A Managed Magento Hosting Platform. His objective is to learn & share about PHP & Magento Development in Community. You can contact him at [email protected]

×

Get Our Newsletter
Be the first to get the latest updates and tutorials.

Thankyou for Subscribing Us!

×

Webinar: How to Get 100% Scores on Core Web Vitals

Join Joe Williams & Aleksandar Savkovic on 29th of March, 2021.

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

x

For 4 Months

Promo: BFCM2021
  • 28

days

  • 28

Hours

  • 28

Mins

  • 28

Secs