Magento re-indexing by Shell scripting

Magento re-indexing by Shell scripting:
Normally magento re-index we will do it from admin section. Once you login as a admin, you can see the re-index management from admin -> Configuration -> Index management. Here there is a option to choose the checkbox do the select the “re-index” action from top above right side near submit button dropdown.Instead of this we can do the re-index by Shell scripting command prompt.Doing shell scripting re-indexing is much fast compare with admin panel re-index section.

Commands:
1. First go to shell(magento root folder) folder using command prompt
cd [ROOT]/shell/

2. Find current status of indexing
Cmd [shell]> php indexer.php –status
Once you enter above command prompt, you may see all the index type with current status
Ex:
Product Attribute : Pending
Product Price : Require re-index
etc….

3. Re-index all the index
Cmd [shell] > php indexer.php –reindexall

4. We can do the indivitually also, Indivitual re-index for each index is
Cmd [shell] > php indexer.php –reindex catalog_product_attribute
Cmd [shell] > php indexer.php –reindex catalog_product_price
Cmd [shell] > php indexer.php –reindex catalog_url Catalog
Cmd [shell] > php indexer.php –reindex catalog_product_flat
Cmd [shell] > php indexer.php –reindex catalog_category_flat
Cmd [shell] > php indexer.php –reindex catalog_category_product
Cmd [shell] > php indexer.php –reindex catalogsearch_fulltext
Cmd [shell] > php indexer.php –reindex cataloginventory_stock

5. Multiple command in a line with comma separater
Cmd [shell] > php indexer.php –reindex catalog_product_price,catalog_url,catalog_product_flat, etc

 Important Note: Magento EE  1.13 –  There is no admin option to re-index for some of the index type. That we need to do using Shell script only.

 

6 thoughts on “Magento re-indexing by Shell scripting”

    1. Hi Jeeva Rathinam, Using your host & private or public key (if you don’t have Key then you have to use your server Username & password ) you have to login via putty or terminal . And go to your root folder of mageto then do the re-index.

Leave a Reply