Magento 2 – How to Reindex using Command line

Magewallet | Magento 2 Extensions, Themes & Solutions

Magento 2 – How to Reindex using Command line

In Magento 1.x, store owner can directly do reindex from Index management. But in Magento 2.x there is no direct options available for Reindex from backend.

As Magento 2.x provides reindex using command line. So lets discuss about how to do reindex using command line.

If you need to do whole index management in the Magento 2.x store, then you have to run the following command.

First go to magento root directory, then run below command to apply reindex to whole store.

But what if you want to reindex specific indexer. for that you will need list of the indexer name. You will get the list of indexer using below command.

In root directory run below command,

Now you have list of all the indexer available, so you can run command for specific indexer.

To run single reindex command,

here [indexer_name] means name of the indexer which you received from ‘indexer:info’ command.

Let me know your comments at below and help me to improve this post and help more and more to Magento 2.x developer.

admin

2 Comments

Jackaroos

34 mins ago

When I run the php bin/magento indexer:reindex command (or the :info command) I get the following error: [InvalidArgumentException] There are no commands defined in the "indexer" namespace. Do you have any suggestions please?

Jackaroos

34 mins ago

Solved it: needed sudo in front of the command

Leave Comment

Newsletter

Latest Tweets