How to fix the “URL key for specified store already exists” issue on Magento 2 import

- E-Commerce, Magento 2

Magento 2 export CLI

Zed Blackbeard argues that it is impossible to import products to Magento 2 due to the general system exception. Magento notifies that the URL key for the specified store already exists and breaks the import. In the article below, we explore conditions that cause the problem and offer several possible resolutions. You can find more similar articles in this blog post: Magento 2 Cookbook.

'

The Issue

The author of the discussion describes the following situation: 

  1. He successfully imported a product CSV file to the fresh Magento 2 installation.
  2. Then, zed Blackbeard removed several product records. 
  3. After that, he tried to re-import them back but faced the following issue:

The error occurred on Magento 2.0.0. It may also affect other versions.

The Solution

DEEP JOSHI reports that there were few bugs in the native import and export functionalities of Magento 2. Therefore, he recommends upgrading the system to its latest version. After that, it is possible to re-import the missing products by selecting Add/Update as Import Behavior for your CSV file. If the file is valid, you should successfully transfer it to your Magento 2 store. However, upgrading the system does not always address the “URL key for specified store already exists” issue. But we know a more reliable solution.

Reliable Alternative

The default import/export tools of Magento 2 a fairly limited. As we’ve just illustrated, they are associated with various issues, such as those described above. Therefore, you may try to delegate your data transfer routine to third-party solutions, such as the Improved Import & Export Magento 2 extension. So, how does the module solve the problem with URL keys? 

Our plugin provides the ability to reduce the headache by generating URLs in case of duplication. Thus, you avoid the “URL key for specified store already exists” error. The vital aspect is that everything is automated. You don’t need to sit and wait when your update fails. Prevent possible errors in advance. 

Besides, the Improved Import & Export Magento 2 extension lets you automate data transfers with cron-based schedules. Alternatively, there is a system of triggers and rules under your disposal. 

If any attributes are not supported in Magento 2, you can leverage the robust mapping features of our plugin. The Improved Import & Export extension lets you match third-party attributes to ones used in Magento 2 automatically with the help of presets. At the same time, you can do everything manually within your admin. The same functionality spills over to attribute values. 

And, of course, the module extends the default boundaries associated with supported file formats. You can move not only CSV but also XML, Excel, JSON, and ODS files as well as ZIP and TAR archives. Numerous file sources are under your disposal: local and remote servers, cloud storage options, Google Sheets, etc. And you can rely on API integrations for complex synchronizations. For more information, follow this link:

Get Improved Import & Export Magento 2 Extension

'