Home / Knowledge Base / Magento Help / Magento Reindexing Product Data

Magento Reindexing Product Data

Magento uses a powerful technique of indexing to revolutionize data such as product, category details, and so on, to increase the performance of the online store. When the data is updated, Magento must re-index the data in-order to make the online store work faster.

Indexing does not alter your existing data, it just grabs the data and copies it to its own database tables. Magento is a complex cart and has to do a number of calculations, so this essentially caches the data so that it can be processed faster, speeding up your website.

For example: If the website administrator updates the price of a product from $20 to $15 then they have to re-index the data so the new value is stored in the indexed tables. If re-indexing process is not done, the calculations for the products added to the shopping cart have to be done on the fly and sometimes it can result in desertion of the shopping cart because of this delay in processing.

Re-indexing can be done 2 ways:

Procedure I: Instructions to ReIndex Data

  1. Login to the online store administrative side of Magento
  2. Navigate to System > Index Management
  3. Select all the indexes that you wish to re-index, then submit click submit. Please refer the screen shot below:
  4. You will see a success message similar to this:                                                                                                                                           magento success

Procedure II: Instructions for Reindexing a Large Amount of Products

If you have a large amount of products, you can re-index your web store with this PHP script:

<?php  
 require_once 'app/Mage.php';  
 $app = Mage::app('admin');  
 umask(0);  
 for ($index = 1; $index <= 9; $index++) {  
     $process = Mage::getModel('index/process')->load($index);  
     $process->reindexAll();  
 echo "Indexing for Process ID # ".$index." Done
";
 }  
?>

Save the file as reindex.php and upload it to the website root and execute the file using this URL in your browser (replacing "yourdoman.com" with your actual domain name): https://yourdomain.com/reindex.php

If you don’t get the success message, then there is a problem with indexing - meaning the previous indexing process was abandoned before completion.

 

Instructions to fix Indexing Problems

There are many reasons that may break the reindexing process in Magento:

  • Due to the maximum execution time & script input time setting in your web server
  • The lock file is still place from the previous execution can preventing it running again

You can increase the execution time value using the .htaccess file in your website root. You would edit it to at least have these values:

php_value memory_limit 128M  
php_value max_execution_time 18000

Instructions to Remove Lock Files

Magento creates ".lock" files in the folder named "lock" from the root directory and these files will be deleted after the indexing process is completed. If the indexing process abandoned during its process, these files will remain in the "lock" folder and it will create issues in the next Indexing process. To solve this, you have to manually remove those files using FTP.

  1. Login to the website using FTP (such us filezilla, coreftp)
  2. Select the folder with name “lock” in the root directory.
  3. You will see files with extension .lock
  4. Select the files and delete it from the server.

Now run the re-indexing process. You should get the success message.

SEO  PPC
SEO / PPC
Get found, increase conversion!
Website Marketing
Website Marketing
Get your website noticed and get results.
Design Portfolio
Design Portfolio
Result driven design makes your website work 24/7 for your business.

What Our Clients Say

“Your company and its professionalism are proof positive that distance truly does not matter when completing a large project such as this.”
-Julie Hilliger
Malcolm-Eaton Enterprises
Our Clients Love Us - CLICK

Need Website Maintenance?

 

Put Our Team

To Work For You

Click Here

Website Financing Options Available
UpCity

UW Madison Alumni

FOLLOW US ON
Webstix in Madison, WI
2820 Walton Commons Ln.
Suite 108
Madison, WI 53718
608-277-7849 608-661-8529
magnifier linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram