Search code examples
magento-1.9reindex

Re-index magento using command line or Shell


I have seen some tutorials on re-indexing magento. with command line , shell, ssh. But i'm not very good with magento. I want some explanation on re-indexing through shell>indexer.php.(how to execute a command). I will be very grateful to you if you explain me this tutorial.(This tutorial) Thanks.


Solution

  • Well the tutorial itself explains everything, still let me try if I can help:-
    
    Indexing works fast when executed via shell and we need not to wait on browser.
    To execute command first you need to reach via shell folder then you can execute all the below suggested command.
    
    You need to simply mention 
    php  indexer.php --reindex NameOFIndexer.
    Example:- to index attributes of product(php indexer.php --reindex catalog_product_attribute)
    
    Name of Indexer is the list you must be seeing in admin panel,here it follows:-
    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
    
    To get the list of all indexers you can write following on cmd:-
    php indexer.php info
    
    Apart from above method you can tell Magento to reindex all the indexer in a single go by following command:-
    php indexer.php --reindexall