Migration process - Shopware 6

Prepare migration

Install Migration assistent

For this connection between the source shop and the target shop, the Migration assistent extension is necessary. Install this extension in both the source shop and the target shop. A connection is only possible if the extension is installed in both shops and also activated.

The following description of the migration process refers to the migration assistant from version 13.0.0 of the extension.

The store setup should be completed only after the migration has been completed successfully. Errors during migration should not be ignored. If this is not observed, reinstallation of the store will be necessary.

Create integration

To access the data of the source shop with the target shop, it is necessary to provide an additional integration in the source shop. With integrations, you can give third-party applications access to various resources of your shop by the API. Detailed information about what integrations are and how to use them can be found here
To create a new integration for migration, open Settings > System > Integrations in the source shop and click Create Integration in the upper right corner.  Then save the following settings there:

Name (1): Enter a unique name here, such as Migration, so that you can distinguish this integration from the others.
Administrator (2): Enable this option so that the target shop can access all important resources in your source shop. 
Access ID (3): The access ID is generated automatically. With the help of this ID the target shop can access the source shop. You should make a note of it, as you will need it in the next step. 
Security key (4): The security key is also generated automatically and is needed to legitimize the access from the target shop. You will also need this key when establishing the connection. You should therefore also save it temporarily. 
After you have created the integration via the Save integration button, you can now establish the connection between the target shop and the source shop in the next step.

create connection

In order to migrate your data from the Shopware 6 source shop to your Shopware 6 target shop, it is necessary to establish a connection between these two shops.
After installing the extension, open the configurations in the admin of the target shop under the menu item Settings > Extensions > Migration assistant and establish the connection to the source shop there. 

When you start the program for the first time, the connection wizard will open automatically. If it does not start automatically or you have closed it, click on Create connection to create a new connection.


Name: Here you first enter a unique name for the connection. This is especially necessary if you want to establish a connection to several shops. 

Profile: Indicates the type of source system. For a migration from a Shopware 6 shop choose Shopware 6.6. 
Interface: Indicates the type of connection between the two systems. This is only relevant for the 5.3 profile. For the Shopware 6 profile only API is available here.

Check Migration data

After you have entered all the necessary information about your connection, you will be redirected to the migration overview. Here you have an overview of the current connection, can choose which data will be migrated and track your previous migrations.

Overview

After you have successfully established the connection, you will automatically be taken to the migration overview. Here you can see to which shop system (1) you have currently established a connection. You can also see which system profile and which interface was used for the connection, when the last connection check was carried out and when the last migration was carried out with this connection. You can make changes to the current connection via the Edit connection button (2).
Via the dropdown menu (3) you can create a new connection, delete the access data of the current connection or switch to another created connection. In addition, the checksums can be reset via this dropdown menu in order to migrate existing data again. Using the reload button (4) refreshes the migration overview. This way, the entire page does not need to be reloaded in the browser to get an updated display of the data. 

Data selection

In the data selection you decide which data you want to migrate from your connection to the Shopware 6 shop. To do this, simply tick the corresponding data that is to be migrated. The list also shows you whether it is shop data or extension data and how many data sets will be migrated.

Extensions: Data that can be migrated from third-party extensions is shown in this list with the type plug-in data.
Under certain circumstances, some third-party providers also offer their own migration profile for their extension data, which must then be used for migration. In this case, you will receive all migration information from the relevant provider.

Data check

The migration now performs a data check. This checks whether data from the old shop can be assigned to the new shop.


Manual assignment:

Some third-party providers may also offer their own migration profile for your extension data, which must then be used for migration. In this case, you will receive all information about the migration from the relevant provider.

If data, such as the standard payment type, could not be assigned correctly, it is necessary to assign it manually. As soon as you have manually assigned all unassigned data, you can continue the migration by clicking the Continue button. If all data could be assigned without problems, manual assignment is no longer necessary. In this case you can continue the migration immediately. Processed assignments: 

In the assignments made, you can check whether the automatically assigned data has been assigned correctly. Here you can also change your assignments or change the automatic assignments at a later date.

History

In the history you have the option of viewing all previous migrations and migration attempts. All information about the migrations is displayed.

Start migration 

If you use the Admin Worker to process the tasks, you must leave the tab in which the migration was started open during the migration process until the migration is complete, otherwise the migration may be cancelled. We recommend using the CLI Worker instead of the Admin Worker in the production system.

After you have clicked on Start Migration, the migration is performed in five steps: Data readingdata writing, media download, cleanup and indexing.

Data reading

In this step, all data from the source shop that is to be migrated is read. Here you can also change your assignments later or change the automatic assignments afterwards.

If it happens that data is not migrated although it has changed, the checksums can be reset. For more information, see the section Perform migration again.


Data writing

The read data is now written to Shopware 6. Customer groups, categories, languages, currencies and sales channels are automatically created in Shopware 6 in this step, if they do not already exist.

Media download

In this step, all media files are downloaded from the source shop and loaded into the target shop media management.

Cleanup

In this step, the written records that were temporarily stored are deleted from the database table swag_migration_data.

Indexing

During this process, all indexers are triggered again so that the migrated data is also indexed by Shopware.

Migration by the console

If you've already taken the steps Data reading, Data writing, Media download, Cleanup and Indexing you can skip this point.

The migration can also be started via the console (CLI) after the data check step. 

It is important that you first start the migration normally via the administration and abort it after the data check step.
Then navigate in the console to your Shopware 6 directory. You should now be above the public folder.

Execute the following command:

php bin/console migration:start argument

The argument variable can contain the following values:

basicSettingsBasic settings and categories (SalesChannel installation etc.)
Automatically executed when importing other DataSelections.
cmsLayouts
customersOrdersAll customers, orders and documents.
mediaAll media and folders.
newsletterRecipientnewsletter recipients
productsAll product data and associated entities. Also associated entities from "media".
productReviewsProduct reviews
promotionsPromotions
seoUrlsSEO URLs
customerWishlistsWishlists

If you want to abort the migration, you can use the command php bin/console migration:abort. To display the progress, you can use the command php bin/console migration:get-progress.You can also view the progress in the admin, even though you have started the migration via the CLI.

Perform migration again

You can perform the migration as often as you like. During the first migration, all migrated data receives a checksum. The migration wizard uses this checksum to recognise whether data must be migrated or not. This prevents data from being migrated twice and possibly being overwritten. 
If you want to carry out a migration completely again so that all data is overwritten in the target system, you can reset the checksums. You do this in the migration overview in the shop system area via the drop-down menu.

Was this article helpful?