I would like to install Magento 2.4.0 on server without Elasticsearch require during installation. Can anybody tell me the way to disable Elasticsearch require when I run setup:install ... ? Thank you so much.
-
1you will need to install without sample data Magento 2.4 and one core file change in vendor\magento\module-elasticsearch\Setup\Validator.php file around line no 36 function validate() in that add to first line return $errors = []; -- after install you will be revert back core file changes because it just for installation – Chandresh Chauhan Aug 26 '20 at 03:55
-
Thanks so much for your solution. This is very helpful. – Neverland Aug 26 '20 at 04:12
2 Answers
I've faced same problem while installing Magento 2.4 on my local setup due to elastic search module dependencies.
There are two ways to fix this problem (listed below).
Configure Elastic search on your server before installing the Magento 2.4.
Disable all elastic search module with below command before running the setup:install.
php bin/magento module:disable Magento_Elasticsearch Magento_Elasticsearch6 Magento_Elasticsearch7 Magento_InventoryElasticsearch
Usually we're not using elastic search on local. So I prefer the 2nd way.
Update: As per @JayaChandra comment, we need to disable Magento_ElasticsearchCatalogPermissions module as well for Magento Commerce edition with the below additional command.
php bin/magento module:disable Magento_ElasticsearchCatalogPermissions
Edit: We can use the below module as an alternative of Elastic search. If you don't have elastic search installed on your server then you can use this module in Magento 2.4.x.
Follow the below documentation to install/use Magento 2.4 without Elasticsearch.
https://docs.swissuplabs.com/m2/extensions/search-mysql-legacy/
Hope it helps!!!
- 4,875
- 2
- 19
- 35
-
1
-
1
-
1Incase of commerce edition, we also need to add one more module in the above command "Magento_ElasticsearchCatalogPermissions" – Jaya chandra May 24 '21 at 03:25
-
Thank you @Jayachandra, I've updated my answer for Magento commerce edition. – Sumit May 24 '21 at 04:09
This video will help you to install Magento 2.4 with Elasticsearch. https://www.youtube.com/watch?v=3RFw9j4ihag
- 875
- 8
- 15