In the world of website management, most of the times, we need to create website on a test link before they are ready to be published on web. In several other cases, host name of the company is changed resulting into change in the website URL.

So, we can say that it is very common to change the URL of website installations.
When we work on any CMS (Content Management System) tools, this may not be so easy and you may get tangled in the intricacies of CMS tools to achieve this.

After struggling a bit with OpenCart  , I decided to write this article as reference to others.

Change Home URL


Changing home URL in OpenCart is very easy. Just a few steps and you are done with it.

For Front End (Front Store)

  1. Access installation files of your OpenCart instance (using FTP or the FileManager in your cPanel) and go to the root folder of your installation
  2. You will find a file named config.php
  3. Open this config.php file in an editor (If you are using FileManager, you will have something to edit the file in browser)
  4. Find for the properties named 'HTTP_SERVER' & 'HTTPS_SERVER' in the file:

    // HTTP
    define('HTTP_SERVER', 'http://vibhav.com/');

    // HTTPS
    define('HTTPS_SERVER', 'http://vibhav.com/');


  5. Change the existing host name (highlighted above) to the new URL name and save the changes
  6. After this file, the front store will start working well. However, the management backend (admin panel) will still not work after these changes.

For management backend (admin panel)

  1. Access installation files of your OpenCart instance (using FTP or the FileManager in your cPanel) and go to the /admin folder of your installation
  2. You will find a file named config.php
  3. Open this config.php file in an editor (If you are using FileManager, you will have something to edit the file in browser)
  4. Find for the properties named 'HTTP_SERVER', 'HTTP_CATALOG', 'HTTPS_SERVER' & 'HTTPS_CATALOG' in the file:

    // HTTP
    define('HTTP_SERVER', 'http://vibhav.com/admin/');
    define('HTTP_CATALOG', 'http://vibhav.com/');

    // HTTPS
    define('HTTPS_SERVER', 'http://vibhav.com/admin/');
    define('HTTPS_CATALOG', 'http://vibhav.com/');

  5. Change the existing host name (highlighted above) to the new URL name and save the changes
  6. Your OpenCart URL is changed and your website will function on your new URL
Isn't it so simple?