In magento version whenever i tried to reindex data it takes long time and after that it will display 500 Internal Server Error.

500 Enternal Error


2 Answers 2


Try to re-index data by ssh

php indexer.php --reindex catalog_product_attribute
php indexer.php --reindex catalog_product_price
php indexer.php --reindex catalog_url
php indexer.php --reindex catalog_product_flat
php indexer.php --reindex catalog_category_flat
php indexer.php --reindex catalog_category_product
php indexer.php --reindex catalogsearch_fulltext
php indexer.php --reindex cataloginventory_stock
php indexer.php --reindex tag_summary

or for all

php -f indexer.php reindexall

Script for re-index data

require 'app/Mage.php';

$indexCollection = Mage::getModel('index/process')->getCollection();
foreach ($indexCollection as $index) {

Or for individual indexer code you can use below.

require 'app/Mage.php';

$process = Mage::getModel('index/indexer')->getProcessByCode('catalog_product_price');
  • is there php script to reindex ? because i don't have cpanel only ftp ! Oct 2, 2015 at 11:10
  • edited my answer. Oct 2, 2015 at 11:17
  • what can i add this script ? Oct 2, 2015 at 12:02
  • I have edited script. You can create one file on root of your Magento. Add this script code in file and run that file in browser. try to run code for individual indexer code. If that doesn't work you must try with ssh. Oct 2, 2015 at 12:10
  • Fatal error: Uncaught exception 'Mage_Core_Exception' with message 'Product Attributes Index process is working now. Please try run this process later.' in /home/content/92/11973392/html/app/Mage.php:594 Stack trace: #0 /home/content/92/11973392/html/app/code/core/Mage/Index/Model/Process.php(182): Mage::throwException('Product Attribu...') #1 /home/content/92/11973392/html/reindx.php(7): Mage_Index_Model_Process->reindexAll() #2 {main} thrown in /home/content/92/11973392/html/app/Mage.php on line 594 Oct 2, 2015 at 12:17

It seems the issue of execution timeout of your server, you can try extending it by yourself or by asking hosting provider. Meanwhile, This thread should help you with the reindexing issue, explains well how to do reindexing programmatically.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.