Customers hate slow websites. If your website loads longer than 3-5 seconds, with each extra second you lose 12% of website views, about 16% in your conversion rate, and overall customer satisfaction drops by 16%. If you don’t want to lose potential customers due to poor website performance, you should probably start Magento performance optimization right now to speed up Magento 2 website.
The good news is that Magento is an open-source platform, thus, you have full access to its source code. So you can speed up Magento 2 backend as well as make any changes to its frontend for Magento performance optimization. Some of the issues explored below can be easily eliminated without extra expenses added to the Magento development services. Others require decent programming experience.
Let’s see what the most valuable Magento issues optimization tips are, and then decide which of them can or should be applied to your online store.
Vital Metrics to Be Considered for Magento Performance Optimization?
Although Google proposes its own recommendations for a website’s load time (2 seconds or less), every customer has their own preferences and ideas on how fast a site should load. The main rule to stick to is this: the faster the load speed, the better.
However, to have a true idea about Magento performance optimization, it is not enough to just measure the full load time and stop there. There are several other important time indicators to track when running a Magento performance issues audit:
- Time to First Byte (TTFB) – the time needed for the first byte to reach a user’s browser after a connection to the server has been established.
- First paint – an important, but not typically regarded, point at which the user gets an indication that a page is loading (display of the background color, etc.). Before this moment, the user can only see a blank page. However, this timing does not show how fast the page load speed is.
- First Contentful Paint – the timing that shows the moment when the first content on the page is painted. This can be an image, text or any other consumable information.
- DOM interactive – the point when all HTML has been loaded and parsed by the browser, and the Document Object Model (DOM) is already built. (DOM is the way a browser structures HTML)
- Onload – the moment when all the resources, files and other content on the page have been downloaded in full.
What are the Main Magento Performance Issues and Ways to Eliminate Them
The easiest way to get an idea of your Magento 2 store performance is to test it in one or several of the most popular tools. Magento performance testing tools are made specifically for website owners to discover Magento performance issues and for up-to-date tuning.
Here are the tools we constantly use to test and then run the Magento performance optimization for our clients’ online stores.
Google PageSpeed Insights
Pagespeed Insights is a tool that grades results on a scale from 1 to 100 points – the higher your mark, the more optimized your website is. Any mark above 85 points means your site is doing really well. In turn, any mark below 85 points means you need to run Magento 2 optimization, asap. With this tool you can discover Magento issues for both mobile and desktop versions of the tested webpage.
GTMetrix assigns page results in grades from A to F. Its reports are subdivided into 5 sections that include PageSpeed results, YSlow results, waterfall breakdown, video, and history. Seven various locations are available for testing.
Of course, to test Magento performance issues you can use other tools like WebPageTest, Yellow Lab Tools, and others, that can check any website and provide you with the performance summary. However, none of these services gives as much useful information about the site’s performance, and such detailed recommendations on Magento performance optimization, as PageSpeed Insights and GTMetrix give.
Magento Performance Optimization Tips: Problem vs Solution
Like we mentioned above, if the Magento speed leaves its users waiting, you can look forward to low conversions, low traffic, and of course, low sales. Since the main point of your e-commerce venture is to get those sales, you’ll want to nip this issue in the bud!
Magento performance issues affect almost every metric a business-owner should care about:
- Bounce rate
- Search ranking
- Page views
- And above all – revenue
Thus, retailers swiftly come to a common conclusion: The faster the website, the higher the conversion.
Do you need to implement performance tuning for your store?
Not sure where to start and how to run Magento performance optimization?
Now that you know how to check the performance of your Magento store, let’s see what parts of your site should be tuned.
First, look at the GTMetrix or Google PageSpeed Insights results of your website performance analysis. The bigger part of Magento performance pain points are already listed there. Let’s look closer at each of the most burning Magento performance issues business owners face every day and see how each of them can be fixed.
Hosting affects the Magento website speed on the server-side. The page generation time directly depends on the density of the websites on the physical servers and how loaded the servers are. The lack of hosting resources always results in Magento performance issues and slower load time. Sometimes, issues with a hosting result in the long downtimes, which irreversibly leads to the loss of both regular and potential customers.
Magento online stores always need a more powerful and reliable hosting ready for high loads, especially during periods of high customer activity, such as the holiday seasons. The choice of hosting is a critical issue when you need to improve Magento site performance.
Magento performance optimization should always start with a thorough revision of a current hosting provider and a hosting plan you are subscribed to. Shared hosting for $10/month is generally not a good choice for Magento. The greater your online store is, the more powerful and fast your hosting needs to be. In some cases, it is enough to upgrade a hosting plan, but some online stores will never show good performance until they are hosted on a dedicated server.
So, if you face any problem with your hosting, there are two possible solutions:
- 1. Upgrade your current hosting to an improved plan.
- 2. Switch to a Magento oriented hosting provider that will provide your online store with a dedicated server, as well as decent support and guarantees.
CDN is a network of connected servers that assist in faster delivery of the content. Copies of the website are stored at multiple data centers that are geographically distributed all over the world in order to provide users with faster and more reliable access to the website.
Using CDN is perfect for Magento performance optimization in case your store audience extends worldwide. CDN is especially life-saving for e-commerce websites during Black Friday, Cyber Monday, Christmas, and other busy retail days. Beyond better site speed, CDN can also offer you a more secure global network.
Enable a Content Delivery Network (CDN) for your online store. All the resources of the site will be copied to a network of connected servers, the location of which will depend on the location of your potential customers. When users open your website on their devices, the CDN determines which of the servers is the closest, and all the files (images, JS and CSS files, videos, and other resources) are transmitted to the user’s browser in the shortest way. As a result, server response time shortens and thus you increase Magento website speed.
Today, most reliable hosting providers offer a CDN connection along with their services. But if it is not available with your current hosting, you may look for CDN provider services in addition to your hosting plan. You’ll see, this is one of the most effective steps you should take for Magento performance optimization.
One of the most useful tools for Magento performance optimization is a Full Page Cache (FPC). Once you turn FPC on in a website admin panel, it allows for the server to retrieve and display the page in just a few milliseconds, without overloading. Thus, the website will process pages for visitors much faster.
This feature speeds up Magento backend and allows the website to remember the page content and not require its collecting again from scratch when it comes to repeated requests. Instead, users will receive the already assembled page.
Magento has at least 14 types of cache. Learn how to set up and enable each type from this guide.
#4 Unoptimized images
Scaled images and image optimization are incredibly important to represent your products well on the e-commerce website. Images hold a great significance as you can’t sell your products without including high-quality product photos.
On the other hand, heavy images can also cause Magento performance issues. Thus, it is necessary to optimize images so that you can deliver a faster website with quality visuals.
Every online store has hundreds of images, product photos, thumbnail images, banners, and other visuals. They are all used to attract the targeted users. But with every new image uploaded, you lose in website performance. To speed up Magento 2 you can adopt one of the following techniques.
Control the size of images
Don’t make them too large or too small. Any image in your Magento store should not exceed 1920px high and 1200px wide. Additionally, if you add images with poor resolution, they will appear blurred, which will not impress your customers.
Compress images wisely
To compress images without losing their quality, you can use one of the options below:
- Magento 2 extensions, like Apptrian will optimize images once they are uploaded to the website
- Command-line tools, like Gifsicle, Jpegtran, or OptiPNG, help to perfectly compress images without quality degradation
- Run the page test through the Google PageSpeed Insights tool, and get a detailed estimation of the image size you can save after their optimization
Use WebP images
Changing the format of your images to WebP will make images 30% lighter than JPEG, and on average, 26% lighter than PNG. To convert your current images into WebP you can either use online services like Online Convert, WebP Converter, Egzif or Adobe Photoshop with a pre-installed plugin like Telegraphics and AdoveWebM.
Every website includes a lot of small images, such as logos, stars, arrows, and other elements of the interface. When a user opens the website, the browser makes dozens of requests to the server to display all those images. A sprite is an image which contains all the small interface images in one. With a sprite, the browser will send only one request to get all interface images at once. Try one of these tools: CSS Sprites, and Instant Sprite to proceed with your Magento performance optimization.
When uploading images to your store, let customers find your store in Google by those pictures, and help search robots to index them easier. To make this happen, do the following:
- Write ‘alt’ tags and titles for images
- Properly name images
- Create sitemaps to help crawlers find non-indexed images faster
#5 Third-party extensions
In addition to the functionality available out-of-the-box, Magento provides ample opportunities for adding custom features. You can almost endlessly expand the functionality of your online store with the help of third-party extensions or custom-made functionality. However, each new feature adds new HTTP requests sent to the server. Consequently, it takes more time for the server to process all requests, which affects the Magento performance.
In addition, poor quality or unverified extensions can conflict with each other or with other useful modules. This, in turn, can not only degrade the performance, but also make the Magento performance optimization steps more complicated in the future.
With such a variety of third-party extensions available on the Magento Marketplace (about 4000), it is hard to resist the temptation to install another module. Often, on the initial audit of many of our clients’ online stores, we find dozens of installed Magento extensions, most of which are either not in use or affect the speed so much that the benefits are wasted.
In this regard, we strongly recommend that you revise all third-party extensions that have ever been implemented in your store. You should completely remove from the e-commerce store all unused extensions. For those that perform important tasks, but significantly slow down a website, there are several possible options:
- 1. Address the extension support team. Tell them about your problem and ask if it can be solved on the provider side.
- 2. Replace the current extension with another one that will not harm your website performance.
- 3. Optimize the extension by yourself or with the help of an experienced Magento 2 developer.
Contact Professional Magento Development Company
If none of the above options serve your needs, the only next possible solution is to develop the needed custom functionality from scratch. This will help to significantly speed up Magento website and improve the overall performance of your online store.
#6 URL redirects
Sometimes redirects are essential, especially when you need to tell the server that the page address has been changed. In such cases, 301 redirects help to avoid 404 errors. However, no matter how useful 301 redirects can be, when it comes to conversions, they are nothing but serious performance killers. The reason being that redirects increase your round trip time (RTT) and thus the time for loading the HTML increases too, even before the browser starts to load other assets.
Redirects are also killers of the Time To First Byte (TTFB) and, consequently, of website performance. The TTFB is fixed once a browser gets the first “200 OK” response from the server. Although redirects do not make Magento website loading very slow, they are the reason for another issue. When it comes to Google, officially TTFB is considered the main performance indicator of a website, and the better your website performs, the more chances you have to reach the top of the search results. So Magento TTFB optimization is a must-have.
Although it is almost impossible to completely avoid redirects, to speed up Magento 2 you should follow Google’s recommendations and minimize them.
Nowadays, it’s generally accepted that server response time should be less than 200 ms. That’s why, if your website shows a lacking response time, your first move should be to minimize redirects or, even better, eliminate them. As a bonus, you will reduce server response time (TTFB) in any Magento 2 website.
#7 Server requests
The number of HTTP requests and the server response time are other factors that cause Magento performance issues. The more requests, the longer the server response time is, and the longer it will take a page to be fully loaded. The number of server requests depends on the amount and type of content on the page that is expected to load. Every picture, every JS and CSS file, and every other separate element of the page create a separate HTTP request.
It’s obvious – you should make fewer HTTP requests from Magento.
To speed up a Magento 2 website you want to reduce the number of these requests and help the server process them faster. To minimize server requests you can use CSS sprites, optimize code, use fewer fonts, merge JS and CSS files, or apply other optimization techniques.
Reducing the number of requests is one of the most helpful methods of Magento performance optimization. Particularly, the majority of performance optimization steps are aimed at reducing the number of these requests. So, by applying the Magento optimization tips mentioned in this article you will cut the number of requests and your website performance will skyrocket.
#8 Unoptimized code
Buggy code can be found in many places throughout the website. However, most often this issue arises after the integration of poor quality third-party extensions or custom features added by inexperienced Magento developers.
Code optimization means thoroughly reviewing the existing code and its further refactoring. Some code may contain redundant lines, strange variables, spaghetti code, etc. A code review will fix all those issues. Developers can define places in the code that should be optimized in three ways:
- 1. Manually.
- 2. With the help of specific automatic tools that are part of a specialized software.
- 3. With the help of a built-in compiler.
In some cases, with the help of a code optimization it is possible to improve Magento site speed by 20% or even more.
#9 Other Magento server-side optimization opportunities
The bigger part of loading processes are performed on the backend of the website. The speed of your website load time depends directly on the load amount and processing time. How to speed up Magento backend? We recommend that you apply the following steps.
Merging and minification can be done in several ways. Such tools in Magento 2 are available both out-of-the-box and with third-party extensions.
Enable GZIP compression
Fix 404 errors
Missing pages and missing files throughout your website result in 404 errors. Such errors may cost you on average from 60 to 100 Mb of memory just to return that 404 error code.
To avoid 404-page Magento issues, use redirects or design such pages in a way that users who land on a non-existent page do not feel lost and can easily find a way to the page they were looking for.
#10 Keep your Magento 2 store updated
The Magento team is constantly working on improvements for the platform. With each new update, Magento 2 page speed shows better results and provides developers and e-commerce business owners with wider opportunities for tuning functionality and Magento performance optimization.
By not updating your Magento store, you miss not only the newest features, but also security patches. This makes your resource an easy target for hackers.
Performance matters! Implementing Magento performance optimization steps is an important and complex task that requires more than just a desire. There are so many possible elements that can cause bottlenecks. Of course, some of the listed tips (for example, image optimization or change of the hosting provider) can be performed by a non-tech-savvy merchant. The rest of them require at least some technical knowledge.
To find the major bottlenecks in your website performance, you should first test your store with one of the performance analyzing tools like GTMetrix or Google PageSpeed Insights. This will give you superficial data about the current website performance and indicate the points to be optimized.
We hope you now know how to make Magento website faster and are ready to confidently start down the Magento performance optimization path. Still, if you’ve got any questions, need any clarification, or are looking for professional assistance, feel free to contact us anytime. We will survey your online store and come up with a complimentary assessment outlining your Magento performance issues optimization techniques and solutions.