Data Driven Design icon

Install Amasty Elastic Search for Magento 2 on Cloudways

Installing and configuring Elasticsearch for Magento 2 can be a pain if you have never gone through the process before. Luckily, between using the excellent Amasty Elastic Search module and the ease of server administration on Cloudways, this process becomes fairly straightforward. It is a huge improvement on the built in Magento search which uses MySql queries and should result in your customers finding the right products faster.

1
Enable Elasticsearch

Enable Elasticsearch on Cloudways. This assumes you already have Magento 2 up and running on Cloudways at this point. If you do, all you need to do is login to your Cloudways account, select your server, click on Settings and Pacakages, then click the Packages tab in order to enable the service. Once there, click the edit icon and select the version you want to install. For the Amasty module, you will want 5.x or 6.x.

2
Purchase and Install

Purchase and install the Amasty Elasticsearch module. Once purchased, installing the module is just like any other Magento module. First upload the module files into your app/code directory. Then run the upgrade and install process like this:

php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush
3
Configure

With Elasticsearch setup and the module installed, you are now ready to configure Magento 2 to leverage the Elasticsearch. Follow along with the notes below.

Amasty has a pretty good guide on configuring the Amasty Elasticsearch module that goes into many more module specific details that we wont touch on. Make sure you read it so you can get the most out of your configuration. We will cover the Cloudways specific pieces.

First navigation to Admin Panel > Stores > Configuration > Elastic Search > Catalog. Once here your settings will be:

Search Engine: Amasty Elasticsearch

Elasticsearch Server Hostname: The hostname of your Magento installation ie: your sites domain name or the default Cloudways hostname for your application.

Elasticsearch Server: 9200

Elasticsearch Index Prefix: magento2 (you can use whatever you want here but if you have multiple applications leveraging the same Elasticsearch instance, they all need to use unique prefixes).

Enable Elasticsearch HTTP Auth: No

Elasticsearch Server Timeout: 15

Once all the settings are in place, click Test Connection. If all went well, you will get a success message. If not, double check the previous steps to make sure the Elasticsearch service is running on the server and make sure that your hostname is correct.

Your Magento 2 site is now running Elasticsearch. Go give it a try and see how much better the search results are. Not only do they come back faster but it is much, much better at matching results. The Amasty module also gives you very granular control over what to search and how to search it so be sure to explore all that the module has to offer.

Get In Touch.
Contact