When we start our e-commerce website often we question ourself to cost cutting and cart type used. As a result we tend to select a hosting provider or service type which becomes a bottleneck, or may be the service is not that good enough which you desired. This leads to changing the hosting provider and we need to move our system to new provider. Although there are many forums which share details of the migration but I thought to update them here as well just for reference.
E-commerce store based on opencart has three major components.
1. Database (DB)
2. main page web-files
3. admin panel web-files
There is no need to make any changes at DB level however we need to make few changes on the config files of the web-pages.
After uploading all the web-files following things need to changed:
Open your public folder (public_html).
Next, right click on your config.php file and select ‘View/Edit’ (if you have installed your OpenCart in a sub folder, you will find your config file in there.)
The file should now open up for editing. In here you will need to edit a few lines of code. Find the lines:
You will need to update these to your correct path. Contact your hosting company for the full path to your public folder. Make sure to replace YOUR-DOMAIN with your domain without the www. e.g. /home/sites/mywebsite.com/public_html/) OR the physical path of the web-pages
Next, you need to update your database connection settings. Find the below:
You will need to replace these with the new details;
DB_HOSTNAME = Your database host (usually localhost).
DB_USERNAME = Your Database username.
DB_PASSWORD = Your Database password
DB_DATABASE = Your database name
You will have to do the same for admin config.php. ensure that path is also correct.
Hope it helps! for migration assistance and help you can contact me as well.