Magento 2.2.8

I had 700k products in my store and about 500k were deleted like this:

delete from catalog_product_entity where entity_id = ...; 

That worked. Now I still have over 4.5 million rewrites in url_rewrite and many of them are related to the deleted products. I tried deleting them with delete from url_rewrite where entity_id = ...;, but this is taking forever because there are sometimes multiple rows for one product entity_id. Now I was thinking to maybe delete the whole content of url_rewrite and to reindex that table to only have to rewrites according to the 200k products that were not deleted.

In Magento 2 there is no url rewrite index, so I have to use a 3rd party extension I guess. Before trying that approach, I would like to know if it would work at all or if it would be faster.

Any experience here?

Your Answer

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

Browse other questions tagged or ask your own question.