Magento 2 is a lightweight platform. It was built to serve thousands of users at once. But without the right optimization, you may end up with a site that is difficult to use and an eyesore to look at.
Why a slow Magento store is bad? Well, you can say it’s because users hate to waste their time. Their frustration leads to fewer sales and bad experiences. But that’s not all.
In this guide, we will help you make your store fast and snappy to use.
How to speed up Magento 2 website
1: Check out 3rd party extensions.
Magento 2 core is written by programming experts. There is not much room for improvement in the core code. That is normally not the case for extensions you can buy, or download for free. Some of them could really slow the site down.
To fix this problem, we should find out the cause of the page slowdown by disabling extensions to find the module causing the error.
After finding out the cause we start fixing them if you are a developer, or disable it and contact the developer support.
Here we take the example module VendorName_PluginName.
Disable the extension requires SSH access.
php bin/magento module:disable VendorName_PluginName
Enable the extension.
php bin/magento module:enable VendorName_PluginName
To check the module status we run the command.
php bin/magento module:status VendorName_PluginName
Modules can also be turned on and off via the app/code/config.php
Let value is not a disable module and value is 1 is enable module.
2.To Magento run at production mode.
When you install Magento for the first time it will run in Default mode. This mode is best used to configure and test your Magento store before you open it to customers.
Magento has 3 modes, default mode, developer mode and production mode. Default and Developer modes are slow. Make sure you switch to production before you open for business:
php bin/magento deploy:mode:set production
3. Enabling cache
You would be surprised how many times I fixed a client’s slow-M2 problem simply by enabling cache. “Of course it is slow” – I tell them, “Your cache is off!”.
Go to backend menu System > Tool > Cache Management and double-check the settings. It should all be green and look like this:
If your site suddenly becomes slow and unresponsive – check cache settings.
4. JS settings offer you the best performance.
Many elements on the web page were a problem a few years back, but all decent M2 web hosts should now run SSL and HTTP2.
5. Enable CSS/JS Minification.
This is another special Magento 2 feature that was absent in Magento 1. You now can minify JS/CSS files with no need for a 3rd-party extension.
Go to Stores > Configuration > Advanced > Developer > CSS Settings and set minification on:
6. Enable HTML Minification
Minified HTML, CSS, and JS files will load faster and take up less space on the server. Minification will boost your load speeds even more. It will cut out developer comments, replace variable names with shorter versions, and generally tidy up your code and reduce clutter.
Minify HTML is only visible as an option in Developer mode.
Find Stores > Configuration > Advanced > Developer > Template Settings.
Tick off “Use system value” to access the Minify HTML option.
Set it to Yes.
7. Choose the fastest hosting you can afford.
The hosting plan you choose plays an important role in the overall performance of your website. You cannot have a fast M2 store on a cheap VPS here.
Magento 2 needs a minimum of 2G ram and SSD, it can’t work well without one of the above so we need the best hosting we can do.
Speed Up your Magento 2 speed it’s depended on you to choose the most suitable one for your store, you just need to remember that the well-optimized and faster your personal development environment is, the faster your online store will be. I hope this post is helpful for you when optimizing Magento speed.
Those are the basic things we usually need to do to speed up Magento 2 web. If you need to optimize your website perfectly, contact Magepow, We will have great Speed Optimization Magento 2 solutions.
Hope this article will help you in some way, You can see useful articles in the next articles.