You are currently viewing the article on an older Shopware version!

Migration process - Shopware 5

Prepare Migration

Extension installation

After you have successfully installed Shopware 6 on your server, you can begin migrating your Shopware 5 shop. For this you need the Migration Assistant extension for Shopware 6, which you can get from the  Community Store.
It is also necessary to install the extension Migration Assistant in your Shopware 5 Shop from which you want to migrate.

Creating a connection

In order to migrate your data from Showare 5 to your Shopware 6 shop, you must first create a connection to your existing Shopware 5 shop. You start this in the Shopware 6 Administration under the menu item Settings->Migration
As long as this connection to your Shopware 5 Shop exists, you can migrate data from the Shopware 5 Shop at any time.

Then 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 Shopware 5 Shops.

Please do not use hyphens in the connection name. The free text fields from Shopware 5 are transferred to Shopware 6 as custom fields with the connection name. If a hyphen is present, this ensures that the custom fields are no longer displayed correctly in the storefront.

Profile: Describes the type of your source system. In the standard system, Shopware55 is selected for the migration. However, third-party providers can also work with other profiles.
Gateway: Indicates the type of connection between the two systems. Here you choose API if you want to migrate a remote shop, or Local if the shop you want to migrate is on the same server.


Edit connection

Depending on the interface you chose in the last step, you will now receive one of the following two queries.


API:
 

API-Key: Here you enter the API key of your Shopware 5 user. If none has been created yet, you can do this in the user administration of Shopware 5. 
Username: Enter the username of your Shopware 5 administrator here. This must be the user for who the above API key was assigned for. It is important that this user must be in the "local_admins" group.
Shopdomain: Enter the domain of your main shop here. Be sure to indicate whether the shop uses a secure SSL connection.



Local:
 

DB-Host: Enter the Host URL of your database here. If the database is installed on the same server, you can also enter localhost here.
DB-Port: Enter the default port of your database here. Usually this is 3306 by default.
DB-User: Gebe hier einen Datenbank Benutzer mit Administrationsrechten an. 
DB-Password: Enter a database user with administration rights here.
DB-Name: Here you enter the database name of the database which contains the data of your Shopware 5 installation. 
Installation Root: Enter the absolute path to the directory where Shopware 5 was installed.

 

Modify Meta Data

As part of the migration, some metadata will be truncated as the database dyp will change from mediumtext to varchar(255). These values will therefore be truncated after 255 characters. 
The following values are affected: 
 

tablecolumn
s_articledescription
s_categoriesmetadescription
metakeywords


 

Control your migration

After you have entered all the necessary details of 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 which shop system (1) you are currently connected to. For the connection you can also immediately see which system profile and which interface was used, when the last connection check was carried out and when the last migration was carried out with this connection. Click the Edit Connection button (2) to make changes to the current connection. 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. You can also use this drop-down menu to reset the checksums.

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 check the corresponding data to be migrated. The list also shows you whether it is shop data or plug-in data and how many data sets are migrated.

In the assignments you can check whether the automatically assigned data have been correctly assigned. Here you can also change your allocations later or change the automatic allocations later.

Extensions: Data that can be migrated from third-party plug-ins is displayed in this list as plug-in data.

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

History

In the History you have the opportunity to view all previous migrations and migration attempts. All information about the migrations will be displayed.

Start migration

During the migration process, it is important that the tab in which the migration was started remains open until the migration is complete, as otherwise the migration may be cancelled. 
 

After you have clicked on Start Migration, the migration is performed in four steps. Data check, data reading, data writing and media download.

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 assignments:

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 processed assignments, you can check whether the automatically assigned data has been correctly assigned. Here, you can also modify your assignments or change the automatic assignments retrospectively.

If you have a particularly large Shopware 5 installation, you can also perform the migration via the console (CLI) at this point. To do this, stop the process after the data check and continue the migration from there.

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 in Shopware 6.

Media download

In this step, all media files from the old Shopware 5 installation are downloaded and loaded into Shopware 6 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 of large amounts of data via the console

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

The migration can also be started via the console (CLI) after the data check step. This is useful, for example, if your Shopware 5 shop contains very large amounts of data or if you want to run the migration in the background.

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:migrate argument

The argument variable can contain the following values: 

basicSettingsBasic settings and categories (SalesChannel installation etc.)
Automatically executed when importing other DataSelections.
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


Perform migration again

You can repeat the migration as often as you like. During the first migration, all migrated data is given a checksum. Based on this checksum, the migration wizard recognizes whether data needs to be migrated or not. This prevents data from being migrated twice and possibly overwritten. 
If you want to perform a complete migration again so that all data in the target system is overwritten, you can reset the checksums. You can do this in the migration overview in the shop system area using the drop-down menu.
 

Was this article helpful?