How to Optimise your Magento Store
- Choose a fast web host
Quite possibly the most important choice you make is to choose a good web host before even trying to optimise your Magento store. Look for a hosting provider that has ISO2001 and is PCI compliant. The hosting provider should have high connection speeds and for when you need it quick support and a robust SLA.
For Magento, a dedicated server is required we would advise against cheap shared hosting platforms.
- Optimise Magento store by setting up Content Delivery Network
The purpose of implementing a Content Delivery Network (CDN) is to improve users’ experience. A CDN is a system of distributed servers that deliver web content to users from multiple locations. For example, if the origin is in the United Kingdom and the user is in Washington (US) this user can download content from the nearest local server in the US instead of reaching long distance from the UK server.
- Optimise your pages
We all like to use high quality images on Magento stores to encourage user experience and engagement. However, heavy images can lower your site’s loading speed and therefore you need to compress them before uploading on your site.
Lossless compression can reduce the file size up to 70% without compromising its quality. The “Save for Web” function in Photoshop can help you achieve this purpose.
- Uninstall unnecessary extensions
Modules can be disabled in backend by going to:
Stores > Configuration > Advanced > Advanced
- Manage your Magento logs
The Magento log cleaning feature is disabled by default in Magento backend. Logs about frequently read pages, frequently compared products and best sellers are kept for 180 days before being deleted by the system itself. Over time, this amount of information can be a large overhead in your Magento database.
The easiest way to manage your logs is to change saved log days. This can be done following this path:
Stores > Configuration > Advanced > System > Log
Choose a desired number for your “Save Log Days” to determine how long Magento should keep your logs. Choose “Yes” for “Enable Log Cleaning”. Click “Save Config” to save your changes.
- Keep on top of the latest Magento updates
This may seem like an obvious one but it’s a very common for people to install Magento and forget about it. Updates come with fixed bugs, improved security and performance. Before you perform an update we recommend:
- Check the release notes to see the latest version of Magento. You can see it either under the navigation bar or in your inbox in the Admin Panel.
- Always backup your data, in case the update goes wrong.
- Update your site when there is the least traffic to avoid glitch or confusion.
- Optimise Magento store by utilising cache
Magento site loading speed is boosted by the Magento cache system. There are several types of cache that can be individually enabled or disabled. A combination of APC + Varnish + NGINX + Memcache has proved to yield good results.
- Enable gzip compression & mod_expires
Gzip compresses your users’ requested pages before sending them to the browsers and results in shorter loading time. According to GTmetrix, gzip compression should be on the top of your Magento optimisation checklist.
You can also leverage the browser’s caching to determine how long images, JS, and CSS should be stored locally in web browsers. Browser caching will help your site load faster because browsers have to download less data, and thus give your users an easier time navigating through site pages.
- Optimise Magento store by tuning MySQL server
Every time a Magento webpage is loaded, the database server must work on a series of queries. These queries are handled on an individual basis, with data fetched from the disk, processed, and finally returned to the user.
MySQL provides query_cache_size – a configuration command that tells the server to store query’s result in memory, instead of fetching it all the way from disk. The size you can set for this cache depends on how much memory your MySQL server can handle.
A recommended setting for your my.cnf is as followed:
query_cache_type = 1
query_cache_size = 32M
- Periodically re-indexing your data
Indexing is the default mechanism of Magento to ensure that your store works fast. As the data for your site changes, Magento must re-index this data so it can be displayed on your website. Without indexing, Magento will have to calculate the price of every single product therefore loading price can be slow.
Indexes help speed up MySQL queries. In order to manually index your data, follow this path in the Magento admin panel:
System > Index Management > Reindex Data
This is not an exhaustive list for the optimisation of your Magento store. Depending on your set-up and usage. Further tuning may be necessary to ensure your store is running optimally.