HOW TO DO RE-INDEXING VIA COMMAND LINE IN MAGENTO 2?
Re-indexing using admin panel is ideal for Magento 2 stores with small to medium-sized inventories. However, if you own a Magento 2 based store with a large inventory size, re-indexing via admin panel can be painful for you. In such situation, only command line re-indexing method would work best for you.
To do re-indexing in Magento 2, you need to run the following commands:
• Re-indexing Root Directory:
php bin/magento indexer:reindex
• Re-indexing root/bin directory:
php magento indexer:reindex
• Magento 2 Single Re-indexing Command:
php bin/magento indexer:reindex indexer_name
You will get the indexer name from the following command:
php bin/magento indexer:info
The command line method is considered to be more efficient than admin panel approach. It will execute indexing in a perfect way.
By Chandan DubeyMagento
Reviewed by People 192 votes on .
Chandan Dubey : Best PHP Developer in India
Rating: 9 out of 10