Breadcrumbs

Home Web Development Moving Magento 2.x to another server
Moving Magento 2.x to another server PDF Print E-mail
Written by Tom   

 

  • Edit the file /app/etc/env.php from the old folder
  • Transfer all files and folders via FTP to new server
  • Export database from phpMyAdimin or by command prompt:

 

mysqldump -u root databasename > dumpfilename.sql

 

 

  • Navigate to you XAMPP or WAMP mysql folder

 

C:\xampp\mysql\bin

mysqldump -u root myryda7 > dumpfilename.sql

 

  • Open command prompt by holding shift and right click them click Open command window here. Info from here.

 

 

  • Login to phpMyAdmin import the Magento database and edit the table core_config_data

 

Edit the following fields: web/unsecure/base_url : with the new URL www.newhost.com

web/secure/base_url : with the new URL www.newhost.com

 

 

  • Clear the Magento cache.
  • You can do this either via the Magento admin panel > System > Cache management
  • Or by deleting the contents of the var/cache and var/session folders inside your Magento installation directory.