Zen Cart Logo
Forums / General Questions / Copying Store to another directory 2014

Copying Store to another directory 2014

Views: 1,041

Results 1 to 6 of 6
1 Oct 2014, 10:47 PM
#1
msbfrnj avatar

msbfrnj

New Zenner

Join Date:
Apr 2010
Posts:
68
Plugin Contributions:
0

Copying Store to another directory 2014

Hi, I want to copy my current Zen Cart store (with all it's plugins) to another directory. What I'm trying to do is create different product stores. My current store has no products in it yet. So I was thinking I could just copy my current store directory as many times as I needed and use the copied store directories after renaming them. I found out that I have to change the configure files. I found this old reply about how to do it back in '08. Before I proceed, I wanted to know:

  1. Is this info still pertinent for today (I mean is there more to it) AND
  2. Am I going about it in the right way for what I'm trying to do.

Thanks so much
Brenda

" Default Re: How to Duplicate Zen Cart shop directory (same server) ?

The FAQ on copying data to/from an offline testing server, usually a PC, covers the same process, but instructs to use FTP to copy the files, since that's what most people have available to them. Most don't have SSH access let alone the knowledge to use command-line instructions on a Linux server.

Basically the process is this:

1. Clone the files. Since you're working on the same server and same hosting account, AND you have shell access to your server, using your command-line "cp" approach is fine.
2. Edit the cloned configure.php files to contain the correct database details for your testing database.
3. Use phpMyAdmin to export your live database using the FAQ instructions.
4. Use phpMyAdmin to restore your database backup into the database used for your testing site.

5. Since you're running on the same server and hosting account, it's unlikely that you'll need to use fix_cache_key.php on your site"
1 Oct 2014, 11:04 PM
#2
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Copying Store to another directory 2014

msbfrnj:

Hi, I want to copy my current Zen Cart store (with all it's plugins) to another directory. What I'm trying to do is create different product stores. My current store has no products in it yet. So I was thinking I could just copy my current store directory as many times as I needed and use the copied store directories after renaming them. I found out that I have to change the configure files. I found this old reply about how to do it back in '08. Before I proceed, I wanted to know:

  1. Is this info still pertinent for today (I mean is there more to it) AND
  2. Am I going about it in the right way for what I'm trying to do.

Thanks so much
Brenda

" Default Re: How to Duplicate Zen Cart shop directory (same server) ?

The FAQ on copying data to/from an offline testing server, usually a PC, covers the same process, but instructs to use FTP to copy the files, since that's what most people have available to them. Most don't have SSH access let alone the knowledge to use command-line instructions on a Linux server.

Basically the process is this:

1. Clone the files. Since you're working on the same server and same hosting account, AND you have shell access to your server, using your command-line "cp" approach is fine.
2. Edit the cloned configure.php files to contain the correct database details for your testing database.
3. Use phpMyAdmin to export your live database using the FAQ instructions.
4. Use phpMyAdmin to restore your database backup into the database used for your testing site.

5. Since you're running on the same server and hosting account, it's unlikely that you'll need to use fix_cache_key.php on your site"

Instructions generally speaking are still pertinent (very generically written), with 1.5.3, the last statement about the cache fix is true as it is already a factor, but there is a known issue that with it's current setup as the cache key won't be updated because it will be able to find the original folder and consider the cache key as correctly set... (Identified somewhere in the forum, sorry I don't have the link at the moment.)

But, that said, you may want to look into the multisite plugin. I haven't used it, but it seems that it may make things more convenient for you in the long run.

2 Oct 2014, 12:48 AM
#3
msbfrnj avatar

msbfrnj

New Zenner

Join Date:
Apr 2010
Posts:
68
Plugin Contributions:
0

Re: Copying Store to another directory 2014

Thank you! I will look up the multisite plugin.... It certainly sounds promising, as it might be the answer to eeerything.....!!!

5 Oct 2014, 12:49 AM
#4
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Copying Store to another directory 2014

msbfrnj:

Thank you! I will look up the multisite plugin.... It certainly sounds promising, as it might be the answer to eeerything.....!!!

I thought the answer to everything was 42, but I could be wrong. :)

5 Oct 2014, 3:58 AM
#5
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: Copying Store to another directory 2014

msbfrnj:

Thank you! I will look up the multisite plugin.... It certainly sounds promising, as it might be the answer to eeerything.....!!!

Using your original approach requires separate databases for each of the clones.

Using the Multisite approach requires only one shared DB.

5 Oct 2014, 4:06 AM
#6
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Copying Store to another directory 2014

frank18:

Using your original approach requires separate databases for each of the clones.

Not necessarily. Modification of the table prefix would allow using a single database... Doesn't mean it would be "pretty" nor highly suggested, but it would keep things down to the one database if needed.