Magento Index Management On Command Line

Wednesday, 11. April 2012

Get Magento Indexer Codes
– Open your command line tool
– Navigate to your magento’s folder and type this command

php -f shell/indexer.php info

Magento Indexers Codes
Here is a list of all default indexers codes as of Magento 1.6.x

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
tag_summary                   Tag Aggregation Data

Check status of all indexes
– Open your command line tool
– Navigate to your magento’s folder and type this command

php -f shell/indexer.php --status # shows status for all indexers
php -f shell/indexer.php --status <indexer> # Show status for specific Indexer

How to run the index management

php -f shell/indexer.php --reindex <indexer>  # Index a specific indexer

— Index all indexers

php -f shell/indexer.php --reindex all

— Index all indexers but Catalog Search Index

 php indexer.php --reindex "catalog_product_attribute,catalog_product_price,catalog_url,catalog_product_flat,catalog_category_flat,catalog_category_product,cataloginventory_stock,tag_summary"

— NOTE
The <indexer> can be: – Comma separated indexer codes or value “all” for all indexers

Leave a Reply

You must be logged in to post a comment.