I have a lot of entries in the table core_url_rewrite, how can I reduce ? I'm using magento 1.9.x Actually the table has ~3,680,554 records and 2.5 GB of size. I put in the pas about 100 redirect (manually), I cant clear it, just to delete the unnecessary records.


  • How many products do you have in your database? Aug 30, 2019 at 20:09
  • I have 3,000 sku aprox Aug 30, 2019 at 23:23

1 Answer 1


You can truncate core_url_rewrite and run re-indexing to regenerate URLs.

First execute this on Database:

TRUNCATE core_url_rewrite;

then execute this on shell to re-index url rewrites table:

php -f ./shell/indexer.php --reindex catalog_url

There is a problem with this criteria.

  • All the additional URL rewrites that you had manually generated would be lost
  • All the redirects from old URL to new URL would gone to 404 (Not good for SEO) either related to category or product

I would suggest you first take backup of your code before doing this.

Hope it will resolve your issue.

  • Many thanks, this is my concern, I need keep all the manual redirects. The SEO is very important for me Aug 30, 2019 at 18:09
  • Then I would recommend you just ignore the size of core_url_rewrite if redirect URLs are important for you. Aug 31, 2019 at 7:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.