cancel
Showing results for 
Search instead for 
Did you mean: 

Database Import from 2.1.9 to 2.2.2

Database Import from 2.1.9 to 2.2.2

After strugling to get magento 2.2.2. working , i want to import my 2.1.9 database to new version...what is the best approach in doing this ? 

Version 2.2.2 is already installed. should i reinstall magento by first importing 2.1.9 database and letting Setup upgrade the db or can i just import the dump slq into 2.2.2 and reindex the database . 

any info would greatly appreciate. 

Thanks.

1 REPLY 1

Re: Database Import from 2.1.9 to 2.2.2

There are mainly 2 approaches to do this .

 

1) Which you are doing importing 2.1.9 database to 2.2.2

 

  • For Default You can directly import 2.1.9 database sql file to magento 2.2.2 - it will work , straight forward as they both have default 250 tables.
  • But if you have installed any third party extension then  this is not correct way - In this case application might be thrown errors.
  • For testing purpose you can do like connect your magento 2.2.2 application to 2.1.9 application database by adding all the db related configuration in env.php file.

2) If step 1 works then great. otherwise upgrade your 2.1.9 Magento to 2.2.2 from using below method.

 

Open your root composer.json file

 

Replace with below content,

"version": "2.1.9" replace with "version": "2.2.0"
"magento/product-community-edition": "2.1.9" replace with "magento/product-community-edition": "2.2.0"

 

run command from magento 2 root,

composer update

After successfully completed upgradation,

run 

php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy

 

 

 

if issue solved, Click kudos/Accept as solutions.

if issue solved,Click Kudos & Accept as Solution