How to Increase Magento Website Speed
Page Speed is one of the important factors because if users find themself waiting for more than 5 seconds to load content, they will just leave your website and this will cost you a conversion. This will not only reduce the conversion rates but also impact the user experience.
In this article, we are going to learn about how to increase the speed of the Magento website. There are a lot of tips used for Magento 2 page speed optimizations out of which we have listed a few of them for your reference. Let’s first look into the reasons that directly affect the Magento website performance.
Magento, one of the leading and most popular eCommerce platforms loved by a lot of businesses. One main reason for this popularity is customizations and a lot of available extensions. This flexibility is great to manage any kind of requirements for your online store. But still, there are some developers and business owners complaining about the Magento 2 performance and website loading speed.
Why Does Magento Website Speed Matter?
The slow loading speed of the website results in a high cart abandonment rate and a bad user experience which will directly impact on losing important sales. It can also affect your SEO. Therefore, you have to work on Magento 2 page speed. Website loading time and performance should never be neglected.
Common Reasons Behind Slow Magento 2 Website
The main reason for this might be a lot of customizations and extensions added to the website. Another reason could be Magento hosting, which does not fit your website requirements. This should be a concern point for store owners as page loading speed has a direct impact on the sales of your business. The more time a website takes to load, the more people will leave your website without any purchase.
- Old and slow hardware that doesn’t meet your technical requirements.
- Not optimized configuration of MySQL, PHP, and other settings.
- Too many customizations
- A lot of 3rd party integrations or extensions are added to the website.
- Full Page Cache is disabled
Below are some of the important facts and stats on why a website with a faster loading speed is a crucial component for business owners to increase sales:
- Page abandonment rates increase more steeply between one and four seconds.
- Smartphone users expect websites to load as quickly as they load on the desktop.
- 79% of shoppers avoid shopping for the next time if they had a poor experience or the website was too slow.
- One second of delay in page response can result in a 7% of reduction in website conversion rates.
Magento 2 Speed Optimization Techniques:
1) Upgrade Your Store to the Latest Version of Magento
When it comes to Magento speed optimization, the most simple and tiny tip that you cannot forget is to upgrade your Magento store to the latest version of it, which is currently Magento 2.4.3 and If you are running your store on Magento 1, you should migrate to Magento 2.
Magento’s team is constantly working hard and making updates on improvements in performance, so make sure you don’t miss out on any of the latest updates.
Whenever there is any update or release in a new version, the performance will be directly improved along with the other tweaks. Therefore, it is highly recommended to migrate from Magento 1 to Magento 2 if you wish to improve the speed of your website.
Related: Advantages of Magento 2
2) Optimize server & system requirements
System and Server requirements are considered as two most important factors that can help to increase the speed of your Magento 2 website.
Server Requirement:
The server is the core part so instead of hosting the Magento store on a shared server, you should host your store on a dedicated server. Additionally, if your particular server is not working smoothly, then there is no chance that you will get a better website performance and speed, regardless of what other tips and techniques you use. So before starting the Magento 2 page speed optimization process, we strongly suggest you host your Magento store on a dedicated server or VPS hosting.
System Requirement:
You have to make sure that your server meets the system requirements for the latest version of Magento 2. Let us share with you that Magento 2 has specific system requirements but the 2 most important criteria are 2GB of RAM at a minimum and Solid State Disk (SSD). If you don’t meet any of these 2 criteria then you can’t expect a decent speed for your website. Updated Operating Servers, Composer, Web Servers, Database, PHP versions, SSL, PHP settings, Elastic Search, Mail Server, Required PHP Extensions, Cache System Requirements, etc. The latest updates in all these might change with time in the future. You can get all the up-to-date information on the official Magento documentation page.
3) Optimize your Images & Media Files
There might be tons of product images and other media files on your Magento store and there is no doubt that these media files and images can take quite a long time to load which will directly slow down the speed of your Magento store. These images and media files impact the website’s performance and speed if they are not optimized properly. To speed up the media content loading, a lot of tips and techniques are used.
Below we have listed a few of the key points for your reference:
- Make sure the uploaded images are compressed with properly maintained image quality.
- Try to pick the image format that suits the best as per your need.
- The product Image format is suggested to be in JPEG format.
- Additionally, if the layout and logo will be in PNG or SVG format then it will be more beneficial.
4) Enable Caching option
The incorrect caching setting from the backend is also one of the factors affecting the speed of your Magento website. There are chances that cache is off due to an unreliable 3rd party developer, designer, integrator, or any other member who has access to your website and forgot to turn on the cache settings. This carelessness can impact the performance and the speed of your Magento website. But this can be solved by enabling the cache quickly using the backend admin panel.
- Login to Magento backend admin panel
- Go to the Menu, System -> Cache Management
- Make sure that all cache types are enabled and the status of all of them is green.
This will help you to speed up your Magento 2 store. So if your website suddenly gets unresponsive and slow, make sure you check the cache settings.
Related: Magento 2 Cache Overview and Solution
5) Make sure you inspect every 3rd party extension installed
We know that the changes or improvements in the core code are not possible as it is written by programming experts of Magento 2 and there is not much to change in that. But this is not the case with the 3rd party extension that you buy and add to your website to advance and expand the website functionalities.
Some of these extensions really impact your website performance and slow down the website speed. So you should inspect each and every 3rd party extension added to your website and perform the extension audit. Make sure that all the 3rd party extensions added to your website are updated versions. In case you need any help, you can hire Magento developers who can check and ensure that all the extensions are of the latest version or not. They can even help you to suggest adding or removing the extensions to increase the speed of your Magento website.
Test all the pages, checkout process, turn off and on every module of the store, clear the caches, etc, and then check if there are any changes in website speed or not. Also, turning off and on the extension and checking the website becomes faster or not. All this will help you to identify the extension that affects your website speed and you will be able to take the action accordingly.
6) Turn the Production Mode on
Another great technique of Magento performance optimization is to turn on the production mode. Magento has 3 operation modes: Default, Developer, and Production. Out of all 3 modes, the production mode is the fastest one, so it’s better to use the production mode. Whereas developer and default mode are used while developing and debugging purposes, so make sure not to use them for the live site. To turn on the production mode, you need SSH (Secure Shell) access.
Follow the below step:
- Get the access details of SSH from your hosting provider and log in to find out what mode your website is running now.
- You need to type the command: php bin/magento deploy:mode:show
- Type the command to turn production mode on php bin/magento deploy:mode:set production
7) Don’t use the JS bundling
Magento 2 has a special feature called JS bundling which is nothing but a grouping of Javascript files to cut down the number of HTTP requests required to load the page. This would not be good for your website performance because activating JS bundling will create a large file with all the Javascript code which will impact the page load time. So, make sure that the JS bundling option is off from the backend: Stores > Configuration > Advanced > Developer.
8) Content Delivery Network
Leveraging the CDN (Content Delivery Network) can decrease the load time drastically and boost the speed of your website. Hosting website files and caching content in multiple locations across a large network of servers around the world. The closer the CDN to a user, the faster the content will be delivered to the users. This ensures that CSS, JS, and your product images load faster for your website user. So using a CDN will help to reduce the page load time.
9) Magento Core web vitals
For a good user experience, website speed has always been an important indicator. With the recent announcement by Google, web performance will be measured on a set of new metrics, known as Core Web Vital.
The three pillars and important metrics of Core Web Vitals: loading (LCP), interactivity (FID), and visual stability (CLS).
1. Largest Contentful Paint, LCP for Loading
How fast does the content appear on screen? LCP is simply the metric to measure the time taken to display the main content element or the largest piece of content of the web page to appear on the screen. Page should be loaded within 2.5 seconds
2. First Input Delay, FID for Interactivity
How much time does the web page react to user interaction? FID measures the time taken to respond to any of the user interactions while the website is still loading. It keeps a check on how swiftly a web page of your website responds to any of the user interactions like tapping, clicking, or hovering. It should be 100 milliseconds or less.
3. Cumulative Layout Shift, CLS for Visual Stability
Does content move around on the screen while your site is loading? CLS measures the unexpected layout shifts of your website like the movement of text, buttons, or links during the website loading. Optimal CLS score for a page is .1 or less.
In addition to this, you can also check the speed of your Magento website using Google Page Speed Insight, and based on the results, you can implement the necessary changes required.
Wrapping Up Magento 2 Speed Optimization Tips
Less loading time, faster page loading speed, and overall website performance are the key factors for a successful eCommerce store. Most of the customers tend to leave the website which loads the page too slow and whose performance is not up to their expectations. Our Magento 2 page speed optimization tips listed above will help you to speed up your Magento 2 store or you can simply consult with our ecommerce experts for assured assistance.