Script to reindex all process in magento

Hello,

Below is the script to reindex all process in magento.



// rebuild everything!!!
$processes = Mage::getSingleton('index/indexer')->getProcessesCollection();
$processes->walk('setMode', array(Mage_Index_Model_Process::MODE_REAL_TIME));
$processes->walk('save');

$processes->walk('reindexAll');
$processes->walk('reindexEverything');


I hope above content is useful to you. Thanks for reading my blog.

Thanks,
Bijal Bhavsar :)

Category: Magento  Tags: , ,
You can follow any responses to this entry through the RSS 2.0 feed.You can leave a response, or trackback from your own site.

Leave a Reply

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


− 2 = three

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>