Speed up Magento 2

8 steps to Speed up Magento 2

  • Step 1: Optimize Server and System Requirements

  • Step 2: Update latest version of Magento 2

  • Step 3: Enable Varnish Cache

  • Step 4: Configure Memcached

  • Step 5: Enable Flat Categories and Products

  • Step 6: Optimize Javascript and CSS

  • Step 7: Setup Content Delivery Network

  • Step 8: Optimize Images

There are various ways which could help you to increase the speed of your Magento store. However, the basic requirement of running a Magento 2 is the thing that you need to know first. Besides, you also need to aware of some Magento speed best practices in order to run a smooth Magento website. Below are several ways which you can refer to optimize your Magento website:

Step 1: Optimize Server and System Requirements

Server and System requirements can be considered as the two most important factor which can help you increase the speed of your Magento 2 website.

Server Requirements: Because Magento is a quite powerful store, instead of shared hosting for Magento, you should host your Magento store on a dedicated server or VPS hosting.

Step 2: Update latest version of Magento 2

When it comes to optimizing the speed of Magento, one of the most simple ways that you cannot forget to use is updating the latest version of it. Whenever Magento releases a new version, the performance, as well as other tweaks, will be improved significantly. Consequently, it is highly recommended that you update your store version to the latest one to improve the speed of your store’s site.

Step 3: Enable Varnish Cache

There are several practices which need to be implemented to speed up Magento site including the cache.

Below I will guide you the way to enable Varnish Cache in order to improve Magento 2 loading speed.

From the Admin panel, go to Store > Configuration > Advanced. Under the Advanced tab, click System, you will see the Full Page Cache section. In this section, you change the Caching Application field value from Built-in Cache to Varnish Caching.

Step 4: Configure Memcached

Another method to speed up Magento 2 stores is decreasing the database load. And the way to do it is to configure Memcached which is a free and open source distributed memory object caching system.

Step 5: Enable Flat Categories and Products

One of the most common reasons which make your Magento 2 site slowing down is the database’s read speed. To fix this issue, you can enable Flat Catalog.

Here is how you do it:

Firstly, go to your Magento store’s admin panel. Then follow this Store > Configuration > Catalog. Then click on Catalog which is under the Catalog tab. Here, you will see the Storefront section. When you have seen it, find two fields which are Use Flat Catalog Category and Use Flat Catalog Product, and change these fields to Yes.

Step 6: Optimize Javascript and CSS

Another reason which leads to the slow speed of Magento 2 is Javascript and CSS.

Following is the guide to minimize the Javascript and CSS in order to increase the speed of Magento 2:

From the Admin panel, go to Store > Configuration > Advanced. Under the Advanced tab, click Developer. In the Javascript Settings section, change the values in three fields Merge JavaScript Files, Enable JavaScript Bundling and Minify JavaScript Files to Yes. Then, change the fields Merge CSS Files and Minify CSS Files in the CSS Settings tab to Yes.

Step 7: Setup Content Delivery Network

You can also set up Content Delivery Network to improve the speed of your Magento store.

From the Admin panel, go to Store > Configuration > General. Click Web which is under the General tab. Then, you can explore the Base URLS (Secure) section and add HTTPS URLs.

Step 8: Optimize Images

On your store site, there are tons of product images. This might slow down your Magento speed if these images are not optimized properly. Here are some key points in image optimization:

  • Images need to be compressed.

  • Your store’s logo should be in PNG or SVG format.

  • The image of the product should be in JPEG format.

Last updated