(Re) Index Magento via command line (SSH)

Magento can just easily be indexed via backend by going to System – Index Management section but sometimes this process can fail or the backend might not be accessible. A simple way to bypass this is to log in using command line and the following:

Navigate to the root of your Magento installation. Once there, run the following command for reindexing all :

php ./shell/indexer.php -reindexall

You should see something like this:

magento_reidex

Or each of the following for individual indexing:

php ./shell/indexer.php -reindex catalog_product_attribute

php ./shell/indexer.php -reindex catalogsearch_fulltext

php ./shell/indexer.php -reindex catalog_category_flat

php ./shell/indexer.php -reindex cataloginventory_stock

php ./shell/indexer.php -reindex catalog_category_product

php ./shell/indexer.php -reindex catalog_product_flat

php ./shell/indexer.php -reindex catalog_product_price

php ./shell/indexer.php -reindex tag_summary

php ./shell/indexer.php -reindex catalog_url

A help screen is accessible by typing:

php ./shell/indexer.php -help

Michael Savin

My name is Michael Savin. I've been contributing to the Internet for over ten years and have been a London based Magento freelancer for the last six.

I build eCommerce websites for varied companies worldwide and enjoy a close relationship with many brands, freelancers and studios. Work aside I enjoy cycling, reading and long walks in sunny days.

Leave a Reply

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