Making sure that your Magento website is running fast is a crucial factor to your sales, SEO, cart abandonment rate, bounce rate and most of all, the user experience on your website.
Prior to start working on your Magento Store speed Optimisation, you need to find out the current position of your website for performance and any areas that need optimisation efforts. This will give you an overview that will allow you to compare your current performance with the performance later after implementing all the speed optimisation tips suggested on this article (Online providers such as GTMetrix and Google Page Speed Insights are available for your use)
Our team of Magento 2 developers has developed this 14 tips ultimate guide on how to speed up your Magento store, putting together ways to improve loading speed of your Magento Ecommerce website.
- 1 1- UPDATE AND SECURE
- 2 2- IMPLEMENT CDN (CONTENT DELIVERY NETWORK)
- 3 3- CACHING
- 4 4- USE FLAT CATALOG INFORMATION FOR YOUR PRODUCTS
- 5 5- IMAGE OPTIMISATION
- 6 6- MERGE CSS AND JS
- 7 7 – ENABLE MAGENTO 2 COMPILATION
- 8 8- LOG CLEANING
- 9 9- REDUCE EXTENSIONS AND MODULES
- 10 10- OPTIMISED EXTENSIONS
- 11 11- MySQL CONFIGURATION
- 12 12 – UPDATE INDEXES
- 13 13- USE PHP ACCELERATORS
- 14 14- WEB HOSTING AND SERVER SETTINGS
1- UPDATE AND SECURE
The majority of leaks, errors and attacks on Magento stores have been generated due to missing security updates and version upgrades. It is very IMPORTANT that your Magento version is updated to latest version released by Magento, because each update released by Magento delivers bug fixes and performance improvements.
Make sure you have your store updated with all security patches for your Magento version.
2- IMPLEMENT CDN (CONTENT DELIVERY NETWORK)
Using a content delivery network (CDN) with Magento is a very simple way to decrease load times and to get your Magento store experience improved.
It is a third party cache option for which you have to purchase services from a vendor and most of your resource content is served from the delivery network directly to customers instead of your hosted server. This results in speed up of your website pages and performance as only dynamic functionality of Magento is needed to run on your hosting server.
KeyCDN has a simple integration with Magento 2. It can be setup with HTTP and HTTPS configurations.
There are 3 types of cache. First is your Magento cache, another is Server cache and third one is External cache. For server cache and external cache you need to have some basic knowledge for it and its advisable to get some help of your hosting support to get those sorted.
Magento also comes with a built-in caching module, but third party solutions seem to achieve better results.
Make sure all Cache Types are enabled by navigating to “System” > “Cache Management”.
- Browser Caching
- Gzip Compression: Gzip compresses web pages and stylesheets at the server level before sending them over to the browser.
- Expire headers: Expire headers tell the browser whether they should request a file from the server or grab it from the browser’s cache.
- Page Caching: One of the most powerful ways to speed up Magento. Load is taken off from the webserver by serving pages already visited before from cache, which makes it a lot faster.
4- USE FLAT CATALOG INFORMATION FOR YOUR PRODUCTS
Magento provides you a functionality to use Flat Catalog information for your Products and Categories to improve the performance of your store to serve the items for better user experience.
Enabling this option stores your current catalog data into few tables and serves directly from those to your customers instead of going through its default architecture to get catalog data.
Go to Admin -> System -> Configuration -> Catalog -> Frontend tab -> Set both options to YES
5- IMAGE OPTIMISATION
Majority of page loading time and performance problems can be caused by non optimised images on your website.
We recommend website owners to use optimised and scaled images on web pages instead of big size and high resolution images that occupy more server space and take too much time to load the page.
To optimise the images on your website you can:
- Use any image procession software/tool and re-upload the images
- Go to GTMetrix website. From the site submit it for analysis and it will show you a list of images which can be optimised. It provides optimized images there so you can just download new optimised images and then go to specific paths on your server using FTP or Control panel and re-upload.
6- MERGE CSS AND JS
You need to make sure that your website theme is optimised.
Go to Admin -> System -> Advanced -> Developer
Clear your Magento cache after it to reflect the changes on website front pages.
7 – ENABLE MAGENTO 2 COMPILATION
Magento has a compilation feature which can give up to a 50% performance boost.
By default, Magento’s application files are searched in a certain order everytime the page loads, which results in a lot of filesystem reads.
The Magento 2 Compilation reduces these reads by copying all of these files into a single directory and caches those ones that are used more frequently.
- Navigate to “System” > “Tools” > “Compilation.”
- Click on “Run Compilation Process.”
Important: Before you install further extensions or upgrade Magento you need to disable this feature.
8- LOG CLEANING
By default, Magento keeps logs up to 180 days. This results in your database growing quite large.
If your store is generating small errors from code perspective the log files can grow to be large size. The same can happen with your database if your website is getting heavy traffics and results in large logs in database.
Its a good practice to keep your logs cleaned because otherwise you will experience performance issues on your server and database.
To clean the logs up manually go to Admin -> System -> Configuration -> Advanced -> System -> Logs tab -> Change “Save Logs, Days” to 15 or your preferred time -> Save config.
You can also clean up your logs from database if you have phpMyAdmin access by running the following queries.
- In phpMyAdmin select all of the log_% tables and select “Empty” from the drop down box.
- Click on “Yes” when it asks you if you really want to TRUNCATE the tables.
9- REDUCE EXTENSIONS AND MODULES
You can also disable modules that you don’t use.
- Navigate to “Stores” > “Configuration” > “Advanced”> “Advanced”.
- On the modules you just need to select “Disable” from the drop down box and click on “Save Config.”
10- OPTIMISED EXTENSIONS
Make sure that your Magento extensions are optimised and updated.
If your extensions are updated or they are conflicting with each other then it can result in bad performance.
11- MySQL CONFIGURATION
MySQL has its own “query cache” that it uses in Magento to help generate dynamic pages and content while improving performance. If you wish to get some recommendations on the settings, don’t hesitate to contact us.
12 – UPDATE INDEXES
Magento updates indexes on every object store by default, but in some cases manual updates are required. Indexes are used to speed up MySQL queries.
- Navigate to “System” > “Index Management.”
- Select all of the indexes (or the ones you want to update), choose “Reindex Data” from the drop down and click “Submit.”
13- USE PHP ACCELERATORS
Using a PHP accelerator can increase performance of PHP scripts by caching them in their compiled state. You can use a PHP accelerator like:
- APC – http://pecl.php.net/package/APC
- Xcache – http://xcache.lighttpd.net
- eAccelerator – http://eaccelerator.net
14- WEB HOSTING AND SERVER SETTINGS
The hosting you use for your Magento store plays an important role on your eCommerce performance. Make sure that your server settings are set to correct ones so that content from your server loads in minimal time to your customers.
Many shared hosting providers have their servers configured very poorly which results in Waiting time and Blocking time each request takes to load the resource of your store.
Consult with your hosting provider for support if your website is taking too much wait time and block time.
Contact us if you require a performance audit report for your Magento website and discuss it with our experienced Magento ecommerce developers.
There are many ways you can speed up your Magento ecommerce site. From implementing a CDN to caching, enabling flat catalog, image optimization, merging CSS and JS files, using the Magento Compiler, and cleaning up your database. Having a good web host is equally important.