Some (fairly) simple step-by-step instructions to ensure your Magento Belfast 2 store is running the best it can.

While most of these options should only require access to Admin panel, most are dependent on your web server running specific software to allow them to work. Check with your hosting provider that Elasticsearch and Varnish are enabled and running.

Clear Database Logs

The first step to keeping a Magento install lean and fast is to remove or clear down the sometimes excessive log tables that accumulate in Magento. This can be completed through the Magento Admin Panel and doesn’t require technical knowledge.

  • Click into System > Configuration
  • On the left hand menu click into Advanced > System
  • Under System expad the “MySQL Message Queue Cleanup” section
  • Set the values for all the values as required.
  • Click “Save Config”

You can use a value of “1”, this will keep messages in the logs for a maximum of one minute before they are cleared out. Be careful not to change this value to “0” This will stop the logs being cleared completely, not reduce them.

Enable Elasticsearch

Elasticsearch is a powerful and highly scalable distributed search engine that is used by high-volume sites such as eBay, Wikipedia and GitHub. The implementation of Elasticsearch includes both search suggestions and recommendations.

For this to work you will need to have your web server pre-configured with Elasticsearch

  • Click into Stores > Settings > Configuration
  • On the left hand menu click into Catalog > Catalog
  • Expand “Product Search”
  • Scroll to “Search Engine” and change to the recommended Elasticsearch option
  • Click “Save Config”

Flat Catalogue Tables

Magento includes the option to generate “flat” product and category tables. What this does is create additional tables for the products and categories which don’t use the standard Entity-Attribute-Value (EAV) set-up. EAV is great for making a scalable applicaton, but it can be cumbersome process when loading lots of values.

Flat tables help by creating dynamic tables that are indexed to include just the attribute-values needed and reducing the number of SQL queries. The bigger the Magento website the bigger the impact using Flat tables will have.

  • Click into Stores > Settings > Configuration
  • On the left hand menu click into Catalog > Catalog
  • Expand the “Storefront” section
  • Set “Use Flat Catalog Category” and “Use Flat Catalog Product” to “Yes”.
  • Click “Save Config”

You will be prompted to update your store’s Cache. Follow the instructions.

Varnish Caching

Varnish is a caching tool that works as an additional layer between the web server and the user. Adobe recommend using Varnish with your Magento install.

For this to work you will need to have your web server pre-configured with Varnish

  • Click into Stores > Configuration > Advanced > System > Full Page Cache
  • Set “Caching Application” to Varnish Cache