73
Migrating from Magento 1 to Magento 2 Matthias Zeis 2016-05-13

Migrating from Magento 1 to Magento 2

Embed Size (px)

Citation preview

Page 1: Migrating from Magento 1 to Magento 2

Migrating from Magento 1 to Magento 2 Matthias Zeis

2016-05-13

Page 2: Migrating from Magento 1 to Magento 2

Vienna, Austria mzeis mzeis mzeis matthias-zeis.com

Page 3: Migrating from Magento 1 to Magento 2

SCENARIO

Merchant wants to migrate from M1 to M2

© Rebecca Slegel

Page 4: Migrating from Magento 1 to Magento 2

Get the best out of Magento 1 Magento 2

Page 5: Migrating from Magento 1 to Magento 2

WHAT? WHEN? HOW?

Page 6: Migrating from Magento 1 to Magento 2

WHAT

should we migrate?

© Ron Cogswell

Page 7: Migrating from Magento 1 to Magento 2

Treat it like a platform switch

Page 8: Migrating from Magento 1 to Magento 2

Treat it like a platform switch

because it is

Page 9: Migrating from Magento 1 to Magento 2

migration scope

no 1:1 copy

streamline

strategy and goals

new features

Page 10: Migrating from Magento 1 to Magento 2

migration scope

no 1:1 copy

streamline

strategy and goals

new features

Page 11: Migrating from Magento 1 to Magento 2

Don't build a 1:1 copy of your current store

Page 12: Migrating from Magento 1 to Magento 2

migration scope

no 1:1 copy

streamline

strategy and goals

new features

Page 13: Migrating from Magento 1 to Magento 2

Decide what you really need to keep

Page 14: Migrating from Magento 1 to Magento 2

Decide what you really need to keep

Don‘t forget your data!

Page 15: Migrating from Magento 1 to Magento 2

migration scope

no 1:1 copy

streamline

strategy and goals

new features

Page 16: Migrating from Magento 1 to Magento 2

Re-think your strategy and goals

Page 17: Migrating from Magento 1 to Magento 2

migration scope

no 1:1 copy

streamline

strategy and goals

new features

Page 18: Migrating from Magento 1 to Magento 2

Stuff you didn't implement in M1

Page 19: Migrating from Magento 1 to Magento 2

New features in Magento 2

Page 20: Migrating from Magento 1 to Magento 2

migration scope

no 1:1 copy

streamline

strategy and goals

new features

Page 21: Migrating from Magento 1 to Magento 2

WHEN

shoud we migrate?

© David Lofink

Page 22: Migrating from Magento 1 to Magento 2
Page 23: Migrating from Magento 1 to Magento 2
Page 24: Migrating from Magento 1 to Magento 2
Page 25: Migrating from Magento 1 to Magento 2
Page 26: Migrating from Magento 1 to Magento 2
Page 27: Migrating from Magento 1 to Magento 2
Page 28: Migrating from Magento 1 to Magento 2

Get your timeline right!

Page 29: Migrating from Magento 1 to Magento 2

migration

current state

migration scope

timeline

budget

Page 30: Migrating from Magento 1 to Magento 2

HOW

should we migrate?

© Peter Gronemann

Page 31: Migrating from Magento 1 to Magento 2

MIGRATING CODE

3rd party code Your code

Page 32: Migrating from Magento 1 to Magento 2

3rd party functionality

DELETE

needed in new store?

missing in M2 core?

USE M2 CORE

continue with vendor?

other 3rd party or custom?

M2 extension available?

OTHER 3RD PARTY

DO IT YOURSELF

USE M2 EXTENSION

no no

3rd party custom

yes yes yes yes

no no

Page 33: Migrating from Magento 1 to Magento 2

Your M1 functionality

DELETE

needed in new store?

missing in M2 core?

USE M2 CORE

3rd party or custom?

3RD PARTY DO IT YOURSELF

no no 3rd party custom

yes yes

Page 34: Migrating from Magento 1 to Magento 2

rewrite extension

automated testing

document M1 behaviour

platform independent code

coding standards

Page 35: Migrating from Magento 1 to Magento 2

rewrite extension

automated testing

document M1 behaviour

platform independent code

coding standards

Awesome integer_net article series: https://www.integer-net.com/magento-1-magento-2-shared-code-extensions/

Page 36: Migrating from Magento 1 to Magento 2

migrate extension

clean M1 code

document M1 behaviour

platform independent code

refactor

Page 37: Migrating from Magento 1 to Magento 2

Official code migration tool

magento/code-migration

Page 38: Migrating 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 39: Migrating from Magento 1 to Magento 2

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

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

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

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

Page 40: Migrating from Magento 1 to Magento 2

Does Namespaces

Configuration XML files

Layout XML files

Magento code interaction

Module directory structure

Page 41: Migrating 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 42: Migrating from Magento 1 to Magento 2

Don‘t get confused

Page 43: Migrating from Magento 1 to Magento 2
Page 44: Migrating from Magento 1 to Magento 2

Configuration: check what was (not) converted

Page 45: Migrating from Magento 1 to Magento 2

Dependencies are not migrated(?)

Page 46: Migrating from Magento 1 to Magento 2

USE OUT OF THE BOX

MAPPING

Is your Magento 1 version current?

no yes GENERATE YOUR OWN MAPPING

Page 47: Migrating 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 48: Migrating from Magento 1 to Magento 2

Generating mappings yourself can be tricky

Page 49: Migrating from Magento 1 to Magento 2

MIGRATING DATA

Core data 3rd party data

Your data

Page 50: Migrating from Magento 1 to Magento 2

Official data migration tool

magento/data-migration-tool

Page 51: Migrating from Magento 1 to Magento 2

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

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

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

Page 52: Migrating from Magento 1 to Magento 2

Does Products & categories

Orders & invoices

Shipments & credit memos

Core configuration

Customers

Wishlists & ratings

Page 53: Migrating 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 54: Migrating from Magento 1 to Magento 2

Add mappings for custom data and 3rd party

extensions

Page 55: Migrating from Magento 1 to Magento 2

A FEW LEARNINGS

(a.k.a. what bit me)

Page 56: Migrating from Magento 1 to Magento 2

Massive tool Team is working on it

Page 57: Migrating from Magento 1 to Magento 2

Massive tool Team is working on it

Schedule time

Page 58: Migrating from Magento 1 to Magento 2

Backup database after install

Page 59: Migrating from Magento 1 to Magento 2

Make tool run through first, then fix

Page 60: Migrating from Magento 1 to Magento 2
Page 61: Migrating from Magento 1 to Magento 2

Keep config files outside migration tool repo

Page 62: Migrating from Magento 1 to Magento 2

Divide config files

Page 63: Migrating from Magento 1 to Magento 2

Extensions can‘t plug in (yet)

Page 64: Migrating from Magento 1 to Magento 2

Issues with long-living stores

Page 65: Migrating from Magento 1 to Magento 2

Examine deltas

Page 66: Migrating 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 67: Migrating from Magento 1 to Magento 2

1 Be pragmatic

2 Work together

3 Learn together

Page 68: Migrating from Magento 1 to Magento 2

Imagine 2016 migration tool presentation by Sergii Shymko http://imagine.magento.com/sites/default/files/Mon.Margaux1.1630.SS7%2C8.Technical.pdf Migration diary by Max Pronko http://www.maxpronko.com/story

Resources

Page 69: Migrating from Magento 1 to Magento 2

Official data migration guide http://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 72: Migrating from Magento 1 to Magento 2

Matthias Zeis mzeis mzeis mzeis matthias-zeis.com

Thank you! Questions?

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

Page 73: Migrating from Magento 1 to Magento 2

Matthias Zeis mzeis mzeis mzeis matthias-zeis.com

Thank you! Questions?

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

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