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: magento cannot initialize the indexer process 1Or An error occurred while saving the URL rewrite

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

setting permission 777 var magento

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:

reindex ssh magento

Repair Magento database

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

repair magento database

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


The errors can be caused by various factors, if you succeeded with 1 of the above solutions, please drop a line here about what specific solution you used. That will help people who’re encountering the same issues.

Rate this post


About Author

Brian is a Magento developer with 5 years of experience with customizing Magento extensions, Magento templates. He's main author at Magento explorer

Leave A Reply