Magento Tips: Reindex Magento database from Linux command shell

If you have SSH access to your hosting server you can easy reindex Magento database from Linux command shell.

You can use such reindex method to decrease load on your server. PHP shell commands execute directly, without Apache overloading.

Here is instruction on how to use default Magento indexer via SSH:

1 – Go to ‘shell’ folder in your Magento installation:

cd shell

2 – Execute reindex using this command:

php -f indexer.php reindexall

It is possible to get full list of Magento indexer commands using this command:

php -f indexer.php help

To get a list of available indexes, execute this command:

php -f indexer.php info

By default there are 8 indexes in Magento:

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

 

 

Vyacheslav is a talented programmer who trains our Zend/Magento juniors. His passions are programming, maths, cryptography and Formula 1 racing. Yet, he loves to travel in Europe.

Facebook Twitter 


Tags: ,

Leave a Reply

*