How to run Magento indexer using command prompt?

Magento provides indexer process by browser base as well command prompt. To run indexer process from browser base go to admin side system configuration menu “System -> Configuration -> Index Management”. To run indexer process from command prompt follow below steps.

-> Open command prompt
/** Go to PHP exe directory */
-> Type & press enter :
cd your_drive:\wamp\bin\php\php5.2.5

/** Now use “PHP” word and indexer.php file path of your Magento set-up followed by indexing option */
–> To Reindex all indexes
php your_drive/magento/setup/indexer.php –reindexall

–> To Reindex particular index
php your_drive/magento/setup/indexer.php –reindex [Index Option Code]

/*
Index Option Code Index Option Name
catalog_product_attribute Product Attributes
catalog_product_price Product Prices
catalog_url Catalog Url Rewrites
catalog_product_flat Product Flat Data
catalog_category_flat Category Flat Data
catalog_category_product Category Products
catalogsearch_fulltext Catalog Search Index
cataloginventory_stock Stock status
*/

For more help: Magento: http://www.magentocommerce.com/boards/viewthread/332176/

Leave a Reply

Your email address will not be published. Required fields are marked *