Index Management In Magento



In Magento Reindexing is very important, it is very necessary to reindexing whenever we have made some changes into the product other wise changes did not reflects on the frontend. Some times it happens there is no products are coming on the frontend although there is no problem with the Magento setup then I would like to suggest for the Reindexing. It is very simple to Reindex the products through the admin panel for this, Login to your admin panel then if Reindexing is reqired then you will see such kind of the message on the top "One or more of the Indexes are not up to date: Click here to go to Index Management and rebuild required indexes" Or Navigate to the Admin->System->Index Management

Method 1. Index Management through the Magento Admin Panel

After click on the Link you will be on the Index Management page as per the screenshot below:

Here click on the Select All and click on the Submit button to Reindex Data, it will take some time to reindex and then it will return with the Successfull message as per the screenshot below:

Method 2. Index Management through the SSH

But sometimes if you have more that 15000 products and having a lot of categories then it is not possible to Reindex it through the Magento admin panel because it may take hours, then PHP scripts can break because of the max_execution_time exceeding, then there is the way to reindex the data through the SSH.

Login with your SSH account and navigate to the shell scripts folder


cd Magento_root/shell/

Here you can find all these commands below:

php indexer.php --status  //status of all the indexes
php indexer.php info  //Code for the individual indexes
php indexer.php --reindex
php indexer.php reindexall //It will Reindexes all the indexes

php indexer.php reindexall //It will Reindexes all the indexes and will take some time to reindex all the indexes, you can run the Single index process as it will take less time in comparission to the reindexall. Find the code below:

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

By this you can run single indexer process as well, suppose you wants only to process url rewrites index then use the following command:

php indexer.php --reindex catalog_url

You have successfully Reindex the Products, now Refresh the Magento Cache and go to the frontend and refresh the browser cache then every thing will be Ok means all products will be there.

Tags: