Migrating an OpenCart Store to a New Server

Migration · 19.04.2026
Migrating an OpenCart Store to a New Server

The key OpenCart migration step: update both config.php files (root and admin/) with new paths and database credentials.

define('HTTP_SERVER', 'https://www.new-domain.com/');
define('DB_HOSTNAME', 'localhost');
define('DB_DATABASE', 'newocdb');

# Update URL in DB
UPDATE oc_setting SET value='https://www.new-domain.com/' WHERE `key`='config_url';
After changing the domain, update callback URLs in payment systems (Stripe, PayPal, etc.) or payments will fail to process.
← Back to Knowledge Base Ask Support