Magento e-Commerce. Improve performance with these 10 tips.

Justina Janeliunaite
4 min readApr 16, 2020
By Justina Janeliunaite

Magento, written in PHP and created using Zend Framework, is trusted by thousands of brands and is one of the most popular e-commerce platforms in the world. Other great CMS or platforms for e-commerce are — WordPress with the WooCommerce extension, Shopify, BigCommerce. I chose Magento due to it’s flexibility, scalability and innovation.

We all know how important it is to keep our page loading time low. Each additional second may cost us a customer, a sale. Unfortunately, due to increasing number of logs saved, processes carried out, growing database, we may see performance decreasing. Here are some tips, which will help you improve Magento performance.

1. Magento is a database system and one of the best enhancements you can make is to properly configure your MySQL server. MySQL’s query cache parameters are of high importance and can be modified via my.cnf file:

query_cache_type=1query_cache_size=32Mquery_cache_limit=2M

2. Enable all Cache Types via the Admin panel. While Magento already comes with built-in caching application, you may achieve better performance by implementing a third-party solution, like APC; Memcached. Enable all Cache Types via “System” > “Cache Management”.

3. Configure CDN — content delivery network. It is a system of distributed network servers, that deliver your Magento content to end-users based on their geo-location; meaning shorter load time. HTTPS CDN configuration is highly recommended.

4. Gzip compress HTML, Javascript, XML files and stylesheets at the server level. In order to achieve this, first of all, ensure that mod_deflate is set to ON in Apache. Then add the following to your .htaccess file.

5. Delete or Disable any non-essential Magento extensions. This is sometimes overlooked, but it is simple and effective. Disable modules via -

app/etc/modules/*.xml

6. Enable JavaScript and CSS merging to reduce the number of requests.

For JavaScript: select Stores > Settings > Configuration > Advanced > Developer > JavaScript Settings > Merge JavaScript Files > select YES > Save Config.

And the same for CSS.

7. Activate flat catalog. It is recommended that you test the configuration in a development environment first. This feature is especially useful for large e-commerce stores with thousands of products. Once you enable the flat catalog for both categories and products, the data will be merged into one table; meaning increased performance by responding to MySQL requests faster. This can be achieved by setting YES in “Use Flat Catalog” via Stores > Configuration > Catalog.

8. Image Optimisation and limiting the number of products on a product overview page. We know our customers love product images. We also know that thousands of products with multiple pictures contribute to page loading time. You may choose to install a Magento extension (both free and paid available in the marketplace), or carry out the task manually and upload already optimised images to your FTP server — depends on the number of products, images and your preferred workflow. Test and limit the number of products displayed on a product review page.

9. Clean up Magento database and logs. By default, Magento will keep logs for up to 180 days, meaning that your database will grow. By making amends to the default value in Stores > Configuration > Advanced > System > Log, you will save space — perhaps 7 or 14 days would be suitable for your store.

10. Update Indexes. Indexes in your Magento Admin panel are used to speed up MySQL queries and the system updates them by default, however, sometimes manual updates are needed. Simply select all and reindex via System > Index Management.

To sum up, Magento is a fantastic e-commerce platform, capable of supporting thousands of products and performing great. By making the above changes to MySQL, using Gzip compression, updating and maintaining your modules, merging JavaScript, CSS files and, of course, by ensuring a good hosting service, you will certainly improve your Magento system performance.

Further information and references:

--

--