How can I configure Magento 2.4 to use Elasticsearch ?

If you just import your database and you want to configure your stack to use Elasticsearch (locally or on an AWS Cluster), you'll have to:

Download and extract Magerun2: https://github.com/netz98/n98-magerun2

Use these command lines to setup the elasticsearch connection:

./n98-magerun2.phar config:set catalog/search/elasticsearch7_server_hostname $AWS_ES_ENDPOINT
./n98-magerun2.phar config:set catalog/search/elasticsearch7_enable_auth 0
./n98-magerun2.phar config:set catalog/search/elasticsearch7_server_port 8090

Lines in red will only be needed if you use a secured connection.

Was this article helpful?
0 out of 0 found this helpful