While moving categories using the drag and drop feature in the Magento backend I somehow managed to corrupt my rewrites. The content in my url_rewrite table varies greatly from what it should be. It is as though my changes never updated the table correctly when my changes were made. It is completely unusable and my products are no longer showing on the frontend with the categories. In addition, my rerwites for the category pages themselves are instead showing the actual path instead of friendly URLs.

So, I believe that it would be a nightmare to try and repair the table manually and would likely run into key constraints.

Is there any way to delete ALL rewrites and regenerate them for my entire store?

I have tried re-indexing numerous times and I have also tried the iazel extension which did not do anything.

I do have the EmagicOne Store Manager and have deleted the entire contents of the my store from the web itself, then re-imported all products and categories from Store Manager and the products did show within the categories for a bit, but shortly after (without changes) they disappeared once again.

Now, I am looking for advice on how to resolve this issue.

Options as I see them:

  1. Destroy all products from the backend once again, but delete all rewrite data in the table this time, then re-import from Store Manager.
  2. Attempt the iazel extension again.

I have nearly 17k products.

  • I decided to try options #2 and the iazel extension did actually work this time. I could confirm this because it generated rewrites that were missing. My rewrite count went from ~30k rewrites to ~45k rewrites. My products are still missing from the category pages. How can I appropriately destroy all rewrites without causing issues so that I could allow the iazel extension to regenerate all rewrites?
    – ctroyp
    May 26, 2017 at 19:02

4 Answers 4


You can delete all the URL rewrites with in mysql:

delete from url_rewrite;
delete from catalog_url_rewrite_product_category;

After which you can use iazel extension to regenerate the rewrites.


Editing MySQL directly can be dangerous, so try it out on a local/development server before doing this on a production server.

  • It appears that this did the trick, but it did not resolve my ultimate issue concerning the products not showing. Thanks for the solution.
    – ctroyp
    May 26, 2017 at 22:02

You can use Magento Store Manager to update all products URL. You don't need to delete and reimport the porducts.


You can use Regenerate a Url rewrites extension (it allow to regenerate a Url rewrites of products and categories) .

  php bin/magento ok:urlrewrites:regenerate // For product
  php bin/magento ok:urlrewrites:regenerate --entity-type=category // For category
    delete from url_rewrite where 1=1;

Then reindex

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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