Zen Cart Logo
Forums / General Questions / How to Duplicate/Mirror a Store on the Same Server/Account

How to Duplicate/Mirror a Store on the Same Server/Account

Views: 8,361

Results 21 to 40 of 43
29 Oct 2008, 2:32 PM
#21
zcnb avatar

zcnb

Zen Follower

Join Date:
Jun 2008
Posts:
338
Plugin Contributions:
0

How to Duplicate/Mirror a Store on the Same Server/Account

Website Rob:

For testing a new downloadable product you need only to use 'Check/Money Order' to complete the sale and test the download. If it works that way it should work with any other payment method as well.
Yes, that's the method I have been using so far - but can I do it while that particular product is not visible to others?

Thanks,
Daniel

29 Oct 2008, 3:59 PM
#22
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: How to Duplicate/Mirror a Store on the Same Server/Account

zcnb:

Currently Zen Cart supports only complete site shutdown, so making certain products visible only to the store admin is not possible. It would be nice if Zen Cart supported such "partial down for maintenance". That's what I meant by "Zen Cart's current state".Fair point, though difficult to tie down tight enough for inclusion in the code. I suspect that there would be a steady stream of things people would like to partially allow, and a ton of exceptional coding to deal with the increasingly complex possibilities - but that could just be becasue I haven't spent enough time thinking about how to make it simple.

However, that said, there is a way of doing specifically what you have descibed. Here's how ...

You create a category for hidden products and then set its status to off. Products inside this category should then be excepted from the index listing. You can then create your product in this category and access it for testing by tweaking the products_id in the product_info page URL. when you're happy that it's OK, use the move product in the admin categories page to transfer it to its final home.

29 Oct 2008, 4:52 PM
#23
stuff4toys avatar

stuff4toys

Totally Zenned

Join Date:
May 2007
Location:
SW Florida
Posts:
1,062
Plugin Contributions:
1

Re: How to Duplicate/Mirror a Store on the Same Server/Account

This is an incredibly interesting and informative thread.

paulmd:

Hello, I'm new here ... just joined today because I wanted to ask how to do more or less this very thing!

I have had a single ZC store for a while, and I'm starting a new operation for different products aimed at different customers, so I thought the easiest way would be to duplicate the existing store and edit the copy to make a similar new one, ending up with two completely independent stores.

BUT, I'm using UK2 for everything and they only allow a single MySql database per domain, so I'm struggling.

Any ideas?

Thanks
Looks like this didn't get answered without causing you to have to spend more money.

When you created your first ZenCart installation, unless you changed it, the tables were all created with the prefix zen_
When you install the second copy change the prefix to zen1_ or backup_ or anything_else_.

This will allow you to run two copies on one database.

CAVEAT: when you use phpMYadmin to export and import your data, you will first have to open the .sql file in a text editor and search and replace the zen_ for zen1_

JOhn ><>

29 Oct 2008, 6:13 PM
#24
drbyte avatar

drbyte

Sensei

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

Re: How to Duplicate/Mirror a Store on the Same Server/Account

Stuff4Toys:

CAVEAT: when you use phpMYadmin to export and import your data, you will first have to open the .sql file in a text editor and search and replace the zen_ for zen1_
CAVEAT #2 ... DO NOT EVER DO A BLIND search-and-replace FOR "zen_" with anything else. There are a lot more than just table-names using "zen_" in the database.
If you do a blind search-and-replace, you'll end up with, at the very least, all your admin configuration menus not working.
If you must do a rename within the SQL file, it's better to treat each table individually, manually.

27 Jan 2010, 4:55 AM
#25
customk1 avatar

customk1

Zen Follower

Join Date:
Mar 2009
Location:
Cornelius, NC
Posts:
334
Plugin Contributions:
0

Re: How to Duplicate/Mirror a Store on the Same Server/Account

ok, reviving this thread...
i have recently followed the directions as originally listed, and i THOUGHT i did everything right... however i am getting this page, when i try to load the test site, i get a page called 'connection problem'... hopefully it will load for you to see.

regular site is www.customk9design.com

test site is www.customk9design.com/testcatalogzen

any suggestions?

27 Jan 2010, 1:53 PM
#26
stuff4toys avatar

stuff4toys

Totally Zenned

Join Date:
May 2007
Location:
SW Florida
Posts:
1,062
Plugin Contributions:
1

Re: How to Duplicate/Mirror a Store on the Same Server/Account

customk1:

ok, reviving this thread...
i have recently followed the directions as originally listed, and i THOUGHT i did everything right... however i am getting this page, when i try to load the test site, i get a page called 'connection problem'... hopefully it will load for you to see.

regular site is www.customk9design.com

test site is www.customk9design.com/testcatalogzen

any suggestions?
More than likely a path issue in your configure.php

JOhn ><>

27 Jan 2010, 4:07 PM
#27
customk1 avatar

customk1

Zen Follower

Join Date:
Mar 2009
Location:
Cornelius, NC
Posts:
334
Plugin Contributions:
0

Re: How to Duplicate/Mirror a Store on the Same Server/Account

1st off, thank you very much John... you were correct... i had made a mistake in following the directions on changing the configure.php files... i mis-read the line db_server_username... and i had put the database name in both spots instead of username on one, password on the next and database name on the 3rd.

soooo, now that thats fixed, i have two additional questions.

  1. will password protecting the whole folder "testcatalogzen" prevent anyone else from looking at it, as well as prevent it from being crawled by search engines?

  2. i dont want to make any changes to my cart... as some previous posters were concerned about... i did this duplicate only for cosmetic reasons... color changes, image updates etc. i believe that 95% of the changes are stored within the file system as opposed to the database, so simply copying them over to overwrite (or rename folders, testcatalogzen to catalogzen, and catalogzen to oldcatalog or something of the like) will not affect my sql database right?
    however, any changes that i make within zencart admin... such as changing a category image... that is stored within the database, so i either need to swap databases at the end, and lose data from my old database... or write a list of those types of changes, (changes made within the zencart admin) and simply duplicate them on the old database... is that correct?

thanks!
ginny

27 Jan 2010, 6:01 PM
#28
stuff4toys avatar

stuff4toys

Totally Zenned

Join Date:
May 2007
Location:
SW Florida
Posts:
1,062
Plugin Contributions:
1

Re: How to Duplicate/Mirror a Store on the Same Server/Account

customk1:

1st off, thank you very much John... you were correct... i had made a mistake in following the directions on changing the configure.php files... i mis-read the line db_server_username... and i had put the database name in both spots instead of username on one, password on the next and database name on the 3rd.
No problem

soooo, now that thats fixed, i have two additional questions.

  1. will password protecting the whole folder "testcatalogzen" prevent anyone else from looking at it, as well as prevent it from being crawled by search engines?
    You can do that, or simply place a blank file called index.html in the folder. Your server should serve that file name first by default, so unless someone knows that you have an index.php in that folder it shoul dbe secure.
  1. i dont want to make any changes to my cart... as some previous posters were concerned about... i did this duplicate only for cosmetic reasons... color changes, image updates etc. i believe that 95% of the changes are stored within the file system as opposed to the database, so simply copying them over to overwrite (or rename folders, testcatalogzen to catalogzen, and catalogzen to oldcatalog or something of the like) will not affect my sql database right?
    however, any changes that i make within zencart admin... such as changing a category image... that is stored within the database, so i either need to swap databases at the end, and lose data from my old database... or write a list of those types of changes, (changes made within the zencart admin) and simply duplicate them on the old database... is that correct?

thanks!
ginny
There may be a better way to do this, but sounds confusing, but should be OK
JOhn ><>

27 Jan 2010, 6:57 PM
#29
customk1 avatar

customk1

Zen Follower

Join Date:
Mar 2009
Location:
Cornelius, NC
Posts:
334
Plugin Contributions:
0

Re: How to Duplicate/Mirror a Store on the Same Server/Account

ok, let me try to rephrase that last one, with an example. i guess the ultimate issue is that i dont know what kind of info is in an sql database...

if you go to my site, www.customk9design.com
and click on collars, you will come to a categories screen that has pro-paw, deco-paw, eco-paw and show all
if i were to change one of those images, and link it to the category thru the zencart admin, that would be a change that would be stored in the sql database, not just in the site file structure... right?
therefore when i copy over the site file structure to be the 'new site' but use the old database, the new images for the categories would not show, because the change for that is in the database, not in the file structure... is that correct?

27 Jan 2010, 7:03 PM
#30
stuff4toys avatar

stuff4toys

Totally Zenned

Join Date:
May 2007
Location:
SW Florida
Posts:
1,062
Plugin Contributions:
1

Re: How to Duplicate/Mirror a Store on the Same Server/Account

customk1:

ok, let me try to rephrase that last one, with an example. i guess the ultimate issue is that i dont know what kind of info is in an sql database...

if you go to my site, www.customk9design.com
and click on collars, you will come to a categories screen that has pro-paw, deco-paw, eco-paw and show all
if i were to change one of those images, and link it to the category thru the zencart admin, that would be a change that would be stored in the sql database, not just in the site file structure... right?
Only the filename and path are stored in the dattabase so if your new file was the same name as the old one, it wouldn't care.

therefore when i copy over the site file structure to be the 'new site' but use the old database, the new images for the categories would not show, because the change for that is in the database, not in the file structure... is that correct?
Correct, that's why the thought, if you change a products image, name it the same as the old image and you woudn't have the issue.

JOhn ><>

25 Aug 2010, 12:01 AM
#31
mhawkins avatar

mhawkins

New Zenner

Join Date:
Jun 2009
Location:
Lynnwood, WA, USA
Posts:
40
Plugin Contributions:
0

Re: How to Duplicate/Mirror a Store on the Same Server/Account

I also am going to try my upgrade Zen cart on a different site but with the same service provider. I do have a question with the database. I plan on uploading the active store files to a new empty un-setup store that is down for maintenance. But, I am still unsure about how to access the different database. If I leave the information alone in the includes/configure.php file will it actually go to the right database or do I have to duplicate the database in the new store and point it to that database file instead. And, are there more files that I need to change to see the database. Hopefully that makes sense.
Also, if I directly copy the product from the active store database to the empty store database will it recognize the items? One database has the tables stored as zen_tablename and the other does not have the prefix of zen_. I am assuming that the prefix makes a difference, since I saw the file that denoted that prefix.
I can copy each file (table) separately to avoid the prefix if needed.

28 Apr 2011, 8:07 AM
#32
rotkale avatar

rotkale

New Zenner

Join Date:
Dec 2006
Posts:
26
Plugin Contributions:
0

Re: How to Duplicate/Mirror a Store on the Same Server/Account

Hi all!

Bumping old thread.

My goal is to make duplicate of the shop I have now on the same domain/server. I have copied whole old shop folder tree under a different folder (/store => /newstore). Called my service provider and asked to duplicate the old db and name it differently. Changed the configuration files under /newstore so the paths go /newstore and changed db name.

What else do I have to do to get the /newstore working? I get the error (error connectin to database).

Any input will be much appreciated!

Thank you.

28 Apr 2011, 8:09 AM
#33
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: How to Duplicate/Mirror a Store on the Same Server/Account

Your error is telling your that the updates to configure.php file to point to the new database are wrong (assuming that your host actually did what you asked of him).

28 Apr 2011, 10:07 AM
#34
rotkale avatar

rotkale

New Zenner

Join Date:
Dec 2006
Posts:
26
Plugin Contributions:
0

Re: How to Duplicate/Mirror a Store on the Same Server/Account

kuroi:

Your error is telling your that the updates to configure.php file to point to the new database are wrong (assuming that your host actually did what you asked of him).

Thanks. Do the host have to create new user also for this new database, or can i just use the same that old site is using?

28 Apr 2011, 10:26 AM
#35
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: How to Duplicate/Mirror a Store on the Same Server/Account

No, you can use the same user and password. Indeed it's usually easier to do that.

28 Apr 2011, 10:45 AM
#36
rotkale avatar

rotkale

New Zenner

Join Date:
Dec 2006
Posts:
26
Plugin Contributions:
0

Re: How to Duplicate/Mirror a Store on the Same Server/Account

kuroi:

No, you can use the same user and password. Indeed it's usually easier to do that.

Thanks again. Gonna call the host and ask whats the problem with the db. I will post here how it goes and if some problems appear.

10 Apr 2013, 2:20 PM
#37
kevin205 avatar

kevin205

Totally Zenned

Join Date:
Dec 2012
Posts:
607
Plugin Contributions:
0

Re: How to Duplicate/Mirror a Store on the Same Server/Account

misty:

Also possible to install zencart on your own home computer
using WAMPP or XAMP
:smile:

Generally speaking which is more recommended, to install WAMPP or XAMP on your computer or to go through this thread's suggestion of creating duplicate LIVE and TEST sites with 2 different SQL and PHP? If a site needs to move from https://www.Domain.com/TestStore to https://www.Domain.com/ (LIVE)?

10 Apr 2013, 2:37 PM
#38
kevin205 avatar

kevin205

Totally Zenned

Join Date:
Dec 2012
Posts:
607
Plugin Contributions:
0

Re: How to Duplicate/Mirror a Store on the Same Server/Account

Could their be incompatibilities, if PHP and or MySQL versions, options don't exactly match?

10 Apr 2013, 7:16 PM
#39
drbyte avatar

drbyte

Sensei

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

Re: How to Duplicate/Mirror a Store on the Same Server/Account

Kevin205:

Could their be incompatibilities, if PHP and or MySQL versions, options don't exactly match?
Well, of course there 'could' be incompatibilities. But let's reverse-engineer your question and look at it another way: if what you're installing has no prerequisites that the destination server is missing, then the differences between options is largely moot.

You can put your bed into a room that is painted yellow or painted blue or painted white. But since the bed and the purpose for which the bed is there have no dependencies on the color of the room, the color of the room is moot and can be disregarded.
But if you're trying to put it into a much smaller room such as a closet and the bed is larger than the space available, then of course there is an incompatibility. While you might be able to stand the bed on its end to make it fit, it wouldn't be able to function according to its intended purpose as a bed.

10 Apr 2013, 9:38 PM
#40
kevin205 avatar

kevin205

Totally Zenned

Join Date:
Dec 2012
Posts:
607
Plugin Contributions:
0

Re: How to Duplicate/Mirror a Store on the Same Server/Account

DrByte - I got lost in the bedroom's size and colors painted!

Which method do you recommend?

From what I understood, you prefer the off site, setting up the test site on your on PC. Correct? Thank you.