4 min read

5 tips to speed up a Magento 2 store

Care to share?

Magento is one of the top open-source eCommerce platforms that provides a diverse set of features and customization options and also supports omnichannel selling. It’s robust, flexible, and SEO-friendly to help retailers build a high-quality online store. However, some retailers using Magento experience a slow loading speed. If you’re struggling with your site loading speed, we have some tips to solve your problem. This article will walk you through the common causes of a slow Magento website and five tips to speed it up that are easy to follow without extensive technical knowledge. 

Why is your Magento store slow?

Why is your Magento store slow?

The default speed of Magento 2 isn’t slow. However, your Magento site can become slow due to a variety of factors, such as: 

  • It doesn’t have the system requirements to operate a Magento store.
  • It uses slow and outdated hardware.
  • Inappropriate extensions have been installed.
  • Inappropriate customization has taken place.
  • Magento caching has been disabled.
  • A slow hosting provider is being used.
  • The right plugins haven’t been enabled.
  • MySQL, NGINX, and PHP configurations aren’t optimized.
  • Images aren’t optimized.
  • Database cleaning hasn’t been performed.

Effects of a slow site

If your Magento store is running slow, it’ll have a negative impact on the operations of your business. Since most customers only wait one to two seconds for a site to load, you can lose them to competitors if your site is slow. Many customers tend to open multiple sites when searching for something and will open the pages that load the fastest. If you make them wait, they’re likely to switch to another site for shopping, resulting in a low conversion rate and missed sales. You can use Google Analytics to check your site’s abandoned pages to get ideas on which page needs improvement.

Five tips to improve your Magento loading speed

Five tips to improve your Magento loading speed

1. Upgrade to the latest version of Magento 2

Check to see if your store is running on the latest version of Magento. Magento updates usually come with improved functionalities and enhanced security that help speed up the Magento 2 store’s performance. Because of this, you should update your site to Magento’s latest version when it’s released. Make sure you’re running the latest Magento version before moving on to the other tips below.

You can check the latest version in Magento Releases.

2. Install a content delivery network (CDN)

Installing a CDN is a great way to deliver content quickly worldwide. It uses a geographically distributed group of servers, called edge servers, that work together to provide quick delivery of static content, like JS, CSS, HTML, and images.

When a user requests your site, the server closest to the user’s location will deliver the content based on the shortest distance for the data to travel. In this way, users can enjoy a faster experience on your site. Since Magento 2 supports CDN, you don’t need any third-party extensions. Follow these steps to set up a CDN for your Magento 2 store:

  • Starting from the Magento Admin Panel, go to Stores > Settings > Configuration.
  • Choose General > Web in the left panel.
  • Open the Base URLs section:
    • In the Static View Files field, input the URL of the location on the CDN that stores static view files.
    • In the User Media Files field, input the URL of the JavaScript files on the CDN. 

Install a CDN in the Base URL section

  • Open the Base URLs (Secure) section:
    • In the Static View Files field, enter the URL of the location on the CDN in the Secure Base URL.
    • In the User Media Files field, enter the URL of the JavaScript files on the CDN in the Secure Base URL. 
    • Click Save Config.

Install a CDN in the Base URLs (Secure) section

3. Merge and minify JS and CSS files

Heavy JavaScript and CSS files are another common reason that slow down your Magento 2 store. Here’s how you can merge and minify JS and CSS files to improve your Magento store’s loading speed.

For JavaScript files:

  • Starting from the Admin Panel, go to Stores > Settings > Configuration.
  • Choose Advanced > Developer.
  • Expand the JavaScript Settings option.
  • Enable Merge JavaScript Files and Minify JavaScript Files.

Merge and minify JavaScript files

For CSS files:

  • Starting from the Admin Panel, go to Stores > Settings > Configuration.
  • Choose Advanced > Developer.
  • Expand the CSS Settings option.
  • Enable the options Merge CSS Files and Minify CSS Files.

Merge and minify CSS files

4. Enable Magento cache management

Imagine you need to send an event invitation to 1,000 people. Writing that many invitations manually will take a lot of time and effort. Instead, you can do the job with a sender-based printer or bulk email tool.

Magento 2 caching has the same working mechanism to improve speed optimization. Magento will take a copy of your site and save it in the local cache of the user’s web browser. So, when the user revisits your site, Magento will return the copy instead of recreating a new site every time the browser requests it.

Magento offers built-in caching types, like page cache, client notifications, integration configuration, and web service configuration. To reduce and minimize the number of database operations for page requests, remember to turn on caching status. 

You can do this by going to the Admin panel > System > Cache Management.

Enable Magento cache management

5. Use Magento log cleaning

If you have a slow database backup, consider checking your Magento log. Cleaning this log regularly will improve your site speed and performance. Here’s how you can clean up the Magento database log even if you don’t have access to Magento databases:

  • On the Magento Admin panel, click Stores > Configuration.
  • On the left panel, select Advanced > System.

Magento log cleaning: Step 1

  • Under System, go to MySQL Message Queue Cleanup.

Magento log cleaning: Step 2

  • Set up the values for these following attributes as default or automatic clearance as necessary:
  • Successful Messages Lifetime
  • Retry Messages In Progress After
  • Failed Messages Lifetime
  • New Messages Lifetime

Magento log cleaning: Step 3

  • Click Save Config, and you’re good to go.

Other ways to speed up your Magento website

Other ways to speed up your Magento website

Apart from the above five tips, there’re many other factors to help you speed up your Magento store, but you need a deep understanding of programming knowledge and skills. If you have a developer to work on your Magento 2 store, you can use this checklist to determine the things to speed up:

  • Admin
  • Product save
  • Price import
  • URL rewrites
  • Tier price import
  • Localhost
  • Search
  • Retrieving data from the database
  • The back end
  • Server addon
  • Product management
  • Shopping cart
  • Checkout

The takeaway

A slow Magento site can cause a high bounce rate and affect your ranking with Google. Correspondingly, speeding up your site is essential to avoid losing potential customers. We hope this article has given you valuable tips to level up your site loading speed. However, since there are plenty of methods to speed up store performance, you should analyze your site and choose the solutions that meet your requirements.

Published August 30, 2022