May 26, 2013
kalpesh

Magento performace optimization, Catalog URL Rewrite Management

If your Magento site is slow, then one of the reason can be because of Catalog URL Rewrites. You can check in the Magento Admin > Catalog > URL Rewrite Management. If you see the catalog rewrites are very large than expected as per total Categories and Products you have, this will create your site to be slow. This generally gets too large if you edit the categories/products and change it’s URL. Generally we keep on changing the product URL to optimize for search engines or to correct some typo in the link. Magento saves all the previous category and product URLs even if it is changed many times, resulting in more number of URL rewrites in database. I have seen in one of the project, where total SKUs were near to 4,00,000 while the URL Rewrites were near to 46,00,000 with just one website and store!

Magento Catalog URL Rewrite Management

Solution:
– First step is ofcourse, to take the backup of table core_url_rewrite
If something goes wrong then we can restore our old core_url_rewrite table to bring it back.

– Now truncate the table core_url_rewrite
truncate table core_url_rewrite in your Mysql console or from phpMyAdmin to empty this table.

– Re-index “Catalog URL Rewrite” from Index Management
This will create all the URL rewrites (current URLs only) for your categories and products and insert it into core_url_rewrite table.

8 Comments

  • Our website has approximately 60,000 SKU’s

    Our core_url_rewrite table is out of control with an increasingly growing number of rewrites now over 24 million. This has caused indexing to stop working and many features of our site to stop.

    Do you have someone who could help us?

    • Hi Todd,
      Phollow below steps:
      – Backup table core_url_rewrite
      – Truncate it now
      – Re-index Catalog URL Rewrites index from Magento backend

      Everything should work good now.

  • But still same problem, is there any other solution for me 🙁

  • Thanks!
    Performed a Truncate. 1258 products 600000+ URL Rewrites records

  • I followed the advise but now the core_url_rewrite table doesn’t get updated/written. I can see mysql writing to it but nothing gets saved.

    any ideas?

    • How have you solved it? It seems we have the same problem.
      Thanks

  • if truncate core_url_rewrite table then all old url will delte. it is ok but those url in diffrent site and google then seo issues generate,any suggestions for that?

  • Hi,

    Your blog is very informative and good.

    Thanking You

Leave a comment

 

Welcome to my Blog

Kalpesh MehtaHelping Magento developers in their day-to-day development problems since 2011. Most of the problems and solutions here are my own experiences while working on different projects. Enjoy the blog and don't forget to throw comments and likes/+1's/tweets on posts you like. Thanks for visiting!

Certifications