How to Change Store URL in OpenCart?

A good domain name or URL means a lot to your OpenCart online store. You may want to change OpenCart URL from a subdomain to a root domain or from a subfolder to your root folder. No matter what reason you have to update OpenCart URL, you can do that following the instructions below.

Change Store URL in OpenCart

  1. Using FTP or File Manager, navigate to the root folder of the OpenCart installation.
  2. Locate and edit the config.php file, and locate the lines that look like this:
     // HTTP
     define('HTTP_SERVER', 'http://example.com/');
    
     // HTTPS
     define('HTTPS_SERVER', 'https://example.com/');​
  3. Change the existing URL (http://example.com/) to your new domain name, then save the modification.
  4. Now, locate and edit the config.php file located in the: /admin folder. You will see several lines that look like this:
     // HTTP
     define('HTTP_SERVER', 'http://www.example.com/admin/');
     define('HTTP_CATALOG', 'http://www.example.com/');
    
     // HTTPS
     define('HTTPS_SERVER', 'http://www.example.com/admin/');
     define('HTTPS_CATALOG', 'http://www.example.com/');
  5. Change the existing URL (http://example.com/) to your new domain name, then save the modification.
    Your OpenCart URL has now been changed in the config.php files, and your site will function on the new address.

If you face any problems or need our professional services, please email us at [email protected]

Join our Newsletter

Never miss the latest offers, voucher codes and useful articles delivered weekly in your inbox.