How to Speed Up Websites in Magento 2

We are living in the period of e-commerce prosperity when online shopping is not only a new wave of living-in-style anymore. Now it has really been becoming an essential part in life of every seems-always-busy person, like us, because time is always a huge matter. Unfortunately, even Magento 2, which is the latest version of current market leader among open-source e-commerce platforms: very robust and highly scalable, still keeps its users somehow annoyed by this timing issue. Despite all amazing functionalities and flexibility, Magento 2 - based website owners must have realized that the low speed situation is getting worse and worse overtime and they are losing their customers’ good impression if no solution is immediately applied.

Why does your Magento site get slower?

In fact, the speed of default Magento 2 sites still can not bring customers satisfaction. And after running for a while, that speed even disappointingly decreases. You know, there are so many reasons for that, raising from various ranges of problems that we can not fully explain down here. However, followings are some common causes:

 alt="speed-up-website-Magento-2" - Your web server

 - Overgrown database & logs

 - Slowness of Magento default cache engine,

 - Extension overload

 - Sizes of images on the site

So, what are practical solutions to speed up your site?

Just like various things can slow down your site, there are also many ways to help improve speed of your sites and keep a little more attention of visitors to your offers. Moreover, to get the best result in boosting up its speed, you need to think about combination of different actions. But in the limited scope of this article, it’s impossible to clarify every act in details, so we introduce some solutions here for your concerns and maybe your further research. 

Take careful considerations on which server provider to cooperate with

Your host certainly has huge impacts on how well your site runs and how fast it can be. In the frontend, it looks quite simple when users just need to click on photos, or hit buttons, or select links then so many other things will appear to offer countless choices. But behind it all is a whole process of data, information being transferred back and forth which is designed very complicatedly to ensure the timing manners. Beside price and other server configuration/ installation, you may think about whether they have Magento experts to support you with issues raising from Magento itself.

Clean database & logs

During your business operation, and even when you scale it up, the database and logs keeps growing larger. By default, Magento keeps logs up to 180 days. And your overgrown database will surely keeps things that may not be necessary. All of them must slow down your site significantly.

Cache configuration

Default cache engine in Magento also worths a look. As many reviewed, though it used File System that is supported by all servers but it’s the slowest one. Try another external cache such as APC, Memcached, Redis, especial Varnish when you have a huge database along with larger scaled busines

Only install necessary modules

Choose wisely only which extension for your site to perform best. When you add any unnecessary module to your site, that means you add another unnecessary to load for the system. And removing a module can not be done simply by making it disable, it’s still there in the system and that’s when a developer’s work  is needed to do some coding things.

alt="Speed-up-website-Magento-2"Image optimization

More than 50% data of e-commerce websites are usually images not only for visual effect but also simply because it is much more persuasive to customers when they can see the product other than just be told about it. In this case, instant-like loading time is really a challenge due to image sizes. Therefore, there is a way to  make everything on the site appear quicker is to reduce their sizes, but the side effect is that the visual quality of the store will be much lower. You still can consider the trade-off to decide whether to apply this easy method.

So, the question is: what if you don’t want to reduce image quality but still manage to improve initial loading time? We know an answer lying in a extension that can help you in this case: Lazy Loading Images for Magento 2 developed by BSS Commerce. It’s a really helpful module which allows images to be loaded only when customers scroll near to it, leaving the priority to other content that customer may need to see first. The do worth a further look.

Defer parsing of JavaScript

When loading in the site page, JavaScript code really take a longer time to be loaded than others which makes other content in the same page not be shown quickly enough. That leads to the idea to postpone loading all those JavaScript code until the last moment possible. But how to make that idea practical? You may need a developer to do his things to interfere into normal loading order of code lines: rearrange the order and leave the JavaScript down to the end. Or an extension also can do it for you: Defer JavaScript for Magento 2, powerfully accelerate loading time that is golden-value for customer attraction. This module will defer JavaScript loading by putting these files till the bottom of page after all HTML and CSS. Remember how extension overloads can slow down your site? Well, this one is definitely not one of those redundance.

Conclusion

Of course, there also other ways to speed up a Magento 2 site depending on different causes, as mentioned before. But we really hope that you find it helpful somehow to know about those common solutions. As for concerned useful extentions, please do not hesitate to contact us if you need any further information. Enthusiastic, responsive supports are guaranteed.

Leave a Reply