18 Practical Tips to Speed up Your Magento 2 Website

BroSolutions
8 min readDec 2, 2021
speed up magento laptop with an image of a spaceship with magento logo flying upwards

Everyone hates a slow-loading website. It’s a fact. So it should come as no surprise that an e-commerce website that takes a while to load can cost a business some of its customers.

For example, testing done by Google showed that 25% of users will leave a desktop website if it takes more than 4 seconds to load. The statistic becomes even more dramatic for mobile users, with 53% of them leaving if a website takes more than 3 seconds to load. Other research also showed that only a 1-second delay reduces customer satisfaction by 16%.

This topic is especially true today since Adobe Marketplace has thousands of extensions for Magento websites. And while they add so many useful features to your store, sometimes it can take a toll on its performance.

For your store to function well, you need the right optimization of back-end processes. The first thing you need to do is to identify any bottlenecks and small technical problems. They may seem like a minor issue, but together they can quickly snowball causing a significant impact on loading speed.

In this article, we’ll go over some of the typical issues that cause loading speed problems, and the way to solve them.

This is an abridged version of an article originally published on our blog. To read the full article click here.

Testing Website Speed

First, let’s understand what we are working with.

Just because the website loads fast for you doesn’t mean it will be as fast when your clients try to access it. There are a lot of factors that can determine loading time, like the distance between a user and the server, the device or browser they use, and others.

Thankfully, there are many resources available online to check your website speed.

PageSpeed Insights: a service provided by Google used to determine loading speed for both desktop and mobile versions of your website. Aim for a score of 90 and higher. PageSpeed Insights has suggestions of things that need fixing, so you can immediately know where to start.

Google PageSpeed Insights

Don’t forget that if your website shows good results for the desktop version, but not for a mobile version, you still need to work on it. In 2019 Google announced its mobile-first approach to ranking, which means SEO performance of your website depends solely on the mobile version.

Some tools also allow you to see how fast your website loads from different locations, like Pingdom or GT Metrix. Doing it can be useful if your store is multinational to see if your clients everywhere get the same experience.

GT Metrix

A tool Adobe Commerce recommends is New Relic. It is a website monitoring tool that provides a dashboard to monitor the queries on the server, reports the numbers and types of errors on your website, overlooks transaction performance, and more. Choosing Magento extensions that work with New Relic will allow you to monitor their performance, and identify ones that slow down the website. It is a paid tool, but the good news is if you use a paid version of Magento, you get it free of charge.

Now that you know how fast your website loads, it’s time to improve this result. Our list is not comprehensive, as countless things can influence your website speed. However, it should give you a good place to start your improvements.

Tip 1. Upgrade to Magento 2 if you’re still on Magento 1

For the rest of this article, we’re going to assume you’re using Magento 2. But if you don’t, this is going to be the most crucial step.

Magento 2 was released in November 2015, and in June 2020 Adobe completely stopped any support for Magento 1.

If it’s not enough of a reason to switch, consider this:

  1. Magento 2 processes 39% more orders per hour
  2. It delivers nearly instant response times for catalog pages
  3. Guarantees up to 66% faster add-to-cart server response
  4. 51% faster guest checkout, and 36% customer checkout response times for all checkout steps combined

Switching to Magento 2 guarantees you faster response time and keeps you up to date with all new improvements to the platform.

Tip 2. Regularly update Magento

You should upgrade your stores’ Magento version when the new one becomes available. New releases often include patches that improve your website performance.

Check here to see the release schedule and see if your website is up-to-date. If you are not sure which version you are running, there are many ways to check, but the easiest is to look at the bottom of the Admin Panel.

Source: Magento.com

To go with that, check Magento 2 system requirements to see if you need to update anything else.

Tip 3. Pick a good hosting

We’ve already touched upon the importance of good hosting in our article about preparing your website for peak traffic, so be sure to check it out if you want to learn more. When it comes to hosting, you don’t want to settle on the cheapest option. Usually, that means you will be sharing your hosting with other websites, which can cause problems when any of them have a surge of visitors.

Tip 4. Use a good theme

This can be one of the main factors in how fast your website will load. If you did everything suggested in this article, and the loading time is still slow, maybe it’s time to look at your theme. You can modify the existing theme, or switch to a completely new one.

There are themes created specifically to ensure that your store’s performance is top notch, like Hyvä. So if you are just starting with building a website, or looking to change a theme, we suggest taking a look at it.

If you decide to switch to a new theme, make sure the demo version is fast before purchasing it. You can use the same tools you use to determine the speed of your website to check it.

Tip 5. Eliminate decelerating and conflicting extensions

One of the first things you need to do when improving loading speed is to audit the extensions. Many times they can be outdated or conflict with each other. Even one of them working wrong can significantly slow down the entire store.

First of all, remove all extensions that you don’t need anymore. After that, you need to see how each of your extensions impacts your website. There are different ways to check it, but the most straightforward one is to turn them on and off one by one.

Another thing you can do to lower the number of plugins you need to check is to divide all plugins into two parts. After checking each part separately, take the slower part and divide it in two again, continuing the process until you are left with the slowest extensions. That said, better check everything individually.

After determining which extensions negatively impact your website you can try finding the alternatives by trusted extension development companies or finding a developer to make you a custom solution.

Tip 6. Set a correct Operating Mode

Magento 2 has three modes: default, developer, and production. This is often overlooked by website owners that switched from Magento 1 since it only had one.

Out of the three, the production mode has the highest speed, as the other two modes are designed for development and debugging.

To determine which mode your store currently has on, you need to use the following command:

bin/magento deploy:mode:show

Where {mode} can be set to default, developer, or production.

You can always change the mode by using the same command with a different mode.

Tip 7. Minify JS and CSS

Minification (or minimization) is a process of removing all unnecessary characters from a source code without altering its functionality. This can include the removal of comments, whitespace, shorter variable names, and functions. As a result, file size becomes smaller and loading speed increases.

Magento 2 has an automated setting to minify JavaScript and CSS. Go to Developer settings in the Admin panel, and change Minify JavaScript Files and Minify CSS files settings to Yes.

Tip 8. Disable Flat Catalog on Magento 2.3.x and above

Enabling flat categories is a piece of advice you see a lot in the older guides on how to improve your website speed. But in the newer version, the architecture has changed completely. Because of indexing issues, Magento no longer recommends using flat catalogs.

Tip 9. Optimize Images

Ecommerce websites usually have tons of product images on them. If they are not compressed properly, it can take a toll on your website loading speed.

Here are some pointers:

  • All images need to be compressed. There are tools online for each specific file type
  • Your logo should be in PNG or SVG format, while product images should be in JPEG or PNG
  • Don’t use HTML to handle large picture scaling
  • Use lazy loading. It is a method of loading images gradually, as a visitor scrolls down the page. Lazy loading eliminates the need to load all visual assets at one which improves loading speed.
  • Consider using WebP images. It is a file format developed by Google that allows you to reduce image size by 25–35%. The only problem is, Magento doesn’t have native support for WebP so you would have to get a separate extension.

There are a number of image optimizer modules on Adobe Marketplace, so you can quickly compress everything directly on your website.

This is not everything! To read the rest of the tips, head to our blog where we originally published this article.

--

--

BroSolutions

🔸 Reinventing your ecommerce business🔸 Custom Magento and Shopware Development 🔸 Magento Community Insider 🔸 https://www.brosolutions.net/