This is a tutorial on how to change your OpenCart URL. There are various reasons for changing your website's URL, such as testing our website on your Temporary URL, or you may just want to use a different domain name for your site.

We will walk you through editing and updating 2 .php files in order to accomplish this.

Changing Your URL:

  1. Using FTP or File Manager, navigate to the root of your OpenCart installation, and locate a file titled config.php.
  2. Edit the config.php file, and locate the lines that look like this:

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

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

  3. Change the existing URL (I hilighted the part you need to update in red) 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://example.com/admin/');
    define('HTTP_CATALOG', 'http://example.com/');

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

  5. Update the existing URL (I hilighted the part you need to update in red) with your new one, then save what you have done. Your OpenCart URL has now been changed in the config.php files, and your site will function on the new address.


Congratulations, now you know how to change your URL in OpenCart by modifying the config.php files!
Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve this article:
Email Address
Name

new! - Enter your name and email address above and we will post your feedback in the comments on this page!

Like this Article?

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question
2013-11-12 10:56 am
Thanks alot for this tutorial. It really helped me alot. Very graphic and useful

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

2 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!