Skip to main content

Documentation Index

Fetch the complete documentation index at: https://perfgrid.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

When you install Magento 2.4, it’s a requirement you set up ElasticSearch / OpenSearch, since this is used for the search catalog in Magento 2.4. You can either buy access to an ElasticSearch / OpenSearch index via our site, or any hosted ElasticSearch. You can either configure ElasticSearch / OpenSearch from the GUI or from the command-line.

Via the GUI:

First navigate to Stores -> Settings -> Configuration -> Catalog -> Catalog -> Catalog Search. By default, you’ll see the following:
Magento 2.4 Catalog Search Configuration
What we’re going to put here is: Elasticsearch Server Hostname: https://elasticsearch-shared.h4r.eu (Keep in mind https:// is very important here!) Elasticsearch Server Port: 443 Elasticsearch Index Prefix: <your_index> Enable Elasticsearch HTTP Auth: Yes Elasticsearch HTTP Username: <user_username> Elasticsearch HTTP Password: <user_password>
Magento 2.4 Catalog Search Configuration
Click on Save, and you should now be ready to go!

Via the command-line:

To do it via CLI, you’ll have to go to the installation directory of Magento (Often public_html) and do the following
$ php bin/magento config:set catalog/search/elasticsearch7_server_hostname 'https://elasticsearch-shared.h4r.eu'
$ php bin/magento config:set catalog/search/elasticsearch7_server_port 443
$ php bin/magento config:set catalog/search/elasticsearch7_enable_auth 1
$ php bin/magento config:set catalog/search/elasticsearch7_username username
$ php bin/magento config:set catalog/search/elasticsearch7_password password
$ php bin/magento config:set catalog/search/elasticsearch7_index_prefix index_name
$ php bin/magento setup:upgrade
Last modified on April 8, 2026