Here is the steps to migrate opencart website from one server to another server.
- Download ALL the files from old server.
- Take a backup of Database using PhpMyAdmin.
- Upload files to NEW SERVER.
- Install Database on NEW SERVER
- 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.