In order to configure OpenCart to work properly with another domain, you should modify the two config.php files in the OpenCartInstallationFolder/ and the OpenCartInstallationFolder/admin/ folders to reflect the new domain.
The following lines of the OpenCartInstallationFolder/config.php file should be changed:
// HTTP
define('HTTP_SERVER', 'http://yournewdomain.com/');
define('HTTP_IMAGE', 'http://yournewdomain.com/image/');
define('HTTP_ADMIN', 'http://yournewdomain.com/admin/');
// HTTPS
define('HTTPS_SERVER', 'http://yournewdomain.com/');
define('HTTPS_IMAGE', 'http://yournewdomain.com/image/');
Swap the yournewdomain.com string with your new domain.
Perform the same modifications in your OpenCartInstallationFolder/admin/config.php file:
// HTTP
define('HTTP_SERVER', 'http://yournewdomain.com/admin/');
define('HTTP_CATALOG', 'http://yournewdomain.com/');
define('HTTP_IMAGE', 'http://yournewdomain.com/image/');
// HTTPS
define('HTTPS_SERVER', 'http://yournewdomain.com/admin/');
define('HTTPS_IMAGE', 'http://yournewdomain.com/image/');
You need help with a shopping cart? hostlantern is specialized in eCommerce hosting and provides expert support for a large number of shopping carts. Check out our shopping cart hosting services!