magento speed

The name Magento is asynonym to e-commerce websites. It is the most widely used e-commerce platform ever. According to a report, around 22% of the top 100,000 e-commerce sites use either Magento or Magento Enterprise. This open source platform is owned by Ebay. One of the most frequently faced problems with Magento or any other e-commerce sites is the speed. As more and more products are added, the database and the site become slow. We will be looking at various ways to optimize Magento website and increase its speed. We already made 2 detailed guide on how to create a fast loading website. You can read them at Part 1 and Part 2.

1. Stay Updated

Magento is one of the most comprehensive platforms which get regularly updated. Updates are released for bug fixes, security updates and also performance improvements. Magento as a platform contains many modules and it might become slow over time. Magento collects regular feedback and optimizes speed issues of these components and releases regular updates. You can get regular notification of updates available in your dashboard. Unlike Woocommerce or Shopify, updating Magento is not straight forward. Follow the below steps to update Magento.

  • Take a fresh backup of both your files and database before upgrading. If anything goes wrong, you can restore the old version using this backup.
  • Chose a quiet time when there will be least or no activity on the platform for updating.
  • Download the latest version of Magento. Start the setup routine and when Magento asks for the access data of your database, use the old database. Magento will automatically upgrade your database to the newer one.
  • Transfer the themes and plugins from the old version to the latest version. Copy your media folder to use all images of products and categories and wysiwyg. Re-Index and enable the cache.

2. Implement a CDN

Content Delivery Network(CDN) is one of the easiest ways to improve the load speed of a Magento websites. The basic idea is to load your primary assets like images, JavaScript and Stylesheets in a Cloud server in a location which is near to your user’s location. Whenever a user opens your website, these assets will be delivered using the CDN which is much closer to him compared to your server. This will reduce the load speed a lot thus enhancing the user experience. If your end users are spread across theglobe, then you might need to use multiple CDN locations to speed up the process. This can be implemented by using KeyCDN or Amazon Cloud Front. Both the providers have Magento extensions.

3. Enable Caching

Caching is one of the common practice to increase the site load speed for all types of websites. When a website is rendered by a client browser all the resources including the HTML file, images, JavaScripts, Stylesheets are downloaded. If thecache is implemented correctly these resources will be resued from the local machine instead of fetching them from theserver for subsequent visits.  Caching can be enabled in Magento using the below methods.

One of the most frequently used methods of caching is by combining NGINX + APC + Memcache + Varnish caching.  Magento also comes in with a built-in cache management where you can enable or disable various method of caching. Just login to your Magento admin panel and click System-Cache Management.

The second method of caching is by using the browser caching which is implemented using the .htaccess file. Browser caching is implemented using the Expire headers. This will tell the browser whether to fetch the site from the server of reuse the previously downloaded files. You can also compress your resources and webpage at the server end before sending it across to the browser. This will also reduce the load time for the end user. This can be achieved using Gzip compression.

Another method of caching is Page Caching where complete webpages are rendered using the existing cache instead of querying the server. This can be achieved using one of the below plugins.

  • Zoom Full-Page Cache
  • Full Page Cache Pro
  • Brim’s Full Page Cache

We will be discussing more methods in details to optimize your Magento website in the next version of this article.