My Magento 2 is slow. How to solve it?
As they say, slow fires will smolder for a long time. Of course, it is, but not with regard to e-commerce sites. All your visitors will scatter if a page-load time exceeds at least 2 seconds.
By default, Magento 2 isn’t slow, however, if not set up well, the store will lag and load bit by bit.
How to fix Magento 2 slow loading issue?
First off, check all the platform basic system requirements, if the web service, database, PHP, memory, and stuff meet them. When it’s okay, continue with the configurations described below.
Update your Magento version
Performance improvements and better security are both achievable with new Magento releases.
- Log in to the Admin Panel and check your current version:
- Then hit the bell icon in the upper right corner to see if any updates are available right now:
- Choose to See All notifications, find the necessary updates notification and click Read Details:
- You will be switched to the latest version release notes, e.g.: Magento Open Source 2.2.3 Release Notes. Besides, you can subscribe to Magento releases mailing on the official website.
See how to upgrade Magento version to make things right.
Switch to PHP 7
Magento 2 supports PHP 5.6. However, the performance has been improved in the 7th version by 25+%.
Enable Varnish Cache
Why make Magento 2 Varnish Cache Configuration? By enabling the accelerator you can transfer much more traffic without load speed losses. When working in production mode, the option will take over caching of most of the website content.
Set Flat Categories and Products
One of the basic reasons why Magento 2 is slow lies in the read speed of the database. The Flat Catalog can solve the glitch and speed the process up.
- Once logged in, go to Stores>Configuration>Catalog tab>Catalog>Storefront:
Set the Use Flat Catalog Category and Use Flat Catalog Product fields to ‘Yes’. Click the Save Config button and clear the cache.
To make the code read-through and execution faster, go on with the settings:
- Then expand CSS Settings:
Set the Merge CSS Files and Minify CSS Files fields to ‘Yes’. Click the Save Config button and clear the cache.
Set up Content Delivery Network
Configure the CDN to step up your site load speed.
- While logged in, go to Stores>Configuration>General>Web>Base URLs (Secure) to add HTTPS URLs:
Save the settings and clear the cache.
Use lightweight theme and optimize the images
- Find a lightweight theme that caters for your taste;
- Compress all the images;
- Use logo in PNG or SVG format;
- Apply JPEG format for product images.
Install non-bug extensions
Surely, it’s difficult to find a module that will work smoothly. However, pay attention to the developer’s authority and reliability. If you happen to come up with a bugged extension, check for the latest updates. The issue might have been already fixed. Contact the support team or uninstall the extension.
Try our Full Page Cache Warmer for Magento 2 to automate the cache warming process. Warm important pages first and receive visual performance reports to manage the cache updating.