How to Fix a Slow Magento 2 Website

Magento 2 is one of the most popular e-commerce platforms in the world. Regarding performance and flexibility, it can take out any other Content Management Systems (CMS), including Shopify and Woocommerce. However, there are some issues. A lot of users are experiencing sluggish performance, which is bad for their businesses. If the page-load time exceeds at least 2 seconds, the visitors are very likely to go away from your website. However, it is not difficult to fix the issue. By following these steps, you can take the performance of your Magento 2 website to a whole new level. Take a look at them.

Use Updated Magento 2 Version

It might sound simple. But updating Magento 2 to the latest version is the most effective way of enhancing speed. The developers make a lot of tweaks to optimize the platform with the latest tools. As a result, the updated version comes with significant performance and security enhancement. To update the version, follow these steps:

  1. Sign in to the admin panel. See the version number in the bottom right of the screen.
  2. Click on the bell icon, which is located on the upper right corner. If you find any available update, click on it.
  3. Click on See All to view all the necessary notifications for available updates.
  4. If you need more information about them, click on Read Details. You will see all the latest release notes.

After reading them, you have to go through several steps to update the Magento 2 version appropriately. You will find them here.

Activate Caching

By enabling caching, you can transfer significantly more traffic without affecting the data speed. In other words, you can take the speed of your Magento 2 website to a whole new level. Navigate through System > Cache Management and ensure that the status of all the settings is enabled.

If you notice any specific setting being disabled, it might work as a major catalyst for the sluggish performance of your Magento 2 website.

Use Varnish Cache

Varnish Cache is an outstanding tool. It reduces the response time significantly by working as an HTTP accelerator. You can install it by following the guides of varnish cache installation and configuration. After completing these steps, navigate through Stores > Configuration > Advanced > System > Full Page Cache. Then choose Varnish Cache in Caching Application.

Disable JS Bundling

JS Bundling has been deployed in Magento 2 in order to reduce the number of HTTP requests, which are essential for loading the webpage. The whole process is done by grouping JavaScript files effectively. However, due to grouping, an extra JavaScript file is created, which can consume up to 10 mb. It is really a massive space for JS codes. It can slow down your Magento 2 website significantly. To fix this issue, you must deactivate JS Bundling. Navigate through Stores > Configuration > Advanced > Developer. Then choose No in Enable JavaScript Bundling.

Activate CSS/JS Minification

Unlike Magento 1, you can minify CSS/JS codes in Magento 2 without using the third party tools. Navigate through Stores > Configuration > Advanced > Developer. Go below the page, find Minify JavaScript Files option and select Yes. You will notice a dramatic enhancement of performance.

Activate Flat Categories and Products

Another great way of speeding your Magento 2 website is enabling flat categories and products option. To do it, head towards Store > Configuration. Find Catalog tab. Click on Catalog. Find Use Flat Catalog Category and Use Flat Catalog Product under Storefront section. Then choose Yes for both the options.

Configure Content Delivery Network

Content Delivery Network allows the content to be displayed from the closest servers, which are scattered throughout the world. As a result, the visitors can see your content very quickly due to the short distance and quick load speed. To activate it, you have to navigate through Stores > Configuration > General > Web > Base URLs (Secure). Then add HTTPS URLs.

Optimize Images

Another reason behind the sluggish performance of your Magento 2 website is the use of large images. They take more time to load due to the large size. It, in turn, affects the overall performance of the website. To fix this issue, you must compress all the images to the smallest size possible. You should also use product images only in JPEG format. Moreover, you should make sure that the logo is in PNG or SVG format.

Activate Production Mode

Production is the fastest mode of operation in Magento 2. In this case, the URLs for static files are generated as required. They will not go through the fallback mechanism. To see which mode is being activated, you need to run the following command inside the root Magento folder:

php bin/magento deploy:mode:show

To activate production mode, use this command:

php bin/magento deploy:mode:set production

Use Lightweight Theme

A simple, but effective way of fixing the sluggish performance is using the lightweight theme. By applying it, you will experience a dramatic improvement in load speed.


Magento 2 is definitely an insane e-commerce platform. It comes with a large number of performance optimization features. By following the guidelines and features that we have mentioned, you can fix your slow Magento 2 website effectively.

Rate this post