64
Migrating from Magento 1 to Magento 2 Matthias Zeis 23.06.2016

How to migrate from Magento 1 to Magento 2

Embed Size (px)

Citation preview

Page 1: How to migrate from Magento 1 to Magento 2

Migratingfrom Magento 1to Magento 2Matthias Zeis

23.06.2016

Page 2: How to migrate from Magento 1 to Magento 2

Vienna, Austriamzeismzeismzeismatthias-zeis.com

Page 3: How to migrate from Magento 1 to Magento 2

Who of youworks with Magento 1?

Page 4: How to migrate from Magento 1 to Magento 2

Who of youworks with Magento 2?

Page 5: How to migrate from Magento 1 to Magento 2

Who of youwill migrate a store

to Magento 2?

Page 6: How to migrate from Magento 1 to Magento 2

SCENARIO

Merchant wants to migrate from M1 to M2

© Rebecca Slegel

Page 7: How to migrate from Magento 1 to Magento 2

WHAT?WHEN?HOW?

Page 8: How to migrate from Magento 1 to Magento 2

DATACODE

THEME

Page 9: How to migrate from Magento 1 to Magento 2

Treat it like a platform switch

because it is

Page 10: How to migrate from Magento 1 to Magento 2

MIGRATING DATACore data

3rd party dataYour data

© Ron Cogswell

Page 12: How to migrate from Magento 1 to Magento 2

Does Products & categories

Orders & Invoices Shipments & credit memos Core Configuration

Customers

Wishlists & Ratings

Page 13: How to migrate from Magento 1 to Magento 2

Does Doesn‘t Products & categories

Orders & Invoices Shipments & credit memos Core Configuration

Customers

Catalog DB layout updates Web API credentials

Wishlists & Ratings

Admin users & privileges

Media files

Custom data

3rd party data

Page 14: How to migrate from Magento 1 to Magento 2

1Add repositorycomposer config repositories.data-migration-toolgit https://github.com/magento/data-migration-tool

2 Install toolcomposer require magento/data-migration-tool:<version>

3 Configurehttp://devdocs.magento.com/guides/v2.0/migration/migration-tool-configure.html

Page 15: How to migrate from Magento 1 to Magento 2

1 Migrate settingsphp bin/magento migrate:settings /path/to/config.xml

2 Migrate dataphp bin/magento migrate:data /path/to/config.xml

3 Migrate deltaphp bin/magento migrate:delta /path/to/config.xml

Page 16: How to migrate from Magento 1 to Magento 2

Add mappings for customtables and table columns

COPY IGNORE RENAME TRANSFORM

Page 17: How to migrate from Magento 1 to Magento 2

A FEW LEARNINGS

(a.k.a. what bit me)

Page 18: How to migrate from Magento 1 to Magento 2

Massive toolTeam is working on it

Page 19: How to migrate from Magento 1 to Magento 2

Massive toolTeam is working on it

Schedule time

Page 20: How to migrate from Magento 1 to Magento 2

Clean up your data

Page 21: How to migrate from Magento 1 to Magento 2

Automate the process

Page 22: How to migrate from Magento 1 to Magento 2

Make tool run through first,

then configure properly

Page 23: How to migrate from Magento 1 to Magento 2

Organise config files

Page 24: How to migrate from Magento 1 to Magento 2

Configureextension data migration

manually

Page 25: How to migrate from Magento 1 to Magento 2

Test delta migration thoroughly

Page 26: How to migrate from Magento 1 to Magento 2

Alternatives ubertheme/module-ubdatamigration

Alternative to official data migration tool firegento/FireGento_FastSimpleImport2

Wrapper for Magento 2 ImportExport functionality firegento/FireGento_ExtendedImport2

Extended features for Import (ported from AvS_FastSimpleImport)

Page 27: How to migrate from Magento 1 to Magento 2

MIGRATING CODE

3rd party codeYour code

© Peter Gronemann

Page 28: How to migrate from Magento 1 to Magento 2

3rd partyfunctionalit

y

Page 29: How to migrate from Magento 1 to Magento 2

3rd partyfunctionalit

y

neededin new store?

Page 30: How to migrate from Magento 1 to Magento 2

3rd partyfunctionalit

y

DELETE

neededin new store?

missingin M2 core?

no

yes

Page 31: How to migrate from Magento 1 to Magento 2

3rd partyfunctionalit

y

DELETE

neededin new store?

missingin M2 core?

USEM2 CORE

continue with

vendor?

no no

yes

yes

Page 32: How to migrate from Magento 1 to Magento 2

3rd partyfunctionalit

y

DELETE

neededin new store?

missingin M2 core?

USEM2 CORE

continue with

vendor?

other 3rd partyor custom? no no

yes

yes

no

Page 33: How to migrate from Magento 1 to Magento 2

3rd partyfunctionalit

y

DELETE

neededin new store?

missingin M2 core?

USEM2 CORE

continue with

vendor?

other 3rd partyor custom?

OTHER3RD PARTY

DO IT YOURSELF

no no

3rd party

custom

yes

yes

no

Page 34: How to migrate from Magento 1 to Magento 2

3rd partyfunctionalit

y

DELETE

neededin new store?

missingin M2 core?

USEM2 CORE

continue with

vendor?

other 3rd partyor custom?

M2 extension available?

OTHER3RD PARTY

DO IT YOURSELF

no no

3rd party

custom

yes

yes

yes

no

Page 35: How to migrate from Magento 1 to Magento 2

3rd partyfunctionalit

y

DELETE

neededin new store?

missingin M2 core?

USEM2 CORE

continue with

vendor?

other 3rd partyor custom?

M2 extension available?

OTHER3RD PARTY

DO IT YOURSELF

USE M2 EXTENSION

no no

3rd party

custom

yes

yes

yes

yes

no

no

Page 36: How to migrate from Magento 1 to Magento 2

your M1functionalit

y

Page 37: How to migrate from Magento 1 to Magento 2

your M1functionalit

y

neededin new store?

Page 38: How to migrate from Magento 1 to Magento 2

your M1functionalit

y

DELETE

neededin new store?

missingin M2 core?

no

yes

Page 39: How to migrate from Magento 1 to Magento 2

your M1functionalit

y

DELETE

neededin new store?

missingin M2 core?

USEM2 CORE

3rd partyor custom?

no no

yes

yes

Page 40: How to migrate from Magento 1 to Magento 2

your M1functionalit

y

DELETE

neededin new store?

missingin M2 core?

USEM2 CORE

3rd partyor custom?

3RD PARTY DO IT YOURSELF

no no 3rd party

custom

yes

yes

Page 41: How to migrate from Magento 1 to Magento 2

your M1functionalit

y

DELETE

neededin new store?

missingin M2 core?

USEM2 CORE

3rd partyor custom?

3RD PARTY DO IT YOURSELF

no no 3rd party

custom

yes

yes

REWRITE?

MIGRATE?

Page 42: How to migrate from Magento 1 to Magento 2

rewrite extension

automated testing

documentM1 behaviour

platform independent

code

coding standards

Page 43: How to migrate from Magento 1 to Magento 2

rewrite extension

automated testing

documentM1 behaviour

platform independent

code

coding standards

Awesome integer_net article series:

https://www.integer-net.com/magento-1-magento-2-shared-code-extensions/

Page 44: How to migrate from Magento 1 to Magento 2

migrate extension

clean M1 code

documentM1 behaviour

platform independent

code

refactor

Page 45: How to migrate from Magento 1 to Magento 2

Officialcode migration tool

magento/code-migration

Page 46: How to migrate from Magento 1 to Magento 2

Does Namespaces

Configuration XML files

Layout XML files

Magento code interaction

Module directory structure

Page 47: How to migrate from Magento 1 to Magento 2

Does Doesn‘t Namespaces

Configuration XML files

Layout XML files

Magento code interaction

Module directory structure

Template files & design

Changes in business logic

Page 48: How to migrate from Magento 1 to Magento 2

1 Get codegit clone https://github.com/magento/code-migration

2 Install toolcomposer install

Page 49: How to migrate from Magento 1 to Magento 2

<src> Code to be migrated (excluding core)

Prerequisites

<m1> M1 project code including vanilla core

<m2> M2 vanilla core

<dst> Empty directory for generated code

Page 50: How to migrate from Magento 1 to Magento 2

1 Migrate directory structurephp bin/migrate.php migrateModuleStructure <src> <dst>

2 Migrate layoutphp bin/migrate.php convertLayout <dst>

3 Migrate configurationphp bin/migrate.php convertConfig <dst>

4 Migrate PHP codephp bin/migrate.php convertPhpCode <dst> <m1> <m2>

Page 51: How to migrate from Magento 1 to Magento 2

Don‘t get confusedwith directories

Page 52: How to migrate from Magento 1 to Magento 2
Page 53: How to migrate from Magento 1 to Magento 2

USEOUT OF THE

BOXMAPPING

Is your Magento 1 version current?

noyes

GENERATEYOUR OWNMAPPING

Page 54: How to migrate from Magento 1 to Magento 2

1 php bin/utils.php generateClassDependency <m1>

2 php bin/utils.php generateClassMapping <m1> <m2>

3 php bin/utils.php generateModuleMapping <m1> <m2>

4 php bin/utils.php generateTableNamesMapping <m1>

5 php bin/utils.php generateViewMapping <m1> <m2>

6 php bin/migrate.php generateAliasMapping <m1> <m2>

7 php bin/migrate.php generateAliasMappingEE <m1> <m2>

Page 55: How to migrate from Magento 1 to Magento 2

Generating mappings yourself can be tricky

Page 56: How to migrate from Magento 1 to Magento 2
Page 57: How to migrate from Magento 1 to Magento 2

Double-checkwhat was (not) converted

Page 58: How to migrate from Magento 1 to Magento 2

1 Be pragmatic

2 Work together

3 Learn together

Page 59: How to migrate from Magento 1 to Magento 2

Imagine 2016 migration tool presentation by Sergii Shymkohttp://imagine.magento.com/sites/default/files/Mon.Margaux1.1630.SS7%2C8.Technical.pdf

Migration diary by Max Pronko http://www.maxpronko.com/blog/tag:migration

Resources

Page 60: How to migrate from Magento 1 to Magento 2

Official data migration guidehttp://devdocs.magento.com/guides/v2.0/migration/bk-migration-guide.html

Data migration experience by Marcin Szterling (English, Youtube)Marcin Szterling - Data Migration from Magento 1 to Magento 2

Resources

Page 63: How to migrate from Magento 1 to Magento 2

Matthias Zeismzeismzeismzeismatthias-zeis.com

Thank you! Questions?

Slides will be online:http://www.slideshare.net/mzeis/

Page 64: How to migrate from Magento 1 to Magento 2

Matthias Zeismzeismzeismzeismatthias-zeis.com

Thank you! Questions?

Slides will be online:http://www.slideshare.net/mzeis/

LimeSoda is hiring!https://www.limesoda.com/jobs/