Magento 2 is the latest hot topic in the ecommerce market and given their new architecture, it’s very easy to configure it using command line or SSH.
Follow these steps to reindex Magento 2 using the command line:
- Login to SSH/Command line
- Go to your Magento root directory
- Once in root, type cd bin
- In Bin, to reindex all configurations type magento indexer:reindex and hit enter. Magento 2 will start reindexing the system. Screenshot below:
That’s all. You have just reindexed your magento store in one go.
Note: If you get ‘magento: command not found’, then use php keyword to run the indexing.
Other commands to index individual sections:
magento indexer:reindex customer_grid Customer
magento indexer:reindex catalog_category_product
magento indexer:reindex catalog_product_category
magento indexer:reindex catalog_product_price
magento indexer:reindex catalog_product_attribute
magento indexer:reindex cataloginventory_stock
magento indexer:reindex catalogsearch_fulltext
magento indexer:reindex catalogrule_rule
magento indexer:reindex catalogrule_product