To configure the Elasticsearch port from the Magento 2 command line (CLI), use:
|
1 |
php bin/magento config:set catalog/search/elasticsearch7_server_port 9200 |
If you use OpenSearch, run this command instead:
|
1 |
php bin/magento config:set catalog/search/opensearch_server_port 9200 |
This way, you do not need to sign in to Magento 2 admin to change the port.…