Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Magento URL indexing and core_url_rewrite table

Can anybody shed some light on how Magento determine whether to create a new URL rewrite for a product? Every time I run the Catalog URL Rewrite reindex process the number of rows in core_url_rewrite increases by roughly 10,000 rows. Since no product data has been modified in the mean time, why is a new URL generated?

like image 402
Peter O'Callaghan Avatar asked Nov 12 '12 13:11

Peter O'Callaghan


1 Answers

This problem still exists in Magento 1.7, but I have no clue about 1.8 or 1.9. Magento does not delete old entries it seems. This can slow down your database seriously. The easiest way to solve this is to truncate the table and to reindex it.

  • Login to mysql and select (use) the proper database
  • Execute the following query: truncate table core_url_rewrite;
  • Goto the shell folder in your magento root (commandline) and execute the following command: php -f indexer.php -- -reindex catalog_url
  • Alternatively you can do this in the admin: System > Index Management; Reindex Catalog URL Rewrites

Then check in the admin: Catalog > URL Rewrite Management, and see if the new entries have been created. If this shows no items, URL rewrites won't work!

like image 66
SPRBRN Avatar answered Oct 22 '22 14:10

SPRBRN