How to delete and regenerate URL rewrites in Magento 2?Magento 2: Regenerate categories URL rewritesInquiry regarding url_path product attributeCustom URL rewrites for categories and productsCustom URL rewrite for reviews in MagentoURL Rewrite Management problem with rewritesCustom URL Rewrites - Deleting after reindexURL rewrites are not updated before catalog_product_save_commit_after hook fireswhat is the factory for url rewrites?How Can I Customize Magento Default URL (Product URL and Category URL)How can I regenerate URL Rewrites in Magento 2 StoreURL regenerate in magento 2Get current category or current product and then get its url in the other store store view

Creepy dinosaur pc game identification

The IT department bottlenecks progress. How should I handle this?

How could a planet have erratic days?

How to explain what's wrong with this application of the chain rule?

Do the primes contain an infinite almost arithmetic progression?

Can a stoichiometric mixture of oxygen and methane exist as a liquid at standard pressure and some (low) temperature?

Can a College of Swords bard use a Blade Flourish option on an opportunity attack provoked by their own Dissonant Whispers spell?

Picking the different solutions to the time independent Schrodinger eqaution

What is Cash Advance APR?

What does "Scientists rise up against statistical significance" mean? (Comment in Nature)

How does the math work for Perception checks?

What is the evidence for the "tyranny of the majority problem" in a direct democracy context?

Invalid date error by date command

Redundant comparison & "if" before assignment

Why does AES have exactly 10 rounds for a 128-bit key, 12 for 192 bits and 14 for a 256-bit key size?

PTIJ: Haman's bad computer

What is going on with 'gets(stdin)' on the site coderbyte?

15% tax on $7.5k earnings. Is that right?

Mimic lecturing on blackboard, facing audience

Can disgust be a key component of horror?

Pre-mixing cryogenic fuels and using only one fuel tank

Does an advisor owe his/her student anything? Will an advisor keep a PhD student only out of pity?

Why is so much work done on numerical verification of the Riemann Hypothesis?

What exact color does ozone gas have?



How to delete and regenerate URL rewrites in Magento 2?


Magento 2: Regenerate categories URL rewritesInquiry regarding url_path product attributeCustom URL rewrites for categories and productsCustom URL rewrite for reviews in MagentoURL Rewrite Management problem with rewritesCustom URL Rewrites - Deleting after reindexURL rewrites are not updated before catalog_product_save_commit_after hook fireswhat is the factory for url rewrites?How Can I Customize Magento Default URL (Product URL and Category URL)How can I regenerate URL Rewrites in Magento 2 StoreURL regenerate in magento 2Get current category or current product and then get its url in the other store store view













16















I have recently created 2 additional store view on magento 2 store.
Now the url of category and Products are not for those stores is not proper



Eg: http://example.com/catalog/category/view/s/pouches/id/20/
which is suppose to be http://example.com/accessories/pouches.html



Now when I save each product and category one by one it regenerate url rewrite for that product or category.



But there are lots of products and category.



So is there any way to regenerate URL rewrite



as in Magento 1.x it can be done via reindexing.










share|improve this question
























  • In Magento 2 url rewrite module does not use Indexer to create rewrites. Rewrite is generated in process of save/import of product/categories/cms pages. So you might need to go the programmatically way of loading and saving the categories

    – mp196
    Jan 11 '17 at 7:09












  • can you suggest me some reference to create script to do so.

    – Arun Karnawat
    Jan 11 '17 at 7:21











  • You need to Re indexing again.

    – Vaibhav Jain
    Jan 11 '17 at 8:02











  • I have already try indexing, There is not URL Rewrite Index in Magento 2. So it do not worked. I have reindex now again, its not working

    – Arun Karnawat
    Jan 11 '17 at 8:42






  • 1





    For products what you try is select all of them from grid, And select update attributes and in websites tab select the website (though products are already assigned to the same website) This shall resave the product and might regenerate url rewrites.

    – mp196
    Jan 11 '17 at 8:49















16















I have recently created 2 additional store view on magento 2 store.
Now the url of category and Products are not for those stores is not proper



Eg: http://example.com/catalog/category/view/s/pouches/id/20/
which is suppose to be http://example.com/accessories/pouches.html



Now when I save each product and category one by one it regenerate url rewrite for that product or category.



But there are lots of products and category.



So is there any way to regenerate URL rewrite



as in Magento 1.x it can be done via reindexing.










share|improve this question
























  • In Magento 2 url rewrite module does not use Indexer to create rewrites. Rewrite is generated in process of save/import of product/categories/cms pages. So you might need to go the programmatically way of loading and saving the categories

    – mp196
    Jan 11 '17 at 7:09












  • can you suggest me some reference to create script to do so.

    – Arun Karnawat
    Jan 11 '17 at 7:21











  • You need to Re indexing again.

    – Vaibhav Jain
    Jan 11 '17 at 8:02











  • I have already try indexing, There is not URL Rewrite Index in Magento 2. So it do not worked. I have reindex now again, its not working

    – Arun Karnawat
    Jan 11 '17 at 8:42






  • 1





    For products what you try is select all of them from grid, And select update attributes and in websites tab select the website (though products are already assigned to the same website) This shall resave the product and might regenerate url rewrites.

    – mp196
    Jan 11 '17 at 8:49













16












16








16


3






I have recently created 2 additional store view on magento 2 store.
Now the url of category and Products are not for those stores is not proper



Eg: http://example.com/catalog/category/view/s/pouches/id/20/
which is suppose to be http://example.com/accessories/pouches.html



Now when I save each product and category one by one it regenerate url rewrite for that product or category.



But there are lots of products and category.



So is there any way to regenerate URL rewrite



as in Magento 1.x it can be done via reindexing.










share|improve this question
















I have recently created 2 additional store view on magento 2 store.
Now the url of category and Products are not for those stores is not proper



Eg: http://example.com/catalog/category/view/s/pouches/id/20/
which is suppose to be http://example.com/accessories/pouches.html



Now when I save each product and category one by one it regenerate url rewrite for that product or category.



But there are lots of products and category.



So is there any way to regenerate URL rewrite



as in Magento 1.x it can be done via reindexing.







magento2 url-rewrite






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 7 at 9:23









Teja Bhagavan Kollepara

3,00641949




3,00641949










asked Jan 11 '17 at 6:56









Arun KarnawatArun Karnawat

1,40021844




1,40021844












  • In Magento 2 url rewrite module does not use Indexer to create rewrites. Rewrite is generated in process of save/import of product/categories/cms pages. So you might need to go the programmatically way of loading and saving the categories

    – mp196
    Jan 11 '17 at 7:09












  • can you suggest me some reference to create script to do so.

    – Arun Karnawat
    Jan 11 '17 at 7:21











  • You need to Re indexing again.

    – Vaibhav Jain
    Jan 11 '17 at 8:02











  • I have already try indexing, There is not URL Rewrite Index in Magento 2. So it do not worked. I have reindex now again, its not working

    – Arun Karnawat
    Jan 11 '17 at 8:42






  • 1





    For products what you try is select all of them from grid, And select update attributes and in websites tab select the website (though products are already assigned to the same website) This shall resave the product and might regenerate url rewrites.

    – mp196
    Jan 11 '17 at 8:49

















  • In Magento 2 url rewrite module does not use Indexer to create rewrites. Rewrite is generated in process of save/import of product/categories/cms pages. So you might need to go the programmatically way of loading and saving the categories

    – mp196
    Jan 11 '17 at 7:09












  • can you suggest me some reference to create script to do so.

    – Arun Karnawat
    Jan 11 '17 at 7:21











  • You need to Re indexing again.

    – Vaibhav Jain
    Jan 11 '17 at 8:02











  • I have already try indexing, There is not URL Rewrite Index in Magento 2. So it do not worked. I have reindex now again, its not working

    – Arun Karnawat
    Jan 11 '17 at 8:42






  • 1





    For products what you try is select all of them from grid, And select update attributes and in websites tab select the website (though products are already assigned to the same website) This shall resave the product and might regenerate url rewrites.

    – mp196
    Jan 11 '17 at 8:49
















In Magento 2 url rewrite module does not use Indexer to create rewrites. Rewrite is generated in process of save/import of product/categories/cms pages. So you might need to go the programmatically way of loading and saving the categories

– mp196
Jan 11 '17 at 7:09






In Magento 2 url rewrite module does not use Indexer to create rewrites. Rewrite is generated in process of save/import of product/categories/cms pages. So you might need to go the programmatically way of loading and saving the categories

– mp196
Jan 11 '17 at 7:09














can you suggest me some reference to create script to do so.

– Arun Karnawat
Jan 11 '17 at 7:21





can you suggest me some reference to create script to do so.

– Arun Karnawat
Jan 11 '17 at 7:21













You need to Re indexing again.

– Vaibhav Jain
Jan 11 '17 at 8:02





You need to Re indexing again.

– Vaibhav Jain
Jan 11 '17 at 8:02













I have already try indexing, There is not URL Rewrite Index in Magento 2. So it do not worked. I have reindex now again, its not working

– Arun Karnawat
Jan 11 '17 at 8:42





I have already try indexing, There is not URL Rewrite Index in Magento 2. So it do not worked. I have reindex now again, its not working

– Arun Karnawat
Jan 11 '17 at 8:42




1




1





For products what you try is select all of them from grid, And select update attributes and in websites tab select the website (though products are already assigned to the same website) This shall resave the product and might regenerate url rewrites.

– mp196
Jan 11 '17 at 8:49





For products what you try is select all of them from grid, And select update attributes and in websites tab select the website (though products are already assigned to the same website) This shall resave the product and might regenerate url rewrites.

– mp196
Jan 11 '17 at 8:49










10 Answers
10






active

oldest

votes


















10














This module is been deprecated you can use this module instead



Download Using Composer;




composer require elgentos/regenerate-catalog-urls



php bin/magento setup:upgrade




Regenerate url for all products and the global store




php bin/magento regenerate:product




Regenerate url for products with id (1, 2, 3, 4) for store 1




php bin/magento regenerate:product:url -s1 1 2 3 4







share|improve this answer

























  • that module is buggy, but still can help in some cases.

    – Gediminas
    Jun 26 '17 at 13:36












  • Yes, and it will be helpful for us to use those methods to trigger product url rewrites.

    – Mahendra Jella
    Jun 27 '17 at 8:15






  • 1





    Currently, doesn't work in 2.1.9 ...

    – Spyrule
    Oct 17 '17 at 20:55











  • @Spyrule I'm on 2.1.9 and experienced issues. However after logging my issue, someone pointed me to this pull request that hasnt been approved yet works a charm for me: github.com/Iazel/magento2-regenurl/pull/21/commits/…

    – David Wilkinson
    Oct 18 '17 at 14:45












  • @Gerdiminas what bugs do you know about?

    – harri
    Nov 9 '17 at 16:38


















13














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



To re-generate all Url rewrites of the categories/products in all stores (it support a multistores) run:



$> bin/magento ok:urlrewrites:regenerate


To regenerate Url rewrites in the specific store view (e.g.: store view id is "2"):



$> bin/magento ok:urlrewrites:regenerate 2





share|improve this answer




















  • 1





    This extension working perfectly for me. Thanks for your extension.

    – mapaladiya
    Dec 20 '17 at 2:09











  • it works very good! thx!

    – LucScu
    Feb 2 '18 at 16:27











  • Does this delete the old rewrites?

    – Matthew McLennan
    Feb 14 '18 at 18:46






  • 1





    Is it still working? It doesn't for me.

    – Kirby
    Nov 7 '18 at 14:43






  • 1





    @OlegKoval I have installed version 1.3.1 but still it doesn't work for me. So what is the issue behind this?

    – Chintan Kaneriya
    Dec 18 '18 at 11:28


















3














In update to @mahendra Jella's answer, Try this branch of the same extension:
https://github.com/PascalBrouwers/magento2-regenurl/tree/feature/generate_category



This one can regenerate URLs for categories too.



The command goes as follows:



php bin/magento iazel:regenurl
# Regenrate Category URL keys >
php bin/magento iazel:regenerate_urls





share|improve this answer























  • This extension worked beautifully for me in 2.1.9. Helped identify duplicate url products by ID as well (albeit, a minor update to list the sku would be useful).

    – Spyrule
    Oct 17 '17 at 22:34


















0














So, I had this issue for products and fixed this by using the mass update feature to remove all products from the store and then re-adding them. I didn't have very many categories, so I just went in and re-saved them.



Overall, I think avoiding the ole' truncate and regenerate tactic we did in Magento 1 is probably best. If your product rewrites look wrong, just do what I posted above and that should correct them.






share|improve this answer






























    0














    As per I know Magento 2 does not provide this feature, but I am using this extension



    http://shreejiinfosys.co.in/url-rewrite-generator-magento-2.html



    from this I can able to regenerate category and all product url.




    Note: I am not promoting the extension hence I am using this extension
    and its quite useful for me.







    share|improve this answer






























      0














      I too had that issue, I m using magento 1.9.2.4, magento does no provide any method to regenerate custom urls. So what i did is little off the table, and it solved the issue, i never tried magento url rewrite extension so can not say how they work.




      Note- Maybe you should not consider this if you have too many custom url rewrite.




      Magento regenerates its default redirects so if a custom rewrite causing an issue, you can truncate core_url_rewrite table from your magento database.



      enter image description here




      Be sure to make backup of the database before doing so.







      share|improve this answer























      • That is the whole point unlike magento 1, magento 2 do not have index to regenerate url. Question Is about Magento 2.1

        – Arun Karnawat
        Sep 8 '17 at 8:15


















      0














      Unfortunately none of these extensions/modules have worked for me. I have about 4000 products and moving from Magento 1.9.2.4 to 2.2.2. I used the Data Migration tool and it worked like a charm, other than this issue.



      Some of my products have url keys and some do not. I only have one store which is the frustrating part. It looks like Magento considers the admin a store.



      The only thing that has worked for me was importing the products with 'replace' option. And for SEO purposes I don't want to change the url's of my products, not even if it's just adding a number after.



      I'm going to try deleting the url rewrites for products only.






      share|improve this answer






























        0














        I ran into a similar problem. In Magento 1, it was possible to truncate the url rewrite table and reindex. Magento 2 does not have a url rewrite indexer, so this is not an option.



        Many suggest the Iazel extension. I went with the extension by Olgeg Koval, and it worked beautifully. Running Magento 2.2, it deleted all existing url rewrites and regenerated them for all store views. Zero problems.






        share|improve this answer






























          0














          All you need to do in order to regenerate rewrites is to initiate a rewrite. Go to a category or product and change its url in the SEO section of the product/category by adding a "a-" to the front of it. For example:



          Url = "product-name"
          New Url = "a-product-name"



          This will trigger the rewrite and redo all other rewrites.






          share|improve this answer






























            0














            There is actually an easy way to fix this without a lot of trouble. For the TL:DR people, the bold parts are relevant.



            One thing to check first; if you have multiple store views, go into the product and switch the view to particular view. Scroll down and make sure the URL-Key is set to "Use Default Value". If that isn't checked, it will never generate. I think this can happen when you import M1 products. I had 200+ products that needed touched up.



            This fix also helps if you do the trick where you switch your store to a different root and back, which cleans out everything. Including your custom ones. And it can finish with nothing but the category URL's. Not sure why the URL generation for products fails completely but I think it's because Magento is trying to make too many links in one operation which fails.



            So give this a shot. Open the URL rewrite window and note the number of entries. This let's you know if it works.



            Go into a first level category (it doesn't work on default because is doesn't have a URL key). Scroll down to Search Engine Optimization / URL-Key. Add an X to the end of the key. Uncheck the "Create Permanent Redirect for old URL", it only adds more work to the operation. Save your category.



            Repeat the operation and remove the X, again uncheck the "Create Permanent Redirect for old URL", because you don't need those old URL's clogging up the table. Save again.



            Refresh the URL rewrite page and you should see a new number, and shiny new URL's.



            Repeat as needed.



            FYI really big categories may time out. So in those cases, do the smaller sub-categories by themselves. On my server that threshold is about 400 entries.



            Magento is smart enough to make the links for the category above your sub-categories. It is also smart enough that when it see's a product in another category, it builds the links for there too.



            Took me a while to figure out why I was seeing fewer and fewer links added as I went down the category list. It was because a majority of products were already in the table and just the stragglers that hadn't appears before remained.






            share|improve this answer








            New contributor




            Brokentusk is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.



















              Your Answer








              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "479"
              ;
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function()
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled)
              StackExchange.using("snippets", function()
              createEditor();
              );

              else
              createEditor();

              );

              function createEditor()
              StackExchange.prepareEditor(
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: false,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: null,
              bindNavPrevention: true,
              postfix: "",
              imageUploader:
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              ,
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              );



              );













              draft saved

              draft discarded


















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f154139%2fhow-to-delete-and-regenerate-url-rewrites-in-magento-2%23new-answer', 'question_page');

              );

              Post as a guest















              Required, but never shown

























              10 Answers
              10






              active

              oldest

              votes








              10 Answers
              10






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              10














              This module is been deprecated you can use this module instead



              Download Using Composer;




              composer require elgentos/regenerate-catalog-urls



              php bin/magento setup:upgrade




              Regenerate url for all products and the global store




              php bin/magento regenerate:product




              Regenerate url for products with id (1, 2, 3, 4) for store 1




              php bin/magento regenerate:product:url -s1 1 2 3 4







              share|improve this answer

























              • that module is buggy, but still can help in some cases.

                – Gediminas
                Jun 26 '17 at 13:36












              • Yes, and it will be helpful for us to use those methods to trigger product url rewrites.

                – Mahendra Jella
                Jun 27 '17 at 8:15






              • 1





                Currently, doesn't work in 2.1.9 ...

                – Spyrule
                Oct 17 '17 at 20:55











              • @Spyrule I'm on 2.1.9 and experienced issues. However after logging my issue, someone pointed me to this pull request that hasnt been approved yet works a charm for me: github.com/Iazel/magento2-regenurl/pull/21/commits/…

                – David Wilkinson
                Oct 18 '17 at 14:45












              • @Gerdiminas what bugs do you know about?

                – harri
                Nov 9 '17 at 16:38















              10














              This module is been deprecated you can use this module instead



              Download Using Composer;




              composer require elgentos/regenerate-catalog-urls



              php bin/magento setup:upgrade




              Regenerate url for all products and the global store




              php bin/magento regenerate:product




              Regenerate url for products with id (1, 2, 3, 4) for store 1




              php bin/magento regenerate:product:url -s1 1 2 3 4







              share|improve this answer

























              • that module is buggy, but still can help in some cases.

                – Gediminas
                Jun 26 '17 at 13:36












              • Yes, and it will be helpful for us to use those methods to trigger product url rewrites.

                – Mahendra Jella
                Jun 27 '17 at 8:15






              • 1





                Currently, doesn't work in 2.1.9 ...

                – Spyrule
                Oct 17 '17 at 20:55











              • @Spyrule I'm on 2.1.9 and experienced issues. However after logging my issue, someone pointed me to this pull request that hasnt been approved yet works a charm for me: github.com/Iazel/magento2-regenurl/pull/21/commits/…

                – David Wilkinson
                Oct 18 '17 at 14:45












              • @Gerdiminas what bugs do you know about?

                – harri
                Nov 9 '17 at 16:38













              10












              10








              10







              This module is been deprecated you can use this module instead



              Download Using Composer;




              composer require elgentos/regenerate-catalog-urls



              php bin/magento setup:upgrade




              Regenerate url for all products and the global store




              php bin/magento regenerate:product




              Regenerate url for products with id (1, 2, 3, 4) for store 1




              php bin/magento regenerate:product:url -s1 1 2 3 4







              share|improve this answer















              This module is been deprecated you can use this module instead



              Download Using Composer;




              composer require elgentos/regenerate-catalog-urls



              php bin/magento setup:upgrade




              Regenerate url for all products and the global store




              php bin/magento regenerate:product




              Regenerate url for products with id (1, 2, 3, 4) for store 1




              php bin/magento regenerate:product:url -s1 1 2 3 4








              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Oct 4 '18 at 9:00









              Riddhish Bhayani

              436212




              436212










              answered Mar 28 '17 at 9:13









              Mahendra JellaMahendra Jella

              7561218




              7561218












              • that module is buggy, but still can help in some cases.

                – Gediminas
                Jun 26 '17 at 13:36












              • Yes, and it will be helpful for us to use those methods to trigger product url rewrites.

                – Mahendra Jella
                Jun 27 '17 at 8:15






              • 1





                Currently, doesn't work in 2.1.9 ...

                – Spyrule
                Oct 17 '17 at 20:55











              • @Spyrule I'm on 2.1.9 and experienced issues. However after logging my issue, someone pointed me to this pull request that hasnt been approved yet works a charm for me: github.com/Iazel/magento2-regenurl/pull/21/commits/…

                – David Wilkinson
                Oct 18 '17 at 14:45












              • @Gerdiminas what bugs do you know about?

                – harri
                Nov 9 '17 at 16:38

















              • that module is buggy, but still can help in some cases.

                – Gediminas
                Jun 26 '17 at 13:36












              • Yes, and it will be helpful for us to use those methods to trigger product url rewrites.

                – Mahendra Jella
                Jun 27 '17 at 8:15






              • 1





                Currently, doesn't work in 2.1.9 ...

                – Spyrule
                Oct 17 '17 at 20:55











              • @Spyrule I'm on 2.1.9 and experienced issues. However after logging my issue, someone pointed me to this pull request that hasnt been approved yet works a charm for me: github.com/Iazel/magento2-regenurl/pull/21/commits/…

                – David Wilkinson
                Oct 18 '17 at 14:45












              • @Gerdiminas what bugs do you know about?

                – harri
                Nov 9 '17 at 16:38
















              that module is buggy, but still can help in some cases.

              – Gediminas
              Jun 26 '17 at 13:36






              that module is buggy, but still can help in some cases.

              – Gediminas
              Jun 26 '17 at 13:36














              Yes, and it will be helpful for us to use those methods to trigger product url rewrites.

              – Mahendra Jella
              Jun 27 '17 at 8:15





              Yes, and it will be helpful for us to use those methods to trigger product url rewrites.

              – Mahendra Jella
              Jun 27 '17 at 8:15




              1




              1





              Currently, doesn't work in 2.1.9 ...

              – Spyrule
              Oct 17 '17 at 20:55





              Currently, doesn't work in 2.1.9 ...

              – Spyrule
              Oct 17 '17 at 20:55













              @Spyrule I'm on 2.1.9 and experienced issues. However after logging my issue, someone pointed me to this pull request that hasnt been approved yet works a charm for me: github.com/Iazel/magento2-regenurl/pull/21/commits/…

              – David Wilkinson
              Oct 18 '17 at 14:45






              @Spyrule I'm on 2.1.9 and experienced issues. However after logging my issue, someone pointed me to this pull request that hasnt been approved yet works a charm for me: github.com/Iazel/magento2-regenurl/pull/21/commits/…

              – David Wilkinson
              Oct 18 '17 at 14:45














              @Gerdiminas what bugs do you know about?

              – harri
              Nov 9 '17 at 16:38





              @Gerdiminas what bugs do you know about?

              – harri
              Nov 9 '17 at 16:38













              13














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



              To re-generate all Url rewrites of the categories/products in all stores (it support a multistores) run:



              $> bin/magento ok:urlrewrites:regenerate


              To regenerate Url rewrites in the specific store view (e.g.: store view id is "2"):



              $> bin/magento ok:urlrewrites:regenerate 2





              share|improve this answer




















              • 1





                This extension working perfectly for me. Thanks for your extension.

                – mapaladiya
                Dec 20 '17 at 2:09











              • it works very good! thx!

                – LucScu
                Feb 2 '18 at 16:27











              • Does this delete the old rewrites?

                – Matthew McLennan
                Feb 14 '18 at 18:46






              • 1





                Is it still working? It doesn't for me.

                – Kirby
                Nov 7 '18 at 14:43






              • 1





                @OlegKoval I have installed version 1.3.1 but still it doesn't work for me. So what is the issue behind this?

                – Chintan Kaneriya
                Dec 18 '18 at 11:28















              13














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



              To re-generate all Url rewrites of the categories/products in all stores (it support a multistores) run:



              $> bin/magento ok:urlrewrites:regenerate


              To regenerate Url rewrites in the specific store view (e.g.: store view id is "2"):



              $> bin/magento ok:urlrewrites:regenerate 2





              share|improve this answer




















              • 1





                This extension working perfectly for me. Thanks for your extension.

                – mapaladiya
                Dec 20 '17 at 2:09











              • it works very good! thx!

                – LucScu
                Feb 2 '18 at 16:27











              • Does this delete the old rewrites?

                – Matthew McLennan
                Feb 14 '18 at 18:46






              • 1





                Is it still working? It doesn't for me.

                – Kirby
                Nov 7 '18 at 14:43






              • 1





                @OlegKoval I have installed version 1.3.1 but still it doesn't work for me. So what is the issue behind this?

                – Chintan Kaneriya
                Dec 18 '18 at 11:28













              13












              13








              13







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



              To re-generate all Url rewrites of the categories/products in all stores (it support a multistores) run:



              $> bin/magento ok:urlrewrites:regenerate


              To regenerate Url rewrites in the specific store view (e.g.: store view id is "2"):



              $> bin/magento ok:urlrewrites:regenerate 2





              share|improve this answer















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



              To re-generate all Url rewrites of the categories/products in all stores (it support a multistores) run:



              $> bin/magento ok:urlrewrites:regenerate


              To regenerate Url rewrites in the specific store view (e.g.: store view id is "2"):



              $> bin/magento ok:urlrewrites:regenerate 2






              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Sep 24 '17 at 19:52

























              answered Sep 24 '17 at 13:28









              Oleg KovalOleg Koval

              16115




              16115







              • 1





                This extension working perfectly for me. Thanks for your extension.

                – mapaladiya
                Dec 20 '17 at 2:09











              • it works very good! thx!

                – LucScu
                Feb 2 '18 at 16:27











              • Does this delete the old rewrites?

                – Matthew McLennan
                Feb 14 '18 at 18:46






              • 1





                Is it still working? It doesn't for me.

                – Kirby
                Nov 7 '18 at 14:43






              • 1





                @OlegKoval I have installed version 1.3.1 but still it doesn't work for me. So what is the issue behind this?

                – Chintan Kaneriya
                Dec 18 '18 at 11:28












              • 1





                This extension working perfectly for me. Thanks for your extension.

                – mapaladiya
                Dec 20 '17 at 2:09











              • it works very good! thx!

                – LucScu
                Feb 2 '18 at 16:27











              • Does this delete the old rewrites?

                – Matthew McLennan
                Feb 14 '18 at 18:46






              • 1





                Is it still working? It doesn't for me.

                – Kirby
                Nov 7 '18 at 14:43






              • 1





                @OlegKoval I have installed version 1.3.1 but still it doesn't work for me. So what is the issue behind this?

                – Chintan Kaneriya
                Dec 18 '18 at 11:28







              1




              1





              This extension working perfectly for me. Thanks for your extension.

              – mapaladiya
              Dec 20 '17 at 2:09





              This extension working perfectly for me. Thanks for your extension.

              – mapaladiya
              Dec 20 '17 at 2:09













              it works very good! thx!

              – LucScu
              Feb 2 '18 at 16:27





              it works very good! thx!

              – LucScu
              Feb 2 '18 at 16:27













              Does this delete the old rewrites?

              – Matthew McLennan
              Feb 14 '18 at 18:46





              Does this delete the old rewrites?

              – Matthew McLennan
              Feb 14 '18 at 18:46




              1




              1





              Is it still working? It doesn't for me.

              – Kirby
              Nov 7 '18 at 14:43





              Is it still working? It doesn't for me.

              – Kirby
              Nov 7 '18 at 14:43




              1




              1





              @OlegKoval I have installed version 1.3.1 but still it doesn't work for me. So what is the issue behind this?

              – Chintan Kaneriya
              Dec 18 '18 at 11:28





              @OlegKoval I have installed version 1.3.1 but still it doesn't work for me. So what is the issue behind this?

              – Chintan Kaneriya
              Dec 18 '18 at 11:28











              3














              In update to @mahendra Jella's answer, Try this branch of the same extension:
              https://github.com/PascalBrouwers/magento2-regenurl/tree/feature/generate_category



              This one can regenerate URLs for categories too.



              The command goes as follows:



              php bin/magento iazel:regenurl
              # Regenrate Category URL keys >
              php bin/magento iazel:regenerate_urls





              share|improve this answer























              • This extension worked beautifully for me in 2.1.9. Helped identify duplicate url products by ID as well (albeit, a minor update to list the sku would be useful).

                – Spyrule
                Oct 17 '17 at 22:34















              3














              In update to @mahendra Jella's answer, Try this branch of the same extension:
              https://github.com/PascalBrouwers/magento2-regenurl/tree/feature/generate_category



              This one can regenerate URLs for categories too.



              The command goes as follows:



              php bin/magento iazel:regenurl
              # Regenrate Category URL keys >
              php bin/magento iazel:regenerate_urls





              share|improve this answer























              • This extension worked beautifully for me in 2.1.9. Helped identify duplicate url products by ID as well (albeit, a minor update to list the sku would be useful).

                – Spyrule
                Oct 17 '17 at 22:34













              3












              3








              3







              In update to @mahendra Jella's answer, Try this branch of the same extension:
              https://github.com/PascalBrouwers/magento2-regenurl/tree/feature/generate_category



              This one can regenerate URLs for categories too.



              The command goes as follows:



              php bin/magento iazel:regenurl
              # Regenrate Category URL keys >
              php bin/magento iazel:regenerate_urls





              share|improve this answer













              In update to @mahendra Jella's answer, Try this branch of the same extension:
              https://github.com/PascalBrouwers/magento2-regenurl/tree/feature/generate_category



              This one can regenerate URLs for categories too.



              The command goes as follows:



              php bin/magento iazel:regenurl
              # Regenrate Category URL keys >
              php bin/magento iazel:regenerate_urls






              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Aug 1 '17 at 21:41









              th3pirat3th3pirat3

              1635




              1635












              • This extension worked beautifully for me in 2.1.9. Helped identify duplicate url products by ID as well (albeit, a minor update to list the sku would be useful).

                – Spyrule
                Oct 17 '17 at 22:34

















              • This extension worked beautifully for me in 2.1.9. Helped identify duplicate url products by ID as well (albeit, a minor update to list the sku would be useful).

                – Spyrule
                Oct 17 '17 at 22:34
















              This extension worked beautifully for me in 2.1.9. Helped identify duplicate url products by ID as well (albeit, a minor update to list the sku would be useful).

              – Spyrule
              Oct 17 '17 at 22:34





              This extension worked beautifully for me in 2.1.9. Helped identify duplicate url products by ID as well (albeit, a minor update to list the sku would be useful).

              – Spyrule
              Oct 17 '17 at 22:34











              0














              So, I had this issue for products and fixed this by using the mass update feature to remove all products from the store and then re-adding them. I didn't have very many categories, so I just went in and re-saved them.



              Overall, I think avoiding the ole' truncate and regenerate tactic we did in Magento 1 is probably best. If your product rewrites look wrong, just do what I posted above and that should correct them.






              share|improve this answer



























                0














                So, I had this issue for products and fixed this by using the mass update feature to remove all products from the store and then re-adding them. I didn't have very many categories, so I just went in and re-saved them.



                Overall, I think avoiding the ole' truncate and regenerate tactic we did in Magento 1 is probably best. If your product rewrites look wrong, just do what I posted above and that should correct them.






                share|improve this answer

























                  0












                  0








                  0







                  So, I had this issue for products and fixed this by using the mass update feature to remove all products from the store and then re-adding them. I didn't have very many categories, so I just went in and re-saved them.



                  Overall, I think avoiding the ole' truncate and regenerate tactic we did in Magento 1 is probably best. If your product rewrites look wrong, just do what I posted above and that should correct them.






                  share|improve this answer













                  So, I had this issue for products and fixed this by using the mass update feature to remove all products from the store and then re-adding them. I didn't have very many categories, so I just went in and re-saved them.



                  Overall, I think avoiding the ole' truncate and regenerate tactic we did in Magento 1 is probably best. If your product rewrites look wrong, just do what I posted above and that should correct them.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Apr 10 '17 at 17:11









                  espradleyespradley

                  1974




                  1974





















                      0














                      As per I know Magento 2 does not provide this feature, but I am using this extension



                      http://shreejiinfosys.co.in/url-rewrite-generator-magento-2.html



                      from this I can able to regenerate category and all product url.




                      Note: I am not promoting the extension hence I am using this extension
                      and its quite useful for me.







                      share|improve this answer



























                        0














                        As per I know Magento 2 does not provide this feature, but I am using this extension



                        http://shreejiinfosys.co.in/url-rewrite-generator-magento-2.html



                        from this I can able to regenerate category and all product url.




                        Note: I am not promoting the extension hence I am using this extension
                        and its quite useful for me.







                        share|improve this answer

























                          0












                          0








                          0







                          As per I know Magento 2 does not provide this feature, but I am using this extension



                          http://shreejiinfosys.co.in/url-rewrite-generator-magento-2.html



                          from this I can able to regenerate category and all product url.




                          Note: I am not promoting the extension hence I am using this extension
                          and its quite useful for me.







                          share|improve this answer













                          As per I know Magento 2 does not provide this feature, but I am using this extension



                          http://shreejiinfosys.co.in/url-rewrite-generator-magento-2.html



                          from this I can able to regenerate category and all product url.




                          Note: I am not promoting the extension hence I am using this extension
                          and its quite useful for me.








                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Sep 7 '17 at 18:36









                          SmithSmith

                          3315




                          3315





















                              0














                              I too had that issue, I m using magento 1.9.2.4, magento does no provide any method to regenerate custom urls. So what i did is little off the table, and it solved the issue, i never tried magento url rewrite extension so can not say how they work.




                              Note- Maybe you should not consider this if you have too many custom url rewrite.




                              Magento regenerates its default redirects so if a custom rewrite causing an issue, you can truncate core_url_rewrite table from your magento database.



                              enter image description here




                              Be sure to make backup of the database before doing so.







                              share|improve this answer























                              • That is the whole point unlike magento 1, magento 2 do not have index to regenerate url. Question Is about Magento 2.1

                                – Arun Karnawat
                                Sep 8 '17 at 8:15















                              0














                              I too had that issue, I m using magento 1.9.2.4, magento does no provide any method to regenerate custom urls. So what i did is little off the table, and it solved the issue, i never tried magento url rewrite extension so can not say how they work.




                              Note- Maybe you should not consider this if you have too many custom url rewrite.




                              Magento regenerates its default redirects so if a custom rewrite causing an issue, you can truncate core_url_rewrite table from your magento database.



                              enter image description here




                              Be sure to make backup of the database before doing so.







                              share|improve this answer























                              • That is the whole point unlike magento 1, magento 2 do not have index to regenerate url. Question Is about Magento 2.1

                                – Arun Karnawat
                                Sep 8 '17 at 8:15













                              0












                              0








                              0







                              I too had that issue, I m using magento 1.9.2.4, magento does no provide any method to regenerate custom urls. So what i did is little off the table, and it solved the issue, i never tried magento url rewrite extension so can not say how they work.




                              Note- Maybe you should not consider this if you have too many custom url rewrite.




                              Magento regenerates its default redirects so if a custom rewrite causing an issue, you can truncate core_url_rewrite table from your magento database.



                              enter image description here




                              Be sure to make backup of the database before doing so.







                              share|improve this answer













                              I too had that issue, I m using magento 1.9.2.4, magento does no provide any method to regenerate custom urls. So what i did is little off the table, and it solved the issue, i never tried magento url rewrite extension so can not say how they work.




                              Note- Maybe you should not consider this if you have too many custom url rewrite.




                              Magento regenerates its default redirects so if a custom rewrite causing an issue, you can truncate core_url_rewrite table from your magento database.



                              enter image description here




                              Be sure to make backup of the database before doing so.








                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered Sep 7 '17 at 19:43









                              Lalit838Lalit838

                              313112




                              313112












                              • That is the whole point unlike magento 1, magento 2 do not have index to regenerate url. Question Is about Magento 2.1

                                – Arun Karnawat
                                Sep 8 '17 at 8:15

















                              • That is the whole point unlike magento 1, magento 2 do not have index to regenerate url. Question Is about Magento 2.1

                                – Arun Karnawat
                                Sep 8 '17 at 8:15
















                              That is the whole point unlike magento 1, magento 2 do not have index to regenerate url. Question Is about Magento 2.1

                              – Arun Karnawat
                              Sep 8 '17 at 8:15





                              That is the whole point unlike magento 1, magento 2 do not have index to regenerate url. Question Is about Magento 2.1

                              – Arun Karnawat
                              Sep 8 '17 at 8:15











                              0














                              Unfortunately none of these extensions/modules have worked for me. I have about 4000 products and moving from Magento 1.9.2.4 to 2.2.2. I used the Data Migration tool and it worked like a charm, other than this issue.



                              Some of my products have url keys and some do not. I only have one store which is the frustrating part. It looks like Magento considers the admin a store.



                              The only thing that has worked for me was importing the products with 'replace' option. And for SEO purposes I don't want to change the url's of my products, not even if it's just adding a number after.



                              I'm going to try deleting the url rewrites for products only.






                              share|improve this answer



























                                0














                                Unfortunately none of these extensions/modules have worked for me. I have about 4000 products and moving from Magento 1.9.2.4 to 2.2.2. I used the Data Migration tool and it worked like a charm, other than this issue.



                                Some of my products have url keys and some do not. I only have one store which is the frustrating part. It looks like Magento considers the admin a store.



                                The only thing that has worked for me was importing the products with 'replace' option. And for SEO purposes I don't want to change the url's of my products, not even if it's just adding a number after.



                                I'm going to try deleting the url rewrites for products only.






                                share|improve this answer

























                                  0












                                  0








                                  0







                                  Unfortunately none of these extensions/modules have worked for me. I have about 4000 products and moving from Magento 1.9.2.4 to 2.2.2. I used the Data Migration tool and it worked like a charm, other than this issue.



                                  Some of my products have url keys and some do not. I only have one store which is the frustrating part. It looks like Magento considers the admin a store.



                                  The only thing that has worked for me was importing the products with 'replace' option. And for SEO purposes I don't want to change the url's of my products, not even if it's just adding a number after.



                                  I'm going to try deleting the url rewrites for products only.






                                  share|improve this answer













                                  Unfortunately none of these extensions/modules have worked for me. I have about 4000 products and moving from Magento 1.9.2.4 to 2.2.2. I used the Data Migration tool and it worked like a charm, other than this issue.



                                  Some of my products have url keys and some do not. I only have one store which is the frustrating part. It looks like Magento considers the admin a store.



                                  The only thing that has worked for me was importing the products with 'replace' option. And for SEO purposes I don't want to change the url's of my products, not even if it's just adding a number after.



                                  I'm going to try deleting the url rewrites for products only.







                                  share|improve this answer












                                  share|improve this answer



                                  share|improve this answer










                                  answered Jan 25 '18 at 18:24









                                  blueflymediablueflymedia

                                  1




                                  1





















                                      0














                                      I ran into a similar problem. In Magento 1, it was possible to truncate the url rewrite table and reindex. Magento 2 does not have a url rewrite indexer, so this is not an option.



                                      Many suggest the Iazel extension. I went with the extension by Olgeg Koval, and it worked beautifully. Running Magento 2.2, it deleted all existing url rewrites and regenerated them for all store views. Zero problems.






                                      share|improve this answer



























                                        0














                                        I ran into a similar problem. In Magento 1, it was possible to truncate the url rewrite table and reindex. Magento 2 does not have a url rewrite indexer, so this is not an option.



                                        Many suggest the Iazel extension. I went with the extension by Olgeg Koval, and it worked beautifully. Running Magento 2.2, it deleted all existing url rewrites and regenerated them for all store views. Zero problems.






                                        share|improve this answer

























                                          0












                                          0








                                          0







                                          I ran into a similar problem. In Magento 1, it was possible to truncate the url rewrite table and reindex. Magento 2 does not have a url rewrite indexer, so this is not an option.



                                          Many suggest the Iazel extension. I went with the extension by Olgeg Koval, and it worked beautifully. Running Magento 2.2, it deleted all existing url rewrites and regenerated them for all store views. Zero problems.






                                          share|improve this answer













                                          I ran into a similar problem. In Magento 1, it was possible to truncate the url rewrite table and reindex. Magento 2 does not have a url rewrite indexer, so this is not an option.



                                          Many suggest the Iazel extension. I went with the extension by Olgeg Koval, and it worked beautifully. Running Magento 2.2, it deleted all existing url rewrites and regenerated them for all store views. Zero problems.







                                          share|improve this answer












                                          share|improve this answer



                                          share|improve this answer










                                          answered Mar 2 '18 at 4:25









                                          SL02SL02

                                          1




                                          1





















                                              0














                                              All you need to do in order to regenerate rewrites is to initiate a rewrite. Go to a category or product and change its url in the SEO section of the product/category by adding a "a-" to the front of it. For example:



                                              Url = "product-name"
                                              New Url = "a-product-name"



                                              This will trigger the rewrite and redo all other rewrites.






                                              share|improve this answer



























                                                0














                                                All you need to do in order to regenerate rewrites is to initiate a rewrite. Go to a category or product and change its url in the SEO section of the product/category by adding a "a-" to the front of it. For example:



                                                Url = "product-name"
                                                New Url = "a-product-name"



                                                This will trigger the rewrite and redo all other rewrites.






                                                share|improve this answer

























                                                  0












                                                  0








                                                  0







                                                  All you need to do in order to regenerate rewrites is to initiate a rewrite. Go to a category or product and change its url in the SEO section of the product/category by adding a "a-" to the front of it. For example:



                                                  Url = "product-name"
                                                  New Url = "a-product-name"



                                                  This will trigger the rewrite and redo all other rewrites.






                                                  share|improve this answer













                                                  All you need to do in order to regenerate rewrites is to initiate a rewrite. Go to a category or product and change its url in the SEO section of the product/category by adding a "a-" to the front of it. For example:



                                                  Url = "product-name"
                                                  New Url = "a-product-name"



                                                  This will trigger the rewrite and redo all other rewrites.







                                                  share|improve this answer












                                                  share|improve this answer



                                                  share|improve this answer










                                                  answered Jan 11 at 10:17









                                                  rupert_brupert_b

                                                  164




                                                  164





















                                                      0














                                                      There is actually an easy way to fix this without a lot of trouble. For the TL:DR people, the bold parts are relevant.



                                                      One thing to check first; if you have multiple store views, go into the product and switch the view to particular view. Scroll down and make sure the URL-Key is set to "Use Default Value". If that isn't checked, it will never generate. I think this can happen when you import M1 products. I had 200+ products that needed touched up.



                                                      This fix also helps if you do the trick where you switch your store to a different root and back, which cleans out everything. Including your custom ones. And it can finish with nothing but the category URL's. Not sure why the URL generation for products fails completely but I think it's because Magento is trying to make too many links in one operation which fails.



                                                      So give this a shot. Open the URL rewrite window and note the number of entries. This let's you know if it works.



                                                      Go into a first level category (it doesn't work on default because is doesn't have a URL key). Scroll down to Search Engine Optimization / URL-Key. Add an X to the end of the key. Uncheck the "Create Permanent Redirect for old URL", it only adds more work to the operation. Save your category.



                                                      Repeat the operation and remove the X, again uncheck the "Create Permanent Redirect for old URL", because you don't need those old URL's clogging up the table. Save again.



                                                      Refresh the URL rewrite page and you should see a new number, and shiny new URL's.



                                                      Repeat as needed.



                                                      FYI really big categories may time out. So in those cases, do the smaller sub-categories by themselves. On my server that threshold is about 400 entries.



                                                      Magento is smart enough to make the links for the category above your sub-categories. It is also smart enough that when it see's a product in another category, it builds the links for there too.



                                                      Took me a while to figure out why I was seeing fewer and fewer links added as I went down the category list. It was because a majority of products were already in the table and just the stragglers that hadn't appears before remained.






                                                      share|improve this answer








                                                      New contributor




                                                      Brokentusk is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                      Check out our Code of Conduct.
























                                                        0














                                                        There is actually an easy way to fix this without a lot of trouble. For the TL:DR people, the bold parts are relevant.



                                                        One thing to check first; if you have multiple store views, go into the product and switch the view to particular view. Scroll down and make sure the URL-Key is set to "Use Default Value". If that isn't checked, it will never generate. I think this can happen when you import M1 products. I had 200+ products that needed touched up.



                                                        This fix also helps if you do the trick where you switch your store to a different root and back, which cleans out everything. Including your custom ones. And it can finish with nothing but the category URL's. Not sure why the URL generation for products fails completely but I think it's because Magento is trying to make too many links in one operation which fails.



                                                        So give this a shot. Open the URL rewrite window and note the number of entries. This let's you know if it works.



                                                        Go into a first level category (it doesn't work on default because is doesn't have a URL key). Scroll down to Search Engine Optimization / URL-Key. Add an X to the end of the key. Uncheck the "Create Permanent Redirect for old URL", it only adds more work to the operation. Save your category.



                                                        Repeat the operation and remove the X, again uncheck the "Create Permanent Redirect for old URL", because you don't need those old URL's clogging up the table. Save again.



                                                        Refresh the URL rewrite page and you should see a new number, and shiny new URL's.



                                                        Repeat as needed.



                                                        FYI really big categories may time out. So in those cases, do the smaller sub-categories by themselves. On my server that threshold is about 400 entries.



                                                        Magento is smart enough to make the links for the category above your sub-categories. It is also smart enough that when it see's a product in another category, it builds the links for there too.



                                                        Took me a while to figure out why I was seeing fewer and fewer links added as I went down the category list. It was because a majority of products were already in the table and just the stragglers that hadn't appears before remained.






                                                        share|improve this answer








                                                        New contributor




                                                        Brokentusk is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                        Check out our Code of Conduct.






















                                                          0












                                                          0








                                                          0







                                                          There is actually an easy way to fix this without a lot of trouble. For the TL:DR people, the bold parts are relevant.



                                                          One thing to check first; if you have multiple store views, go into the product and switch the view to particular view. Scroll down and make sure the URL-Key is set to "Use Default Value". If that isn't checked, it will never generate. I think this can happen when you import M1 products. I had 200+ products that needed touched up.



                                                          This fix also helps if you do the trick where you switch your store to a different root and back, which cleans out everything. Including your custom ones. And it can finish with nothing but the category URL's. Not sure why the URL generation for products fails completely but I think it's because Magento is trying to make too many links in one operation which fails.



                                                          So give this a shot. Open the URL rewrite window and note the number of entries. This let's you know if it works.



                                                          Go into a first level category (it doesn't work on default because is doesn't have a URL key). Scroll down to Search Engine Optimization / URL-Key. Add an X to the end of the key. Uncheck the "Create Permanent Redirect for old URL", it only adds more work to the operation. Save your category.



                                                          Repeat the operation and remove the X, again uncheck the "Create Permanent Redirect for old URL", because you don't need those old URL's clogging up the table. Save again.



                                                          Refresh the URL rewrite page and you should see a new number, and shiny new URL's.



                                                          Repeat as needed.



                                                          FYI really big categories may time out. So in those cases, do the smaller sub-categories by themselves. On my server that threshold is about 400 entries.



                                                          Magento is smart enough to make the links for the category above your sub-categories. It is also smart enough that when it see's a product in another category, it builds the links for there too.



                                                          Took me a while to figure out why I was seeing fewer and fewer links added as I went down the category list. It was because a majority of products were already in the table and just the stragglers that hadn't appears before remained.






                                                          share|improve this answer








                                                          New contributor




                                                          Brokentusk is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                          Check out our Code of Conduct.










                                                          There is actually an easy way to fix this without a lot of trouble. For the TL:DR people, the bold parts are relevant.



                                                          One thing to check first; if you have multiple store views, go into the product and switch the view to particular view. Scroll down and make sure the URL-Key is set to "Use Default Value". If that isn't checked, it will never generate. I think this can happen when you import M1 products. I had 200+ products that needed touched up.



                                                          This fix also helps if you do the trick where you switch your store to a different root and back, which cleans out everything. Including your custom ones. And it can finish with nothing but the category URL's. Not sure why the URL generation for products fails completely but I think it's because Magento is trying to make too many links in one operation which fails.



                                                          So give this a shot. Open the URL rewrite window and note the number of entries. This let's you know if it works.



                                                          Go into a first level category (it doesn't work on default because is doesn't have a URL key). Scroll down to Search Engine Optimization / URL-Key. Add an X to the end of the key. Uncheck the "Create Permanent Redirect for old URL", it only adds more work to the operation. Save your category.



                                                          Repeat the operation and remove the X, again uncheck the "Create Permanent Redirect for old URL", because you don't need those old URL's clogging up the table. Save again.



                                                          Refresh the URL rewrite page and you should see a new number, and shiny new URL's.



                                                          Repeat as needed.



                                                          FYI really big categories may time out. So in those cases, do the smaller sub-categories by themselves. On my server that threshold is about 400 entries.



                                                          Magento is smart enough to make the links for the category above your sub-categories. It is also smart enough that when it see's a product in another category, it builds the links for there too.



                                                          Took me a while to figure out why I was seeing fewer and fewer links added as I went down the category list. It was because a majority of products were already in the table and just the stragglers that hadn't appears before remained.







                                                          share|improve this answer








                                                          New contributor




                                                          Brokentusk is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                          Check out our Code of Conduct.









                                                          share|improve this answer



                                                          share|improve this answer






                                                          New contributor




                                                          Brokentusk is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                          Check out our Code of Conduct.









                                                          answered yesterday









                                                          BrokentuskBrokentusk

                                                          1




                                                          1




                                                          New contributor




                                                          Brokentusk is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                          Check out our Code of Conduct.





                                                          New contributor





                                                          Brokentusk is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                          Check out our Code of Conduct.






                                                          Brokentusk is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                                                          Check out our Code of Conduct.



























                                                              draft saved

                                                              draft discarded
















































                                                              Thanks for contributing an answer to Magento Stack Exchange!


                                                              • Please be sure to answer the question. Provide details and share your research!

                                                              But avoid


                                                              • Asking for help, clarification, or responding to other answers.

                                                              • Making statements based on opinion; back them up with references or personal experience.

                                                              To learn more, see our tips on writing great answers.




                                                              draft saved


                                                              draft discarded














                                                              StackExchange.ready(
                                                              function ()
                                                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f154139%2fhow-to-delete-and-regenerate-url-rewrites-in-magento-2%23new-answer', 'question_page');

                                                              );

                                                              Post as a guest















                                                              Required, but never shown





















































                                                              Required, but never shown














                                                              Required, but never shown












                                                              Required, but never shown







                                                              Required, but never shown

































                                                              Required, but never shown














                                                              Required, but never shown












                                                              Required, but never shown







                                                              Required, but never shown







                                                              Popular posts from this blog

                                                              Sum ergo cogito? 1 nng

                                                              419 nièngy_Soadمي 19bal1.5o_g

                                                              Queiggey Chernihivv 9NnOo i Zw X QqKk LpB