HostSEO Blog

Stories and News from IT Industry, Reviews & Tips | Technology Blog

How to change Opencart URL

A good domain name or URL means a lot to your OpenCart online store. In this tutorial you will find the steps how to change Opencart URL in an easy way. There are quite many reasons for changing your website's URL, such as testing your website on the temporary URL before going live, or you may just want to use a different domain name for your site.

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.

NOTE: Before proceeding with any changes, make sure that you generate a full backup of your website. If you've created your site using Softaculous script installer, feel free to refer to this guide as well (step #4 â$“ Backup software).

Opencart CMS defines your store URL in two configuration files (config.php) located in root and admin folders of the Opencart installation separately. Follow these steps to change two OpenCart config.php files one by one.

Update Opencart URL in the root folder

1. Log into your cPanel account.
2. Open File Manager menu located in Files section:

3. Navigate to the root folder of the Opencart installation, right-click on config.php and used Code Edit option:

4. Open the file and edit its source code online. You will need to locate and edit the following lines:

5. Instead of the old URL address, enter the new one and hit the Save button. In our case, config.php file will look like this after the change:

Update OpenCart URL in the admin config.php

1. Now, locate and edit the config.php file located in the /admin folder inside the Opencart installation. You can use Code Editor for editing as well:

2. You will see several lines that look like this:

3. Replace all the outlined URLs with the new domain name you would like to set for the Opencart installation and save the changes. In our case, the code looks like this:

Your OpenCart URL has been changed in the config.php files for now, and your site will function under the new domain name.

NOTE: In case you are transferring the installation from a different cPanel account, you will need to update the path to the corresponding files in both config.php files as well.

That's it!

                      Need any help? Contact our HelpDesk



Subscribe Now

10,000 successful online businessmen like to have our content directly delivered to their inbox. Subscribe to our newsletter!

Archive Calendar


Born in 2004 ... Trusted By Clients n' Experts

SEO Stars

They never made me feel silly for asking questions. Help me understand how to attract more people and improve my search engine ranking.

Read More

Emily Schneller Manager at Sabre Inc
SEO Stars

Took advantage of Hostseo's superb tech support and I must say, it is a very perfect one. It is very fast, servers reliability is incredible.

Read More

Leena Mäkinen Creative producer
SEO Stars

We're operating a worldwide network of servers with high quality standards requirements, we’ve choose hostseo to be our perfect partner.

Read More

Ziff Davis CEO at Mashable
SEO Stars

It’s very comfortable to know I can rely about all technical issues on Hostseo and mostly that my website and emails are safe and secured here.

Read More

Isaac H. Entrepreneur
SEO Stars

With hostseo as a hosting partner we are more flexible and save money due to the better packages with great pricing, free SEO n' free SSL too!

Read More

Madeline E. Internet Professional