Wednesday, January 13, 2016

Re-index Magento via SSH

How to do:
1. Login to Server using SSH
> pwd
> ls -al

2. Move to ROOT/shell folder
> cd shell/
> ls -al

3. Get help from “indexer.php” script
> php -f indexer.php help

4. Get the list of indexers which you can execute
> php -f indexer.php info

Ex:
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

cataloginventory_stock        Stock Status
catalog_product_price         Catalog product price
catalog_url_category          Category URL Rewrites
catalog_url_product           Product URL Rewrites
//===============================================
url_redirect                  URL Redirects
//===============================================
catalog_category_product      Catalog Category/Product Index
catalogsearch_fulltext        Catalog Search Index
tag_summary                   Tag Aggregation Data
catalog_product_attribute     Product Attributes


5. you can reindex any of the indexers one by one.
> php indexer.php --reindex   <<reindexer_name>>
Ex:
> php indexer.php --reindex catalog_url_category

6. If you want to reindex everything at once, use the below command
> php indexer.php -reindexall

No comments:

Post a Comment