cancel
Showing results for 
Search instead for 
Did you mean: 

question about migrating from 2.28 to latest version of magento

SOLVED

question about migrating from 2.28 to latest version of magento

we have mangento 2.2.8, we have both a LIVE server and a TEST server. I consider it might be good to move over to 2.3.2. So i was thinking of complete fresh installation where I can copy over the orders, customers, admin users, website, store, store view, category and products... Possible? what tool do you use? you have a link about it?

 

as I said I have a TEST server where I can test this out, so I want to plan and if we decide to upgrade I will have evertyhing tested and configured and ready on my test site. And hence will take we only a few hours to put live (just need to update catalog, customers and orders)

 

my current magento theme is not compatible with 2.3.x magento, but I can live with the standard Luna template and we can install another template later...

 

The test server is where I prepare and test stuff

1 ACCEPTED SOLUTION

Accepted Solutions

Re: question about migrating from 2.28 to latest version of magento

Hello  ,You don't need to install a fresh magento and use the previous database. It is good to upgrade your existing magento with the latest one.
Note: Please take the backup of old database and Magento code before upgrading to latest version

Then follow the below steps(execute the commands from magento root directory)

Step 1: 

bin/magento maintenance:enable

Step 2: Backup the existing composer.json of your magento root folder
Step 3:

composer remove magento/product-community-edition --no-update

Step 4: Specify Magento packages
If your magento is community edition:

composer require magento/product-community-edition=2.3.2 --no-update

If your magento is of enterprise edition

composer require magento/product-enterprise-edition=2.3.2 --no-update

Step 5: Specify additional packages:

composer require --dev allure-framework/allure-phpunit:~1.2.0 friendsofphp/php-cs-fixer:~2.13.0 lusitanian/oauth:~0.8.10 magento/magento-coding-standard:~1.0.0 magento/magento2-functional-testing-framework:~2.3.14 pdepend/pdepend:2.5.2 phpunit/phpunit:~6.5.0 sebastian/phpcpd:~3.0.0 squizlabs/php_codesniffer:3.3.1 --sort-packages --no-update

Step 6: Remove unused packages:

composer remove --dev sjparkinson/static-review fabpot/php-cs-fixer --no-update

Step 7: Update autoload: Open composer.json and edit the "autoload": "psr-4" section to include "Zend\\Mvc\\Controller\\": "setup/src/Zend/Mvc/Controller/":

"autoload": {
"psr-4": {
"Magento\\Framework\\": "lib/internal/Magento/Framework/",
"Magento\\Setup\\": "setup/src/Magento/Setup/",
"Magento\\": "app/code/Magento/",
"Zend\\Mvc\\Controller\\": "setup/src/Zend/Mvc/Controller/"
},
//...
}

Step 7: Backup the update/ directory of magento root folder
Step 8: Create composer project:
For community edition:

composer create-project --repository=https://repo.magento.com magento/project-community-edition=2.3.2 temp_dir --no-install

For Enterprise edition:

composer create-project --repository=https://repo.magento.com magento/project-enterprise-edition=2.3.2 temp_dir --no-install

Step 9:

rm -rf update

Step 10:

mv temp_dir/update .rm -rf temp_dir

Step 11:

rm -rf temp_dir

Step 12: Check the "name", "version", and "description" fields in the composer.json file as needed.
Step 13:

composer update

Step 14:

bin/magento cache:clean

Step 15:

rm -rf var/cache/* var/page_cache/* generated/code/*

Step 16:

bin/magento setup:upgrade

Step 17:

bin/magento maintenance:disable

As you are using a theme which is not compatible with magento 2.3, so please select the luma theme from the admin.

If this helps you then please give us kudos and select it as solution.

View solution in original post

7 REPLIES 7

Re: question about migrating from 2.28 to latest version of magento

Hi @Loginname,

Yes, you can upgrade your existing Magento version 2.2.8 to 2.3.2.

You don't need to install again and migrate data into it.

Magento provide a straight forward method to upgrade Magento version using composer.

You can upgrade on your local server first or staging server.

If you theme is not compatible then you can test with magento default theme as well.

You can follow following process:

Take a full backup of code and database before upgrade.

Try once the following commands in the sequence,

rm -rf var/cache/* var/page_cache/* var/generation/*
sudo chmod -R 0777 var/ pub/ generated/
php bin/magento deploy:mode:set developer
php bin/magento cache:disable
php bin/magento maintenance:enable
composer require magento/product-community-edition 2.3.2 --no-update
composer update
rm -rf var/cache/* var/page_cache/* var/generation/*
sudo chmod -R 0777 var/ pub/ generated/
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento cache:enable
php bin/magento maintenance:disable
php bin/magento indexer:reindex && php bin/magento cache:clean && php bin/magento cache:flush

Also make sure that you system requirements is compilable with Magento 2.3.2.

PHP 7.2 is recommend.

For more info:
https://devdocs.magento.com/guides/v2.3/install-gde/system-requirements-tech.html

I hope it will help you!!

Re: question about migrating from 2.28 to latest version of magento

Hello  ,You don't need to install a fresh magento and use the previous database. It is good to upgrade your existing magento with the latest one.
Note: Please take the backup of old database and Magento code before upgrading to latest version

Then follow the below steps(execute the commands from magento root directory)

Step 1: 

bin/magento maintenance:enable

Step 2: Backup the existing composer.json of your magento root folder
Step 3:

composer remove magento/product-community-edition --no-update

Step 4: Specify Magento packages
If your magento is community edition:

composer require magento/product-community-edition=2.3.2 --no-update

If your magento is of enterprise edition

composer require magento/product-enterprise-edition=2.3.2 --no-update

Step 5: Specify additional packages:

composer require --dev allure-framework/allure-phpunit:~1.2.0 friendsofphp/php-cs-fixer:~2.13.0 lusitanian/oauth:~0.8.10 magento/magento-coding-standard:~1.0.0 magento/magento2-functional-testing-framework:~2.3.14 pdepend/pdepend:2.5.2 phpunit/phpunit:~6.5.0 sebastian/phpcpd:~3.0.0 squizlabs/php_codesniffer:3.3.1 --sort-packages --no-update

Step 6: Remove unused packages:

composer remove --dev sjparkinson/static-review fabpot/php-cs-fixer --no-update

Step 7: Update autoload: Open composer.json and edit the "autoload": "psr-4" section to include "Zend\\Mvc\\Controller\\": "setup/src/Zend/Mvc/Controller/":

"autoload": {
"psr-4": {
"Magento\\Framework\\": "lib/internal/Magento/Framework/",
"Magento\\Setup\\": "setup/src/Magento/Setup/",
"Magento\\": "app/code/Magento/",
"Zend\\Mvc\\Controller\\": "setup/src/Zend/Mvc/Controller/"
},
//...
}

Step 7: Backup the update/ directory of magento root folder
Step 8: Create composer project:
For community edition:

composer create-project --repository=https://repo.magento.com magento/project-community-edition=2.3.2 temp_dir --no-install

For Enterprise edition:

composer create-project --repository=https://repo.magento.com magento/project-enterprise-edition=2.3.2 temp_dir --no-install

Step 9:

rm -rf update

Step 10:

mv temp_dir/update .rm -rf temp_dir

Step 11:

rm -rf temp_dir

Step 12: Check the "name", "version", and "description" fields in the composer.json file as needed.
Step 13:

composer update

Step 14:

bin/magento cache:clean

Step 15:

rm -rf var/cache/* var/page_cache/* generated/code/*

Step 16:

bin/magento setup:upgrade

Step 17:

bin/magento maintenance:disable

As you are using a theme which is not compatible with magento 2.3, so please select the luma theme from the admin.

If this helps you then please give us kudos and select it as solution.

Re: question about migrating from 2.28 to latest version of magento

Hi @Loginname 

 

I will not suggest to recreate website from scratch migrating database if your existing website is running fine.


You can follow below steps.

1. Upgrade the existing website to the latest magento version.

2. Then disable the current theme and enable luma theme.

3. Test everything and you can perform all the changes live if everything works perfect.

If my answer is helpful, please Accept as Solution & give Kudos

Re: question about migrating from 2.28 to latest version of magento

Magento already released official Data Migration Tool that will help the migrate store data from Magento 1 to Magento 2.

Data Migration Tool transfers data from Magento-1 database to Magento-2 database based on your rules defined in xml files.

In Magento 2 migration involves four components:

a. Data
b. Extensions and Custom code

c. Themes and

d. Customization

 

NOTE : Migration tool only transfers data.

Themes and customization of your store can’t be automatically changed or migrated to Magento2.

 

 

Data : Through Magento 2 Data Migration Tool to help you efficiently move all of your store configurations, products, customers, order data, review, customer credit points,sales rules, promotions and more to Magento 2. This guide provides information on the tool and best practices for using it to migrate your data.

Best practices and recommendations

Use a copy of the database from Magento 1 instance when performing migration testing. Do not involve the main instance of your Magento 1 store database so that your production environment is not affected.

Remove outdated and redundant data from your Magento 1 database before migration.


Such data may include logs, order quotes, recently viewed or compared products, visitors, event-specific categories, promotional rules, etc.

 

Follow our General Rules for Successful Migration to avoid issues or conflicts.

 

To boost performance, you may enable the direct_document_copy option in your config.xml:

<direct_document_copy>1</direct_document_copy>

In this case, Magento 1 and Magento 2 databases must be located in the same MySQL instance, and the database account must have access to each database.

 

The Data Migration Tool uses mapping files to enable you to perform custom database mapping between your Magento 1 and Magento 2 databases.


Please refer this link.
https://github.com/magento/data-migration-tool

If you have any concern, please let me know.

If my answer is useful, please Accept as Solution & give Kudos

Re: question about migrating from 2.28 to latest version of magento

I'm following your solution at the moment, but will try the other solutions too...
but anyway, now after upgrade I get lots of errors on the frontend...

1 exception(s):
Exception #0 (ReflectionException): Class TemplateMonster\Megamenu\Model\Attribute\Backend\Configurator does not exist

Exception #0 (ReflectionException): Class TemplateMonster\Megamenu\Model\Attribute\Backend\Configurator does not exist
<pre>#1 Magento\Framework\Code\Reader\ClassReader->getConstructor('TemplateMonster\...') called at [vendor/magento/framework/ObjectManager/Definition/Runtime.php:49]
#2 Magento\Framework\ObjectManager\Definition\Runtime->getParameters('TemplateMonster\...') called at [vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:48]

how do I solve it?

 

Error is on my test site so everything is fine, just wonder how to solve it, as if we upgrade the live store and comes across the same problems, then it is good to have a plan....

 

this template from temlatemonster was the default template on our store. I have gone through all store views and set template to be "magento luma".

 

I disablet the tempaltemonster megamenu extension

 

I'm deleting all widgets which is using the tempaltemonster template

 

admin pages works just fine, it is only on the frontend that I have some problem...

 

any suggestions?

 

Re: question about migrating from 2.28 to latest version of magento

If you are using luma theme and you have disabled the TemplateMonster_MegaMenu extension, execute following commands from your magento root folder:

rm -rf var/cache/* var/view_preprocessed/* generated/* pub/static/*
bin/magento setup:di:compile
bin/magento setup:static-content:deploy
bin/magento cache:flush

And then check the front end again. 

Hope it will help you. 

Re: question about migrating from 2.28 to latest version of magento


@Loginname wrote:

we have mangento 2.2.8, we have both a LIVE server and a TEST server. I consider it might be good to move over to 2.3.2. So i was thinking of complete fresh installation where I can copy over the orders, customers, admin users, website, store, store view, category and products... Possible? what tool do you use? you have a link about it?


I agree with you. Normally I will install a fresh Magento 2.3 then move data from old store to the new one. The whole procedure should be:

 

  1. Install a new store then point a subdomain to it.
  2. Move products, customers, orders, categories, etc to the new store using this Magento migration service.
  3. Set up theme and extensions in the new store.
  4. Point the main domain name to it.

By doing this way, you can eliminate unwanted extensions and trash data in the old store.

Magento migration service. Cheapest. Fastest. Easiest.