Different Ways You Can Improve Performance of Magento 2

by | Mar 13, 2018 | Technology Featured

Magento is known for its ability to provide an all-in-one solution for ecommerce. It is also one of the most flexible, robust, and performance-oriented e-commerce platforms in the market. However, it is not perfect. Magento 2’s underlying system is complex and usually requires a lot of work to run efficiently. The most common problem among Magento 2 users and developers is its high loading time and slow interface.

Do you want to learn how to improve the performance of your Magento 2 website? Take the following tips from a magento development company:

Optimize images

Usually, designers give you high-resolution images so you can use them for various purposes. However, you need to scale them down if you are to use them on your website. Use web resolution instead of print resolution. If you have a 5000 x 3000 px image, scale it down to 1920 x 1080 px at most.

When you compress images, make sure that it’s lossless. Do this by simply removing unnecessary metadata from the PNG or JPEG files.

Minify and merge JavaScript and CSS

You need to enable JavaScipt bundling, merge JavaScript files, minify JavaScript files, and do the same for your CSS. If you do, you will see great improvement in your frontend performance. It will also allow faster site rendering in the browser. How do you change the settings?

Go to the backend menu. Select Stores and go to Configuration. Click Advanced, then Developer. Here, you’ll see the JavaScript Settings and CSS Settings. Make the necessary changes. Remember that in Magento 2.2+, you can only change the setting if you are in developer mode.

Audit and optimize TTFB

Time to first byte (TTFB), which stands for the server response time, shows how long it will take for Magento to generate the page’s HTML. Usually, it takes no more than 0.5 seconds. If you want to know your exact TTFB, you can use speed test tools.

To optimize your TTFB, you need to enable Magento’s built-in feature called profiler. Profiler outputs a trace composed of code blocks and the time spent in running them.

Enable production mode

You can run Magento 2 in three different modes: default, production, and developer. To get optimal performance, you need to choose production mode as it is the fastest among them.

If you want to find out what mode you are currently running, you need to use the following SSH command: php bin/Magento deploy:mode:show.

If you need to switch to production mode, use this SSH terminal command: php bin/magento deploy:mode:set production.

Use Varnish Cache

Magento 2 recommends that use of Varnish cache as Full Page Caching Application instead of Built-in cache because it is faster.

To install or configure the Varnish program on the server, go to the backend menu. Click Stores and go to Configuration. Click Advanced, then System. Choose Full Page Cache and set the application for Varnish Cache.

Update Magento and third-party extensions.

Look at your custom plugins and extensions. Are any of them slowing down your Magento 2 site? Does any of them in need of updates? Disable third-party applications that you don’t necessarily need. Update old versions of essential plugins and extensions. Usually, updates contain security fixes, bug fixes, and performance improvements.


Magento 2 is not slow by default. You only need to learn how to optimize it so that it will run smoothly.

About Author:

Shruti Gupta is a writer, digital marketer and outreaching expert. She writes about technology, startups & other niches. She has contributed to a number of famous websites like Thenextweb deccanchronicle and Crazyegg. Stay tuned with her at:@shruti_gupta01 or via skype : shrutigupta2811

Share This