Posts

The Death Of Magento Performance: 13 Common Guidelines

The world is moving fast, and people’s attention span is decreasing. Even for online shopping people opt for it because they can save a lot of time and efforts in the process. So, speed and good Magento performance are central to the success of any eCommerce store. A 1-second delay in page response can result in a 7% reduction in conversions. The speed of your business website matters. Fast-loading websites perform better on every front: higher search ranking, excellent user experience, and better user engagement. Most importantly, quick-loading websites deliver higher conversions and higher revenue.

When we are talking about the Magento Performance site, it’s not just about the page load speed, but every function and process a customer has to go through from searching for products to the checkout process. Performance optimization is an integral part of Magento development and cannot be underestimated. Magento 2 has fixed many issues with the previous version, but there is still a lot you can do to improve the performance of your Magento 2 site.

Magento Performance: 13 Common Guidelines

There are many Magento Performance optimization techniques out here. In this post, I am going to share with you some simple tips to speed Magento 2 store.

Server Requirement & configuration optimization

As you may know, the server is the key factor for Magento Performance. If your picked server is not good enough you can’t have a good website. Hence, to have a good website, we suggest you replace it with a dedicated server. Moreover, when you choose a host, please keep these categories in mind.

Code and Database Optimization

Regularly Improve your database performance using query indexing and broad optimization scripts. Use your DB management system to optimize the database on the frequent basis. Let’s me show you little tips to optimize via MySQL configuration. You can try and get the following settings in my.cnf

  
query_cache_type = 1
query_cache_size = 32M
query_cache_limit=2M
php_value memory_limit 128M

Optimize Magento database by Cleaning log

If you are wondering when you need to optimize Magento database, you can check your site. In case you have around 200MB, it is time for cleaning.

Enable JS & CSS optimization

CSS and JS file help your front end look better. Yet, they are one of the core factors that slow down your site speed. Luckily you can cut influence in magento 2 by enabling JS & CSS optimization.

To enable JS & CSS optimization: Go to Stores -> “Configuration” in “Settings” Section -> “Developer” in “Advanced” Tab -> Section “JavaScript Settings” (Fields “Enable Javascript Bundling“, “Merge JavaScript Files“, “Minify JavaScript Files” change to “Yes”)

css optimization

Go to Stores -> “Configuration” in “Settings” Section -> “Developer” in “Advanced” Tab ->-> Section “CSS Settings” (Fields “Merge CSS Files“, “Minify CSS Files” change to “Yes“)

css optimization

Use CDN

Implementing a Content Delivery Network (CDN) with Magento is one of the easiest ways to instantly see decreased load times which enables serving your assets from a location geographically closest to your customers and hence reduces latency and increases download speed for those assets. To set up CDN, please go to STORES -> Configuration -> GENERAL -> Web -> Base URLs (Secure) then insert your HTTPS URLs in here and bring your customers fast loading speed.

Images Optimization

You shouldn’t use images that are much larger than necessary. If your site requires a small image, such as 50 x 50, there is no need to upload a much larger file to get the same result.

Enable Cache for Magento Performance

Caching improves load speed response time on your Magento Store. A cached page will be stored after one visit or pre-generated and stored. Magento Enterprise Edition offers full page caching as a default option for the category, product, and CMS pages. To Enable cache Go to Stores -> “Configuration” in “Settings” Section -> “Catalog” in “General” Tab -> Section “Storefront” -> Fields “Use Flat Catalog Category” and “Use Flat Catalog Product” change to “Yes”.

css optimization

Minify CSS, JavaScript, and HTML

Minifying removes all unnecessary characters from source code without changing its functionality. These unnecessary characters usually include white space characters, new line characters, and comments, which are used to add readability to the code but are not required for it to execute.

Enable Flat Categories and Products

One of the main problems that slow down Magento Performance 2 speed is the read speed of database; especially, in case your Magento 2 store has a large number of products. To enable flat-options: Go to Stores -> “Configuration” in “Settings” Section -> “Catalog” in “General” Tab -> Section “Storefront” -> Fields “Use Flat Catalog Category” and “Use Flat Catalog Product” change to “Yes”.

css optimization

 

Catalog Size

The larger your catalog, the greater the burden on your server(s) to load pages, especially when we’re talking about SKUs tipping over 100K. You can enable Flat Categories and Products to improve load speed.

Check Links

A broken link is a hyperlink to a webpage that doesn’t exist it’s a waste of your page’s load time.

Change to Production Mode

It is recommended to always upgrade your Magento system, your plugins, and other software your website depends on (to the latest version).

Change to Production Mode

Intended for deployment on a production system. Exceptions are not displayed to the user, exceptions are written to logs only, and static view files are served from `pub/static` only. New or updated files are not written to the file system.

php bin/magento deploy:mode:set production

Conclusion

In today’s world increasing page speed performance is getting more and more important for websites, especially for eCommerce stores, because users are becoming more demanding in terms of user experience. I have described how to speed up load times in Magento with recommending a number of solutions. If you are planning to increase Magento Performance and page speed on your website or mobile app then this article gives you the complete guide in less time and effort. You can also join the conversation if you have any other solution or idea which we can use to make it more attractive and easy. That’s all folks and feel free to contact us in case if you have any query.

References

Further reading

7 Easy tips to improve magento store loading speed in 2017

Magento is an open-source eCommerce platform with a large number of active online merchants using it. Magento is very robust with great flexibility, scalability, and customization. Most of the CMS or eCommerce platforms like Magento and WooCommerce are having issues with speed and their performance degrading over time. Why do we need to optimize Magento performance?

    • According to KISSMetrics, 40% of the customer will abandon an eCommerce site if it takes longer than three seconds to load. More noticeable, an ONE-SECOND delay in load time can result in a 7% reduction in conversions.
    • As you know by now, Google is using site speed in web search ranking, and not only for Google but mainly for the User Experience (UX) on your eCommerce store.

In this article, we share some tips and tricks on how you can optimize Magento performance of your Magento based eCommerce store.

Tips to improve Magento store loading

1. Latest Version:

Always upgrade to the latest Magento version. Not only will you get more features and bug- and security fixes, but with every update, Magento performs better. You didn’t check every time to magneto website to for latest release, Magento does a good job of notifying you of important updates that become available within your messages inbox.

2. Enable Flat Catalog:

Magento uses the EAV model (entity attribute value) to store customer and product data. Enabling the flat catalog for categories and products merges product data into one table, thereby improving performance by responding to MySQL queries faster. If your eCommerce store has more than 1000 products, this can very beneficial.

Magento uses the EAV model (entity attribute value) to store customer and product data. Enabling the flat catalog for categories and products merges product data into one table, thereby improving performance by responding to MySQL queries faster. If your eCommerce store has more than 1000 products, this can very beneficial.
1. Login to your Magento Store as admin
2. Navigate to “System” → “Configuration” → “Catalog.”
3. Under “Frontend” change “Use Flat Catalog Category” and “Use Flat Catalog Product” to “Yes.”
4. Click on “Save Config.”
5. Clear the cache. The recommended way to do this is to delete everything from the /var/cache directory. You can also do it by navigating to “System” → “Cache Management” and clicking on “Flush Cache Storage” which is equivalent to deleting all the cache.

3. Cache & Indexers: 

There are many forms of caching that can be implemented with Magento. Combining NGINX + APC + Memcache + Varnish caching is a great way to success. Magento also comes with a built-in caching module as well. One more thing using Magento’s page caching. It reduces the web server processing load is taken off from the web server by serving pages already visited before from a cache which makes it a lot faster. There are lots of pages caching extensions available for Magento you can choose according to your requirement.

Using a PHP accelerator is another form of caching. They increase the performance of PHP scripts by caching them in their compiled state. You can use a PHP accelerator like APCXcacheeAccelerator  etc.

As we know Magento has lots of feature one of them is the indexer. Magento updates indexes on every object store by default, but in some cases, manual updates are required. Basically, indexes are used to speed up Database queries.

4. Code and Database Optimization:

Use a PHP accelerator like Zend and uninstall unnecessary PHP or Apache modules you don’t need or use. Improve your database performance using query indexing and broad optimization scripts. Use your DB management system to optimize the database on the frequent basis.

Magento has a compilation feature which has been reported to sometimes give up to a 50% performance boost. By default, Magento’s application files are searched in a certain order every time the page loads, which results in a lot of filesystem reads. In Magento admin, (top menu) System > Tools > Compilation, click Enable. This will take all the active scripts in Magento’s core structure and bring them to the front for faster website speed. The Magento compiler reduces these reads by copying all of these files into a single include directory and also caches ones that are used more frequently.

Optimizing your product images can dramatically increase the speed of your pages as this decreases their download times. You can compress them before uploading them using a tool like PhotoShop or there are a number of extensions you can use to auto-optimize them like TinyPNG Extension.

5. Merge CSS & JS:

Magento actually has a built in feature to concatenate (merge) your CSS and Javascript files into one file. This will reduce your total number of HTTP requests and in turn help speed up the loading of your pages. By using the advanced configuration in Magento admin, you can merge you JavaScript and CSS files, this reduces the load time. Please be aware that merging your javascript files may cause issues that need to be further resolved, but in the end, it certainly is best for your store.

6. Use CDN:

Implementing a Content Delivery Network (CDN) with Magento is one of the easiest ways to instantly see decreased load times. Using a content delivery network (CDN) such as MetaCDN enables serving your assets from a location geographically closest to your customers and hence reduces latency and increases download speed for those assets. Magento lets you define where certain assets (CSS, javascript, images, etc.) are loaded from such as a URL pointing to a CDN.  Magento CDN integration guide for details how to integrate the MetaCDN Site Accelerator into your Magento installation.

7. Hosting environment:

And last but not least, choosing a reliable and fast web host can be one of the most important decisions you will make when trying to improve Magento performance. We recommend staying away from shared hosting as they tend to overcrowd their servers and you will end up sharing resources between hundreds of website. We suggest going with a VPS like socialfoxhosting.comDigital Ocean, Linode etc. The reason is that you will be in complete control of your resources.

Conclusion

There are many ways to optimize Magento performance for your Magento based eCommerce site. Some of them we have discussed here. If you suffer from slow Magento performance, we can help you with Magento optimization to speed up Magento in no time! Making sure your eCommerce solution is running fast is one of the most important factors to your sales, SEO rankings, and overall best user experience.

For further reading