olegkoval / magento2-regenerate_url_rewrites

Magento 2 extension which add feature of regenerating a url rewrites of products/categories
Academic Free License v3.0
428 stars 118 forks source link

Delete non-existing products/categories lines #158

Open marcopasini opened 2 years ago

marcopasini commented 2 years ago

Summary

It would be useful to have an option to also delete the lines of products that no longer exist. It may happen that products/categories have been deleted but records still exist in the url_rewrite table.

Basic example

We could do something like

php bin/magento ok:urlrewrites:regenerate --entity-type=product --not-existing
php bin/magento ok:urlrewrites:regenerate --entity-type=category --not-existing

... and the process deletes non-existing products/categories