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!
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
Leave a comment
Welcome to my Blog
Certifications
Honor
Recognition
Contributions
Categories
- Apache (2)
- ChatGPT (1)
- Domain name (2)
- eCommerce (2)
- htaccess (1)
- Humor (3)
- Instagram API (1)
- jQuery (4)
- JSON (1)
- Linux (10)
- Magento (142)
- Magento admin (58)
- Magento Certification (5)
- Magento error (13)
- Magento frontend (68)
- Magento Imagine (2)
- Magento Interview (5)
- Magento Master (2)
- Magento2 (10)
- Mobile (1)
- MySQL (7)
- OpenAI (1)
- OroCRM (2)
- Performance (2)
- PHP (8)
- Prototype JS (3)
- Security (4)
- Wordpress (3)
- XML (2)
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