Move website from one domain to another domain in opencart

Here is the steps to migrate opencart website from one server to another server.

  1. Download ALL the files from old server.
  2. Take a backup of Database using PhpMyAdmin.
  3. Upload files to NEW SERVER.
  4. Install Database on NEW SERVER
  5. Update the configuration files i.e config.php and admin/config.php with new domain path.

Update config file with following details.

<pre>
// HTTP
 
define('HTTP_SERVER', 'http://yournewdomain.com/');
 
// HTTPS
 
define('HTTPS_SERVER', 'http://yournewdomain.com/');
 
// DIR
 
define('DIR_APPLICATION','/root-folder-newdomain/public_html/catalog/');
define('DIR_SYSTEM','/root-folder-newdomain/public_html/system/');
define('DIR_DATABASE','/root-folder-newdomain/public_html/system/database/');
define('DIR_LANGUAGE','/root-folder-newdomain/public_html/catalog/language/');
define('DIR_TEMPLATE','/root-folder-newdomain/public_html/catalog/view/theme/');
define('DIR_CONFIG','/root-folder-newdomain/public_html/system/config/');
define('DIR_IMAGE','/root-folder-newdomain/public_html/image/');
define('DIR_CACHE','/root-folder-newdomain/public_html/system/cache/');
define('DIR_DOWNLOAD','/root-folder-newdomain/public_html/download/');
define('DIR_LOGS','/root-folder-newdomain/public_html/system/logs/');

// DB
 
define('DB_DRIVER','mysql');
define('DB_HOSTNAME','localhost');
define('DB_USERNAME','your-new-database-username');
define('DB_PASSWORD','your-new-database-password');
define('DB_DATABASE','your-new-database');
define('DB_PREFIX','oc_');

</pre>


Save the changes and upload files on new server.