Blog

How to Re-index Magento Products

Tags: magentoproduct reindexingre-indexing

Published on: August 11, 2014 by Vipin R.N

How to Re-index Magento Products

Scenario:

Overview
Indexing is how Magento transforms data such as products, categories, and so on, to improve the performance of your web store. As data changes, the transformed data must be updated or re-indexed.Let us see more about magento reindex

Magento has a very sophisticated architecture that stores lots of merchant data (including catalog data, prices, users, stores, and so on) in many database tables. To optimize web store performance, Magento accumulates data into special tables using indexers.

For example, suppose you change the price of an item from $4.99 to $3.99. Magento must reindex the price change to display it on your web store.

Without indexing, Magento would have to calculate the price of every product on the fly – taking into account shopping cart price rules, bundle pricing, discounts, tier pricing, and so on. Loading the price for a product would take a long time, possibly resulting in cart abandonment.

Magento Reindex can be done from Magento Admin panel as well as from the Shell, the latter one being the most successful all time. Some times clients may request us to re-index their products. So lets see how to do this.

Head to shell directory in the Magento installation directory :


root@server [/home/store/public_html]# cd shell

To know the Magento reindex status, execute :

root@server [/home/store/public_html/shell]# php indexer.php –status
Product Attributes: Require Reindex
Product Prices: Require Reindex
Catalog URL Rewrites: Require Reindex
Product Flat Data: Require Reindex
Category Flat Data: Pending
Category Products: Require Reindex
Catalog Search Index: Require Reindex
Stock Status: Require Reindex
Tag Aggregation Data: Require Reindex

Complete Re-indexing

To re-index the complete attributes, execute :

root@server# php indexer.php --reindexall

A successful re-indexing should display :

root@server [/home/store/public_html/shell]# php indexer.php –reindexall
Product Attributes index was rebuilt successfully
Product Prices index was rebuilt successfully
Catalog URL Rewrites index was rebuilt successfully
Product Flat Data index was rebuilt successfully
Category Flat Data index was rebuilt successfully
Category Products index was rebuilt successfully
Catalog Search Index index was rebuilt successfully
Stock Status index was rebuilt successfully
Tag Aggregation Data index was rebuilt successfully

Partial Re-indexing

It is possible to re-index some attributes.

For instance to re-index Catalog Url Rewrites, execute :

root@server # php indexer.php --reindex catalog_url

The General syntax is :

# php indexer.php --reindex [Index Option Code]

Here is a table of Index Option codes for better understanding :

Index Option Code Index Option Name
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

 

Category : Howtos, magento, Troubleshooting

Vipin R.N

Vipin R.N

Vipin is a no-nonsense, disciplined guy who ensures that everything is carried out with the highest level of perfection. Apart from his great coding skills, he is quite interested in advanced server administration, issue analysis, documentation and training. In-depth knowledge in international politics, ammunition and automobiles makes this hard core Manchester United fan, one of the most referenced personalities in the entire team.

You may also read:

Comments

Add new commentSIGN IN

Let's Connect

Get new updates

Categories

$0.000 items