There are problem in reindexing in magento many times due to number of factors:
- The number of products
- The number of store views
- The apache/lighttpd timeout setting
- The php.ini maximum execution time & script input time
- The lock file is still place from the previous time can preventing it running again
one more thing VPS or dedicated server is must have for Magento.
here i paste the trick/tips for the same.
First of all increase your execution time value from the .htaccess
# php_value memory_limit 64M
php_value memory_limit 128M
php_value max_execution_time 18000
Now open your shell/terminal:
go on upto “public_html/app/shell”
use “ls -l” command, to list out the files.
there is one indexer.php file in the list.
Commads:
php indexer.php --info (Will shows list of allowed indexers)
php indexer.php --reindex all (Reindex data by all indexers)
If you wish to reindex one by one then use following commands:
php indexer.php --reindex catalog_product_attribute (Reindex Product Attribute)
php indexer.php --reindex catalog_product_price (Reindex Products prices)
and so on…..
If you don’t have SSH (Command Prompt) access then try with following script;
<?php
require_once 'app/Mage.php';
$app = Mage::app('admin');
umask(0);
for ($index = 1; $index <= 8; $index++) {
$process = Mage::getModel('index/process')->load($index);
$process->reindexAll();
}
Save file with reindex/php and run go on browser and run it like: http://yourdomainname/reindex.php
Hope this helps,
Do you have any tips? Post them in the comments and I’ll add them to the list!