Magento 2 site speed: Ways to improve effectively


Magento 2 site speed is quite an important step to reach good traffic to your store. Sometimes store owners pay a lot of attention to design, sales, or social media marketing activities, but completely forget about site performance. Remember the site speed always forms the first impression. Find out more information about Magento 2 site speed in our blog post Magento 2 site speed: Way to improve effectively.

1. Magento 2 System Requirements

The server is the core. In case the one you picked is not functioning smoothly, you won’t have good Magento 2 site speed.

Before start performance optimization in Magento 2, we strongly suggest you place your store on the dedicated server. While choosing the host, run a check on these categories:

  • Use the dedicated server or VPS, do not pick shared hosting option;
  • Check the following System Requirements for Magento 2:

Operating systems: Linux x86-64. Linux distributions such as RedHat Enterprise Linux (RHEL), CentOS, Ubuntu, Debian, etc

Composer: Latest stable version. Composer is required for developers who wish to contribute to the Magento 2 codebase or anyone who wishes to develop Magento extensions.

Web servers: Apache 2.2 or 2.4. In addition, the apache mod_rewrite module must be enabled. mod_rewrite enables the server to perform URL rewriting. For more information, see our Apache documentation. NGINX 1.8 (or latest mainline version).

Database: MySQL 5.6 (Oracle or Percona)

PHP: 5.6.x 5.5.x, where x is 22 or greater 7.0.2 (supported by Magento version 2.0.1 and later only)

Required PHP extensions: bc-math curl gd, ImageMagick 6.3.7 (or later) or both intl mbstring mcrypt mhash openssl PDO/MySQL SimpleXML soap xml xsl zip PHP 7 only: json

PHP OPcache: PHP OPcache is strongly recommended to be enabled for performance reasons. The OPcache is enabled in many PHP distributions. To verify if it is installed, see our PHP documentation for CentOS or Ubuntu. If you must install it separately, see the PHP OPcache documentation.

PHP settings: Particular PHP configuration settings, such as memory_limit, that can avoid common problems when using Magento are recommended.

SSL: A valid security certificate is required for HTTPS. Self-signed SSL certificates are not supported. PayPal: You must use libcurl version 7.34 or later for Transport Layer Security (TLS) version 1.2 support required by PayPal.

Mail server: Mail Transfer Agent (MTA) or an SMTP server

Magento can utilize the following technologies: Redis version 3.0 for page caching Varnish version 3.5 or latest stable 4.x version for page caching Memcached latest stable version for session storage with either Memcache or Memcached PHP extensions (latest stable version) Magento Enterprise Edition (EE) only: Apache Solr 4.x RabbitMQ 3.5; Three master databases.

2. Enable Flat Categories and Products

One of the top reasons for Magento 2 site speed issues with database read speed.

To fasten the read speed of the database you should enable Flat Catalog. This will reduce the number of joins (joins between tables) when showing products and due to that, the MySQL query complexity will be reduced.

Go to backend, STORES -> Configuration -> CATALOG -> Catalog -> Use Flat Catalog Category and put “Yes

Enabling Flat categories in Magento 2

Enabling Flat categories in Magento 2

3. Merge CSS and JS Files

Huge CSS and JS files apart from making your frontend look fancy can drop your website loading speed. Luckily, there is a way to lessen their influence in Magento 2.

  1. Go to backend, STORES -> Configuration -> ADVANCED -> Developer -> JavaScript Settings
  2. Merge JavaScript Files -> Yes
  3. Minify JavaScript Files -> Yes

Merge and Minify Javascript in Magento 2

Merge and Minify Javascript in Magento 2

  1. Go to backend, STORES -> Configuration -> ADVANCED -> Developer -> CSS Settings
  2. Merge CSS Files -> Yes
  3. Minify CSS Files -> Yes

Merge and Minify css in Magento 2

Merge and Minify css in Magento 2

Don’t forget to press Save Config after you are done! It’s good for Magento 2 site speed.

4. Content Delivery Network

CDN, or Content Delivery Network, is an interconnected system of cache servers that use geographical proximity as criteria for delivering web content. It actually helps your visitors to load pages faster as a result.

There are many types of CDNs, just look through features provided, geo coverage and choose the one you like.

One of the Magento 2 features is out-of-the-box support of CDN and here’s where you may find set up for it: STORES -> GENERAL -> Configuration -> Web -> Base URLs (Secure)

Enable CDN in Magento 2

Enable CDN in Magento 2

5. Caching

Caching can significantly speed up Magento 2 on the localhost too. Magento 2 has a variety of caching options, here’s where you can find them: SYSTEM -> Cache Management

Cache settings Magento 2

Cache settings Magento 2

Here you will find caching options of your Magento store, click on the ones you need, select Enable option and click Submit Page Cache can significantly reduce server response time and total page load time as result.

But M2 creates cache instance for each page (categories, products, etc) only after visiting this page and usually cache lifetime less one day.

Magento 2 module Page Cache Warmer can automatically visit pages without cache and warms cache for these pages. It’s good for Magento 2 site speed.

6. Images Optimization

Before any image upload, make sure it’s compressed . There is no need for huge images beyond your layout capabilities.

Also, pick the format that suits most of your needs. For Magento 2 site speed up, with a tremendous amount of product images, it is even more crucial not to overload the site. The suggestion we have for you: use JPEG format for Product images. It is more suitable for pictures than other formats as you can compromise quality for less size. On the other hand, using PNG or SVG for layout and logo is way more beneficial.

If you already use .png images for catalog, you can reduce image size using pngquant utility (it reduce image size up to 80%).

This simple command will compress all .png images in the /pub/media folder:

for file in `find pub/media/ -type f -name '*.png'`; do echo $file;pngquant $file --output $file -f;done

Try out our  Claue – Clean, Minimal Magento Theme an excellent template for a modern and clean eCommerce store with 11+ homepage layouts and tons of options for shop, blog, portfolio, store locator layouts and other useful pages. Claue will meet & fit any kind of eCommerce sites as you imagine.

magento 2 site speed

Claue achives a highest page Magento 2 site speed score for its in-depth
theme speed optimization

7. Magento Updates

Tiny simple tip for Magento 2 site speed: do not forget to update your store. Magento team is constantly working hard on improvements in performance. So don’t miss out on any!

Let’s sum up the key points of Magento 2 Site Speed

  1. Don’t forget to enable flat products and categories to ease the MySQL queries.
  2. Merge CSS and JS files to make the user experience enjoyable.
  3. Implement CDN for your store – Magento 2 supports it out-from-the-box.
  4. Have caching enabled.
  5. Do not overload your website with high-quality images where it is not necessary.
  6. Don’t forget about your CMS updates.

Level up your website with ArrowHiTech – official partner of Magento

Our own Magento development support services is plus the option for monthly support packages. It is to make sure your online business always remains in top form. And of course, there are countless other developer websites that can be easily found and perused as well, especially push your Magento 2 site speed.


ArrowHiTech Development Agency

Our Magento 2 Products:


Magento 2 Theme collection on


Some extensions of Magento 2 extensions collection on

609 Total Views 1 Views Today