Forums / General Questions / Move current zen cart files to another domain?

Move current zen cart files to another domain?

Locked

Started by ebaobao on 6 Aug 2008, 7:38 PM · Views: 1,730

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
6 Aug 2008, 7:38 PM
#1
ebaobao avatar

ebaobao

Zen Follower

Join Date:
Jul 2008
Posts:
495
Plugin Contributions:
0

Move current zen cart files to another domain?

Hi,
I've been working on zen cart on mydomain.net. I'm half way done and I want to move all the changes & codes I've made to mydomain.COM path. When I setup Zen Cart for the first time, it asked me some information in regards to domain, etc. So I'm concerned about how to move my files and what changes I need to make. Can I just move all the files under public_html? Please someone help me with this. Thank You.

6 Aug 2008, 9:50 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Move current zen cart files to another domain?

There's an FAQ article on the process of moving from one server to another, which applies equally to moving from one account to another on the same server:
https://www.zen-cart.com/tutorials/index.php?article=100

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

6 Aug 2008, 9:52 PM
#3
pelasgos avatar

pelasgos

New Zenner

Join Date:
Dec 2006
Location:
Athens - Greece
Posts:
71
Plugin Contributions:
0

Re: Move current zen cart files to another domain?

Hi!

The simple way:
You can make a clean installation of Zen Cart on the new domain, and then replace template files, and all other changes that you have made to php files.

Theres another way (harder and therefore not recomended) by creating a "clone" of your existing Zen Cart (importing all files AND database to your new domain, changing configure.php if needed etc) but you MUST know what you are doing.

6 Aug 2008, 11:42 PM
#4
lgrant avatar

lgrant

New Zenner

Join Date:
May 2008
Posts:
8
Plugin Contributions:
0

Re: Move current zen cart files to another domain?

It's actually really easy to change the domain. you need to modify two files

includes/configure.php and
admin/includes/configure.php

search for the current domain and change it to the new domain.

That's all you need to make the site work on a new domain. However, there are several other places that contain site name, email address, etc.. which usually have domain the same domain and should be changed to.

For example, the database has many references to the domain. For that i prefer to use phpMyAdmin for mysql databases. Select the database then use the SEARCH tab. Make sure to select all tables then type in the domain name in the search field and press go. It'll return a list of tables that need to be updated. It's really easy to update through the tool

Many other files have domain name in them but they are informational, so the site will run just by changing configure.php, but the other fields need to be changed to look right.

For example

define_contact_us.php
define_returns.php
define_site_faq.php
information.php

several others too

Iuse a search toold to find all these. Personally, I use Microsoft visual studio and choose edit/find/in file, then give it the path to the document root and it'll return every file I need to edit.

if you're working on unix/linux you can run:

cd ...to the document root...
find . -type f -exec grep -il "search value" {} ;

this will result in a list of files that have the search string in it.

Hope this helps

7 Aug 2008, 6:41 AM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Move current zen cart files to another domain?

lgrant:

It's actually really easy to change the domain. you need to modify two files

includes/configure.php and
admin/includes/configure.php

search for the current domain and change it to the new domain.

That's all you need to make the site work on a new domain. However, there are several other places that contain site name, email address, etc.. which usually have domain the same domain and should be changed to.

For example, the database has many references to the domain. For that i prefer to use phpMyAdmin for mysql databases. Select the database then use the SEARCH tab. Make sure to select all tables then type in the domain name in the search field and press go. It'll return a list of tables that need to be updated. It's really easy to update through the tool

Many other files have domain name in them but they are informational, so the site will run just by changing configure.php, but the other fields need to be changed to look right.

For example

define_contact_us.php
define_returns.php
define_site_faq.php
information.php

several others too

Iuse a search toold to find all these. Personally, I use Microsoft visual studio and choose edit/find/in file, then give it the path to the document root and it'll return every file I need to edit.

if you're working on unix/linux you can run:

cd ...to the document root...
find . -type f -exec grep -il "search value" {} ;

this will result in a list of files that have the search string in it.

Hope this helps

Or you can use the built-in search tool: The Developers Toolkit. Related FAQs: https://www.zen-cart.com/tutorials/index.php?article=38
https://www.zen-cart.com/tutorials/index.php?article=39

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.