Url Optimization After Migration

Url Optimization After Migration

Compatible With: Community 2.1, 2.2

Tech Specifications

Current Version:
Stable Build
14 December, 2017
Extensions, Site Optimization, Performance
License Type:


Vital fixes to improve perfomance of your Magento store.


Back to top

Migration from Magento 1 to Magento 2 often leads to problems saving some categories on the backend. This unavoidable error appears: “URL key for specified store already exists”. Our team has thoroughly investigated the problem and come to a conclusion there is no unified and reliable solution to thrash out the problem. Even if you managed to remove all duplicated URLs, the error would surface again after another "Save" procedure.

The extension can help you remedy all post-migration defects relating to URLs. Just in one SSH command. As a result of it, you get:

  • all URLs unique
  • properly regenerated url_rewrite table (Reindex URL Rewrites)
  • bug-free Magento 2 with regard to URLs 


There are numerous reasons for the error “URL key for specified store already exists”. We can name the most prominent one, which is the fact there must be some overlapping URL keys between products, categories and CMS Pages. Magento 1 is indulgent to such cases and would solve the dilemma with duplicated URLs by appending [url_key]-1, [url_key]-2, etc. Magento 2, in turn, considers any duplication as an error.

Migration process involves hundreds or even thousands of duplicated URL keys to wander from Magento 1 to Magento 2. This makes the problem totally immense. To make it worse, the problem can't be addressed by just making URL keys unique. The “url_rewrite” table, as well as the “URL Path” attribute, has to be generated anew. 

Furthermore, the indexing procedure is usually accompanied with various code issues of Magento 2. We keep this situation under control with the help of the extension. Hence, if you decide to remove the plugin after solving the problem with URLs, the errors will find their way back to your Magento 2 again because there will be nothing to stop them.

How to Use

Install the extension following the instruction.

Enter the console and run the command "php bin/magento" to make sure the new commands are available:

  • php bin/magento url-optimization:optimize-all
  • php bin/magento url-optimization:unique-url-keys
  • php bin/magento url-optimization:generate-url-rewrites 

A complete optimization effect can be achieved by running just a single command:

  • php bin/magento url-optimization:optimize-all

The other 2 commands are additional tools for those interested in them.

The flow of a URL optimization process is displayed in detail in console and, for convenience, logged in:


Should you have any difficulties you may need help with or any questions, we're always happy to assist (support).


  • Utterly addresses the issue with saving of category when “URL key for specified store already exists”
  • Capable of making all "URL Keys" unique (works with Products, Categories and CMS Pages in any combination)
  • Properly regenerates the "url_rewrite" table
  • Fixes a Magento 2 problem with spontaneous duplicating of "URL Path"
  • Addresses an issue with the suffix "/" for categories and/or products 

Release Notes

Back to top


  • Compatible with CE: 2.1 2.2
  • Stability: Stable Build
  • Description:

    Added compatibility with Magento Open Source / Commerce 2.2.x;
    Addressed a fatal error when saving categories without URL Paths and with same URL Keys.


  • Compatible with CE: 2.1
  • Stability: Stable Build
  • Description:

    Availability checking of Product/Category URL keys and generation if they are absent
    Several improvements for uniqueness checking of CMS Pages URLs


  • Compatible with CE: 2.1
  • Stability: Stable Build
  • Description:

    Initial Release.


Back to top
The best place to start if you need help with a specific extension is to contact the developer. All Magento developers have both a contact email and a support email listed.

Q & A

Back to top


Back to top