20 Tactics For Magento Speed Optimization & Speed Up Magento 2 Websites

magento speed optimization

It goes without a doubt that Magento has become one of the most prevalent e-commerce platforms in the last five years. However, we have heard plenty of store owners complaining about the slow load speed of their Magento website. Owing to the excessive product catalog, the speed of Magento stores are frequently slow. This thing adversely affects customer engagement and business success at the same time. As a result, this article will provide Magento speed optimization strategies and suggestions on how to speed up Magento 2 websites.

If you are wondering:

Is Magento slow by default?

Or is this an issue of only Magento websites only or a common issue of all e-commerce websites?

And how to make your Magento e-commerce website load faster?

We will help you to find out the answers to all of the above questions.

Is Your Magento Store Fast Enough?

You should expect your e-commerce website to load in less than 3 seconds. 53% of customers will abandon a website if it takes more than 5 seconds to load. As a result, the 2-3 second mark is the tipping point at which the bounce rate plummets.

So, before going any further, test your website speed first by using Google PageSpeed Insights.

Why Does Magento Website Speed Matter?

1. Enhance User Experience

increase magento website speed

To begin with, website speed has a straightforward impact on user experience. A fast-loading page claims the credibility of your company and encourages visitors to spend more time browsing it.

Moreover, consumers are becoming more demanding and impatient. When your Magento store takes too long to load, they will become irritated.

A quick load time indeed makes the user feel at ease and in command. However, after 5 seconds, their attention is barely retained, and they are unlikely to return to the website. Also, 14% of customers will switch to another website if they have to wait for too long.

As a result, faster page speed corresponds to a better user experience. In other words, the faster a page loads, the happier website visitors are likely to be.

2. Raise Sales Revenue

magento page speed optimization

You probably did not know that every second delay reduces page view by 11% and conversion rate by 7%. Furthermore, the bounce rate increases by 32% when the page load time increases from 1 to 3 seconds. It then rises by 90% when the page load time increases from 1 to 5 seconds.

The speed of a Magento website has a massive effect on the bounce rate and conversion rate. The faster the site speed, the lower the bounce rate and the higher the conversion rate. As a result, the order success rate increased dramatically.

Having a low bounce rate and a high conversion rate is what any Magento store desires to capture sales revenue. As a result, increasing the speed of Magento stores is critical.

3. Improve SEO Rankings

maximize magento site speed

When Google announced it will include website speed in search engine ranking factors, the term “website speed” went viral in the SEO world. In the other words, the speed of online shopping stores contributes dramatically to the overall SEO scores.

SEO is unquestionably crucial for e-commerce websites, as it provides the necessary visibility to catch the eye of customers. The higher your online store’s SEO score, the higher you are ranking on Google search results, and the greater your reach to users.

Meanwhile, it is a fact that websites that rank first in Google’s search results tend to load much faster than those that rank last. If you want to rank higher on Google and capture as much user attention as possible, your website must load as quickly as possible.

Common Causes Of Slow Magento Website Speed

From our 10-year experience on Magento, we found that most of the sluggish load speed is owing to a lack of knowledge for website optimization. After using our Magento performance optimization service, all of the websites that have problems with their speed are improved significantly and get high scores on speed tests (Google PageSpeed Insights, GTMetrix, Pingdom,…).

Therefore, blaming slow speed on Magento default is absolutely wrong.

Besides, we have noted some common reasons for the speed issues:

  • Too many Magento extensions have been added to the site
  • Poorly coded Magento plugins are installed
  • Overgrown database and logs
  • Reliance on third-party applications that break performance
  • Improper server solution/ Slow hosting server/ Outdated server software
  • Image size is not optimized (too big with high resolution)
  • Custom admin theme
  • CSS/JS merge/bundle/minify in developer mode are enabled
  • SSD is not used
  • Full-page cache and other caches are turned off
  • Core code hackers

Best Magento Speed Optimization Strategies For Your Store

Having a lightning-fast website is undeniably a desire of all Magento merchants. As a result, constantly improving the speed of your Magento store is a necessary and urgent task.

Here are some effective solutions for slow-speed issues. You should take all our advice to get the best performance.

A. Advanced Solutions

Upgrade The Website To A Magento PWA 

upgrade website to magento pwa

If you genuinely want your online shopping website that is thundering fast, there is no better way than converting your Magento website to a Magento Progressive Web App.

Progressive Web App (PWA for short) is the best-feature combination of websites and mobile apps, capturing the elite of both worlds.

Therefore, Magento PWAs (websites that are integrated with PWA technology) will provide customers with interesting app-like experiences for website users.

With regards to page load speed, Magento Progressive Web App can defeat any regular website at least 2-3 times faster.

Now there are two most popular ways to build a PWA for Magento. You can choose to use ready-made Magento PWA themes or develop a new one based on customized requests. Find more about Magento PWA development solutions.

Migrate Magento 1 Website To Magento 2

migrate magento 1 to magento 2

It is worth noting that Magento 2 has received several performance-enhancing updates. This event, in turn, makes Magento 2 outperforms Magento 1 in terms of website speed.

It starts with full-page caching (FPC), followed by the Varnish cache and HTTP accelerator. Second, Magento 2’s default Ajax Cart supports switching sessions without reloading the entire page. Finally, Magento 2 officially supports the latest PHP versions including PHP 7.

All the new Magento 2 updates mentioned above contribute vastly to boosting its page loading speeds.

Furthermore, upgrading Magento 1 websites to Magento 2 will arguably result in a better website, not just in terms of speed. Magento has dismissed support for Magento 1 to focus on promoting Magento 2 beginning June 30, 2020. It means that Magento 1 is no longer secure, and your website can be easily hacked, resulting in a loss of credibility with customers.

On the contrary, Magento 2 brought significant improvements to the online store regarding security, design, functionality, and performance.

Integrate Magento Website With AMP Technology

Accelerated Mobile Page (AMP) is another wonderful method for ramping up your Magento stores. It is an open-source project that allows developers to use a single coding language to create web pages that load almost instantly.

You can currently integrate the amp into your Magento website using ready-to-use AMP themes or extensions.

Both PWA and AMP bring along to your Magento website at lightning speed, especially on mobile. On the one hand, AMP is more limited in the design aspect due to its HTML/ CSS and JavaScript restrictions. Furthermore, unlike PWA, AMP can’t bring any app-like features such as adding to the home screen, offline mode, push notification, background sync, etc.

B. Traditional Solutions

Selecting a Powerful Server/ Fast Web Hosting

As you might know, Magento 2 is a complex system. Especially in developer mode, it requires powerful hardware.

Therefore, it is a must to acquire a powerful server to run Magento.

To see whether your server is qualified, just look at the server CPU usage graphs.

If it has already or almost reached its max, you should consider upgrading as soon as possible.

Besides, you must notify any scripts or daemons running in the background that eat up all available resources.

Here is how to do it:

  • First, log in to server SSH.
  • Second, issue top command, and the screen will appear as the following:
  • Third, see what is processed at the top.
  • Finally, consult with your hosting if some of them could be disabled.

Last but not least, it is highly recommended to host your Magento store on a dedicated server or a VPS. Avoid shared hosting for Magento since you cannot have a fast website with a cheap and shoddy hosting provider. Make sure to choose a hosting plan that involves a solid-state drive (SSD) and at least 2GB of RAM.

Utilizing SSD

Since the admin panel page requests cannot be cached, they read/write to disk away too often than front-end requests do.

Owing to that, you should consider using Solid State Disk (SSD) – the fastest disk technology. It will definitely make a difference in your website speed.

Re-checking your Server Setup:

The server setup plays a fundamental role in your site performance. From our experience, the main bottleneck here is the MySQL database.

It’s common to find out that the sites that run on the poorly configured databases (DB).

A slow DB means slow queries, which lead to a slow Magento back-end as a result.

Hence, it’s suggested to hire a professional system administrator to optimize your server setup. Ask him to check whether you run the latest OS release with all the latest packages or not. A simple Nginx or apache upgrade will be able to make a huge difference in speed.

Eliminating Unnecessary/ Low-quality Magento Extensions

Magento is greatly extendable with plugins but we often find too many of them added to a site but only a few are truly necessary. For example, some modules are no longer being used but haven’t been removed.

Besides, not all extensions are developed by average programmers instead of experts. Due to that, these products have poor coding that affects negatively your site performance.

The thing you need to do now lists down all modules installed and… disable them one by one. In this way, you can see how they affect your website performance. If there is not a big change or no change, you should discard those extensions.

Check for Tampered Core Magento Code

From our perspective, Magento is a finely tuned application, which was developed and tested carefully by some of the best e-commerce masterminds around the world.

Because of that, it would be easier for us to make it worse than make it better. An experienced Magento developer will never develop in Magento core code.

However, after auditing our clients’ sites that are having speed issues, we find that code was edited.

The problem here is that if you are not a developer, it’s impossible to check whether your Magento core code was tampered with. You should hire a prestigious Magento developer/ agency to do that.

Checking on your Custom Admin Theme

Both Magento’s back-end and front-end performance highly depend on your theme files. It’s a bad idea to run a non-default Magento back-end theme.

Here is a quick way to check:

  • For Magento 1: Check app/etc/local.xml file and seek similar lines:
    <code><stores>
            <admin>
                <design>
                    <package>
                        <name>default</name>
                    </package>
                    <theme>
                        <default>MyCustomTheme</default>
                    </theme>
                </design>
            </admin>
    </stores></code>
  • For Magento 2: Look into app/design/adminhtml directory and see if there is a folder besides Magento.

In case your custom admin theme slows down the site, you should:

+) First, install a fresh copy of Magento that is similar to the version you have already had.

+) Second, install all the extensions you have on the original store. (not included ones that change the back-end theme)

+) Finally, compare 2 admin panels.

Disabling CSS/JS merge/bundle/minify in the Developer Mode

In developer mode, CSS/JS merge/bundle/minify can turn back-end and front-end into a very slow performance since we have to locate and merge CSS/JS files on every page request.

On every page request, static files are dynamically generated. On the contrary, when in production mode they are materialized.

Therefore, turning these actions off will reduce page load time significantly.

Here is how to do it:

  • You must access the admin panel, then go to STORES > Configuration > Advanced > Developer > Javascript Settings and CSS Settings
  • Set JS/CSS merge/bundle to “No”.

What happens here:

magento performance optimization


Benchmarking Default Cache Configuration/ Enabling Full Page Cache

The next solution that you can take into consideration is to enable caching for your Magento website. You have probably heard about it before.

Caching is a technique for pre-loading web pages or sections of web pages for faster content delivery and loading.

It entails downloading shared page elements (JavaScript, CSS, images, and so on) and storing them closer to the user so that the browser can retrieve this data from where it is stored rather than querying the webserver again. Since there are fewer server requests, loading speeds are speedier.

So, if your website does not have caching enabled, empower it to boost Magento stores’ speed right away.

Although Magento can be configured to use different storage media for cache and session files with many flags and settings (E.g.: Redis, Memcached, APC,…), we highly recommend you reset to Magento defaults to speed up your site performance.

More importantly, remember to enable the full page cache:

Accessing your admin panel, go to SYSTEM => Cache Management => turn it on.

Enabling Varnish Cache

Enabling Varnish Cache is an effective way to optimize Magento’s e-commerce website performance.

Accessing your admin panel, go to SYSTEM => ADVANCED => Full Page Cache => Select Vanish Caching in Caching Application.

magento full page cache

Running updated Magento version

The basic way to help you achieve better website speed is to update the store to the latest Magento version.

We all know that the Magento team releases new versions regularly. Updates are always accompanied by new features, performance enhancements, and bug fixes.

Applying the updated platform version is another powerful measure that ensures overall performance improvements for your store, not only about the load speed.

Therefore, you should check whether your store is running on the latest Magento version or not and update it when necessary.

Optimizing every single image on the site

Images are undoubtedly vital for an e-commerce website. You can attract users’ interest by using high-quality images. In addition, you cannot sell or promote your product unless you include high-quality product images.

On the other hand, high-quality images are frequently large. It will dramatically slow down your website. As a result, image optimization on the Magento store is essential so that you can deliver a faster website. Accordingly, ensure that any image you upload is compressed before being uploaded.

You should compress and always save product images in JPEG format and logos in PNG/ SVG format.

Set Up Content Delivery Network (CDN)

Another useful tip, in addition to clearing the database and logs, is to use a Content Delivery Network (CDN) which is a network of many computers linked together via the Internet that work together to deliver content to customers.

Instead of connecting directly to the main server, the client will connect to the nearest server to obtain data using CDN. Then, using a CDN to access data speeds up the loading of your pages.

Accessing your admin panel, go to STORES > Web > Base URLs (Secure) > Add your HTTPS URLs.

set up cdn to improve magento website speed

Moving to PHP 7

From our experience, moving to PHP 7 can improve your Magento e-commerce website performance by nearly 25%.

magento e-commerce website optimization

Fortunately, most of the hosting companies now support PHP 7. If you are running your own VPS or dedicated server, you should spend time installing PHP version 7.

Enabling Flat Categories and Products

The read speed of a database is one of the major causes of a slow Magento e-commerce website. To resolve this problem, you must enable the Flat Catalog.

Accessing your admin panel, go to STORES > Configuration > CATALOG > Catalog > Set Use Flat Catalog Category & Use Flat Catalog Product
to Yes.

how to improve magento ecommerce website speed

Cleaning logs and database

Database read speed is by far one of the most common causes relating to the Magento speed issues.

By default, Magento logs are kept for up to 180 days. This massive amount of data can ultimately put a strain on your database, slowing down your Magento website. Therefore, it is advisable to clean the overgrown logs and database on a regular basis in order to keep your Magento e-commerce website operating at a good pace.

You can enable log cleaning in your admin panel. In addition, you can specify how long the log should be kept. To do so, in the admin homepage, go to Store > Configuration > Advanced > System > Logs. Then, in the “Save Log” field, enter a value, and finally save the changes.

Utilize Magento Page Speed Optimization Extensions

Installing the Magento Page Speed/ Performance Optimization Extension is the final solution on the list that you can use on your website. The extension is able to pump up Magento store speed by optimizing your store’s CSS, JS, HTML, and image files.

Additionally, Magento Speed Optimization plugins can shrink the initial load of content, compresses images, and clears the page speed cache. As a result, those will prevent Magento stores from having long category pages full of lagging images and dramatically speed up the site.

In general, the cost of such Page Speed Optimizer Extensions for Magento will range between $109 and $599.

Conclusion

To summarize, Magento speed optimization is undoubtedly crucial. When you increase the speed of your website, you are providing more than just a better user experience.

As a result, increasing the speed of your Magento stores contributes to positioning and differentiating your company from competitors, accruing higher points in the eyes of users. All of this is geared toward the final goal of increasing revenue for your Magento store.

If you want to have a Magento 2 website that loads up quickly and runs smoothly, you have to find out all causes and apply the solutions mentioned in this post.

speed up magento 2

Last but not least, among the above-mentioned Magento speed optimization solutions, upgrading your website to a Magento Progressive Web App is the most effective way. Find more about our Magento PWA development services.

Read More:

How To Drive More Traffic To Magento Websites

How To Enhance User Experience In Magento Websites?

How To Improve Magento Mobile Friendliness?

How To Use Custom Local Storage & Cookie Storage In Magento 2?