Reindex via Php script (Magento)

  • by
<?php
// clear cache
Mage::app()->removeCache('catalog_rules_dirty');

// Reindex prices
Mage::getModel('index/process')->load(2)->reindexEverything();


/*
You can reindex specific items as below:
1 = Product Attributes
2 = Product Attributes
3 = Catalog URL Rewrites
4 = Product Flat Data
5 = Category Flat Data
6 = Category Products
7 = Catalog Search Index
8 = Tag Aggregation Data
9 = Stock Status
*/

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

This site uses Akismet to reduce spam. Learn how your comment data is processed.