Start a conversation

How do I change the site's URL in OpenCart?

Changing the URL is required in two cases: if the domain name of the site changes or if you need to change the HTTP protocol to HTTPS.

Editing the address is done manually, so you need to go to the root directory of your site on the hosting (folder public_html).

First, you will need to edit the config.php file, which is highlighted in blue in the image. Then navigate to the folder named 'admin', where you will also find the config.php file.

In those files, edit the lines that are highlighted in the screenshot below, depending on your goal (change the protocol in the address or the domain name).

After changing the address in both configuration files your site will be displayed correctly.

Choose files or drag and drop files
Was this article helpful?
  1. Oleksii Momot

  2. Posted
  3. Updated