Magento cannot initialize the indexer process – How to fix

When you try to reindex your Magento site to show newly added products on frontend, you may see the error magento cannot initialize the indexer process:

Or An error occurred while saving the URL rewrite

These errors probably occurred by the following reasons:

  • Low value for Memory limit and maximum execution time in Php.ini file
  • No writing Permission for folder /var
  • Too many products or store views, the re-indexing process can’t be done via Magento backend
  • Corruption of tables in database

After working with such cases, I found out some solutions for this error which I will mention in this tutorial.

Increase Memory limit and maximum execution time

You can change Memory limit and maximum execution time in Php.ini file, normally located in etc/php.ini, add the following lines or change the existing value to

Save your file and restart httpd to apply the change.

You can also changes these values via .htaccess file. Open your .htaccess file, normally located in root folder and add the following lines:

Setting writing permission for /var folder

The error may be caused due to no writing permission for /var folder, to allow writing permission, simply change it to 777 or 755 for your /var folder. You can use some software like winscp, cuteftp, filezilla to do this

Run re-indexing process via command line

Sometimes the re-indexing process can be failed due to the overload of Magento site, there may be too many products/store views and it takes too much time to perform re-indexing process. In this case we will do re-indexing via command interface ssh. In your ssh client, run the following command:

Repair Magento database

You can also try repairing your database, login to phpmyadmin and repair all tables of Magento database

If it still doesn’t work, run the following querry through phpmyadmin (remember to backup database)


Leave a Reply

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