Magento 2 is released !

Magento 2 is now released and It is now the time to study the migration. You will find an migration overview how to proceed on the Magento website.

I am starting the migration in a test environment and I will update this article.


Check the requirements

  • mysql 5.6 minimum
  • PHP Extensions : curl dom iconv mcrypt spl xsl intl mbstring ctype hash openssl simplexml xmlwriter

Step 1 : Install Magento 2 and configure it 

# tar -xjvf /root/Magento-CE-2.0.0-2015-11-17-05-56-31.tar.bz2
# chown -R www:www *

Configure Apache, nginx, …

Navigate to http://url/setup/ and perform the first configuration.

Magento 2 SetupMagento 2 Setup 2Magento 2 Setup 3Magento 2 Setup 4Magento 2 Setup 4Magento 2 Setup 5Magento 2 Setup Success

Step 2 : Backup the Magento 2 database (mysqldump …)

Step 3 : Migrate the settings and data with the migration tool

The migration documentation is available here and they have developed a tool for the migration :

composer config repositories.data-migration-tool git https://github.com/magento/data-migration-tool-ce
composer require magento/data-migration-tool:dev-master

note: see the magento configuration how to configure the tool.

Then you can run the migration:

sudo -u www-data ./bin/magento migrate:settings vendor/magento/data-migration-tool/etc/ce-to-ce/1.9.2.2/config.xml
sudo -u www-data ./bin/magento migrate:data vendor/magento/data-migration-tool/etc/ce-to-ce/1.9.2.2/config.xml

note: I had errors on the media table during the migration and it is certainly related to the migration tool. You can bypass these errors by manually importing the media tables.

# mysqldump -uroot -p magento core_directory_storage core_file_storage > media.sql
# mysql -uroot -p magento2 < media.sql # mysql -uroot -p magento2 mysql> RENAME TABLE core_directory_storage TO media_storage_directory_storage,core_file_storage TO media_storage_file_storage;

If you have errors during the migration, there are certainly missing tables into the destination database schema (magento 2) and the map.xml file need to be modified.

As example, to exclude the laposte_socolissimosimplicite_transaction table during the migration:

   <source>
        <document_rules>
            <ignore>
                <document>laposte_socolissimosimplicite_transaction</document>
           </ignore>
   </source>

 

Step 4 : Copy your media files

# cd pub/media
# cp -a ../../../magento_dev/media/catalog .
# cp -a ../../../magento_dev/media/wysiwyg .
# cp -a ../../../magento_dev/media/downloadable .

The database should now migrated.

Now the big work is to migrate the theme and the module. I will create a new article when I will have migrated my theme.

Annexes

I. Enable memcached (source)

Modify app/etc/env.php with:

  'session' => 
  array (
    'save' => 'memcached',
    'save_path' => '127.0.0.1:11212',
  ),

note: don’t forget to enable the memcached php module !

And now I am configuring this tool : See :
http://devdocs.magento.com/guides/v2.0/migration/migration-tool-configure.html

Then you can work on the theme and modules migration !

Nicolas Portais
Author Photographer
http://www.mystockphoto.fr/
http://photos-art.pro/

Ce contenu a été publié dans Magento, avec comme mot(s)-clé(s) , , , , , . Vous pouvez le mettre en favoris avec ce permalien.

1 Response to Magento 2 is released !

  1. Russell dit :

    Very helpful post on Magento 2 migration.

Laisser un commentaire

Votre adresse de messagerie ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Captcha (solve the arithmetic equation) * Time limit is exhausted. Please reload CAPTCHA.