76
Migrating from Magento 1 to Magento 2 Matthias Zeis Meet Magento NL 2016 – 2016-05-13

Matthias Zeis - Migrating from Magento 1 to Magento 2

Embed Size (px)

Citation preview

Page 1: Matthias Zeis - Migrating from Magento 1 to Magento 2

Migrating from Magento 1 to Magento 2 Matthias Zeis Meet Magento NL 2016 – 2016-05-13

Page 2: Matthias Zeis - Migrating from Magento 1 to Magento 2

Vienna, Austria mzeis mzeis mzeis matthias-zeis.com

Page 3: Matthias Zeis - Migrating from Magento 1 to Magento 2

Get the best out of Magento 1 Magento 2

Page 4: Matthias Zeis - Migrating from Magento 1 to Magento 2

SCENARIO

Merchant wants to migrate from M1 to M2

© Rebecca Slegel

Page 5: Matthias Zeis - Migrating from Magento 1 to Magento 2

SHOULD

we migrate?

Page 6: Matthias Zeis - Migrating from Magento 1 to Magento 2
Page 7: Matthias Zeis - Migrating from Magento 1 to Magento 2

Outgrowing current solution

Page 8: Matthias Zeis - Migrating from Magento 1 to Magento 2

Changing focus or business model

Page 9: Matthias Zeis - Migrating from Magento 1 to Magento 2

Magento 2 functionality &

tech stack

Page 10: Matthias Zeis - Migrating from Magento 1 to Magento 2

Relaunch planned anyways

Page 11: Matthias Zeis - Migrating from Magento 1 to Magento 2

Implementing features twice too expensive

Page 12: Matthias Zeis - Migrating from Magento 1 to Magento 2

Did you find a reason to migrate?

No? OK, then

this talk is over.

Page 13: Matthias Zeis - Migrating from Magento 1 to Magento 2

Think of this as a re-platforming,

not an update

Page 14: Matthias Zeis - Migrating from Magento 1 to Magento 2

Re-think Plan Work

Page 15: Matthias Zeis - Migrating from Magento 1 to Magento 2

WHAT? WHEN? HOW?

Page 16: Matthias Zeis - Migrating from Magento 1 to Magento 2

WHAT

should we migrate?

© Ron Cogswell

Page 17: Matthias Zeis - Migrating from Magento 1 to Magento 2

Treat it like a platform switch

because it is

Page 18: Matthias Zeis - Migrating from Magento 1 to Magento 2

migration scope

no 1:1 copy

streamline

strategy and goals

new features

Page 19: Matthias Zeis - Migrating from Magento 1 to Magento 2

migration scope

no 1:1 copy

streamline

strategy and goals

new features

Page 20: Matthias Zeis - Migrating from Magento 1 to Magento 2

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

Page 21: Matthias Zeis - Migrating from Magento 1 to Magento 2

migration scope

no 1:1 copy

streamline

strategy and goals

new features

Page 22: Matthias Zeis - Migrating from Magento 1 to Magento 2

There's a lot of manual work!

Understand

Page 23: Matthias Zeis - Migrating from Magento 1 to Magento 2

Decide what you really need to keep

Don‘t forget your data!

Page 24: Matthias Zeis - Migrating from Magento 1 to Magento 2

migration scope

no 1:1 copy

streamline

strategy and goals

new features

Page 25: Matthias Zeis - Migrating from Magento 1 to Magento 2

Re-think your strategy and goals

Page 26: Matthias Zeis - Migrating from Magento 1 to Magento 2

migration scope

no 1:1 copy

streamline

strategy and goals

new features

Page 27: Matthias Zeis - Migrating from Magento 1 to Magento 2

Stuff you didn't tackle yet

Page 28: Matthias Zeis - Migrating from Magento 1 to Magento 2

New features in Magento 2

Page 29: Matthias Zeis - Migrating from Magento 1 to Magento 2

WHEN

shoud we migrate?

© David Lofink

Page 30: Matthias Zeis - Migrating from Magento 1 to Magento 2
Page 31: Matthias Zeis - Migrating from Magento 1 to Magento 2
Page 32: Matthias Zeis - Migrating from Magento 1 to Magento 2
Page 33: Matthias Zeis - Migrating from Magento 1 to Magento 2

4.936 hours

Page 34: Matthias Zeis - Migrating from Magento 1 to Magento 2

Time planning

Page 35: Matthias Zeis - Migrating from Magento 1 to Magento 2

Plan ahead!

Page 36: Matthias Zeis - Migrating from Magento 1 to Magento 2

M2 Launch

M1 EOL

Today

migration scope

workload

early adopter fee

seasonal business

keep traction

Page 37: Matthias Zeis - Migrating from Magento 1 to Magento 2

Get your timeline right!

Page 38: Matthias Zeis - Migrating from Magento 1 to Magento 2

migration

current state

migration scope

timeline

budget

Page 39: Matthias Zeis - Migrating from Magento 1 to Magento 2

1 Be pragmatic

2 Work together

3 Learn together

Page 40: Matthias Zeis - Migrating from Magento 1 to Magento 2

HOW

should we migrate?

© Peter Gronemann

Page 41: Matthias Zeis - Migrating from Magento 1 to Magento 2

MIGRATING CODE

3rd party code Your code

Page 42: Matthias Zeis - 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 43: Matthias Zeis - 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 44: Matthias Zeis - Migrating from Magento 1 to Magento 2

rewrite extension

automated testing

documentation

platform independent code

coding standards

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

Page 45: Matthias Zeis - Migrating from Magento 1 to Magento 2

migrate extension

clean M1 code

test cases

platform independent code

refactor

Page 46: Matthias Zeis - Migrating from Magento 1 to Magento 2

Official code migration tool

magento/code-migration

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

Don‘t get confused

Page 51: Matthias Zeis - Migrating from Magento 1 to Magento 2
Page 52: Matthias Zeis - Migrating from Magento 1 to Magento 2

convertConfig: check what was (not) converted

Page 53: Matthias Zeis - Migrating from Magento 1 to Magento 2

Dependencies are not migrated

Page 54: Matthias Zeis - 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 55: Matthias Zeis - 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 56: Matthias Zeis - Migrating from Magento 1 to Magento 2

Generating mappings yourself can be tricky

Page 57: Matthias Zeis - Migrating from Magento 1 to Magento 2

MIGRATING DATA

Core data 3rd party data

Your data

Page 58: Matthias Zeis - Migrating from Magento 1 to Magento 2

Official data migration tool

magento/data-migration-tool

Page 59: Matthias Zeis - 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 60: Matthias Zeis - Migrating from Magento 1 to Magento 2

Add mappings for custom data and 3rd party

extensions

Page 61: Matthias Zeis - 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 62: Matthias Zeis - Migrating from Magento 1 to Magento 2

A FEW LEARNINGS

(a.k.a. what bit me)

Page 63: Matthias Zeis - Migrating from Magento 1 to Magento 2

Massive tool Team is working on it

Schedule time

Page 64: Matthias Zeis - Migrating from Magento 1 to Magento 2

Backup database after install

Page 65: Matthias Zeis - Migrating from Magento 1 to Magento 2

Make tool run through first, then fix

Page 66: Matthias Zeis - Migrating from Magento 1 to Magento 2
Page 67: Matthias Zeis - Migrating from Magento 1 to Magento 2

Keep config files outside migration tool repo

Page 68: Matthias Zeis - Migrating from Magento 1 to Magento 2

Divide config files

Page 69: Matthias Zeis - Migrating from Magento 1 to Magento 2

Extensions can‘t plug in (yet)

Page 70: Matthias Zeis - Migrating from Magento 1 to Magento 2

Issues with long-living stores

Page 71: Matthias Zeis - Migrating from Magento 1 to Magento 2

Examine deltas

Page 72: Matthias Zeis - 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 73: Matthias Zeis - 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 74: Matthias Zeis - 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 Szerling (English, Youtube) Marcin Szerling - Data Migration from Magento 1 to Magento 2

Resources

Page 76: Matthias Zeis - 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/