Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Duplicate a store on different domain???


Recommended Posts



What I want to do is to copy a store from one domain to another so that all domains will have the same exact store.


WHat I have tried is this...


I set up OSC on the new domain. Then, I back up the store from the original domain using hte backup fxn withinn the admin panel. I take that backup file and restore it to my new domain. This basically copied the MYSQL DB from the 1st domain to the new one.


But the next step is where I run into a problem. I need to transfer eveything else like the shipping and payment mondules as well as every other file I modified and all contributions I have installed.


Obviously you cannot just copy your /catalog and /admin directories from the original domain to the new domain. I have done this and what you get is a new store that refers to both the domain and MySQL DB of the original store. The first page of the new store will show http://www.new store.com/catalog however, all links (including the links on the main page of the admin panel) point to www.original store.com domain pages.


So it looks to me that the answer to this (as posted in other threads) is to modify the configure.php files in /catalog and /admin so that the new sore knows which database and domain to read from.




My configure.php files in my original store have never been set up with my domain name or my MySQL database name and passwords, yet the store knows where to go to get information. Below is the code from one of my configure.php files from my original domain. As you can see, it is untouched. I never modified anything and nothing points to my actual DB or my domain name (Also, you will notice that the parts where you are supposed to fill in true or false for SSL are blank, yet my original store is up and running perfectly and SLL is working also).



 $Id: configure.php,v 1.13 2003/02/10 22:30:51 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions


 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License


// Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

// * DIR_WS_* = Webserver directories (virtual/URL)

 define('HTTP_SERVER', ''); // eg, http://localhost - should not be empty for productive servers

 define('HTTPS_SERVER', ''); // eg, https://localhost - should not be empty for productive servers

 define('ENABLE_SSL', ); // secure webserver for checkout procedure?

 define('DIR_WS_CATALOG', '/catalog/'); // absolute path required

 define('DIR_WS_IMAGES', 'images/');

 define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

 define('DIR_WS_INCLUDES', 'includes/');

 define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');

 define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');

 define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');

 define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');

 define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');


 define('DIR_FS_DOCUMENT_ROOT', $HTTP_SERVER_VARS['DOCUMENT_ROOT']); // where your pages are located on the server. if $DOCUMENT_ROOT doesnt suit you, replace with your local path. (eg, /usr/local/apache/htdocs)


 define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');


// define our database connection

 define('DB_SERVER', ''); // eg, localhost - should not be empty for productive servers

 define('DB_SERVER_USERNAME', 'mysql');

 define('DB_SERVER_PASSWORD', '');

 define('DB_DATABASE', 'osCommerce');

 define('USE_PCONNECT', 'false'); // use persistent connections?

 define('STORE_SESSIONS', ''); // leave empty '' for default handler or set to 'mysql'



SO, when I simply copy my /catalog and /admin folders to my new store's domain, these configure.php files are the same exact ones that are in my original store, yet the new store reads from the original store's DB and files rather than its own. I have tried entering all the new domain and new MySQL DB info into the configure.php files for the new domain, but this does nothing. As if I never made any configure.php changes.


I am hoping someone here knows the answer to my problem. I need to be able to copy one store to multiple domains but obviously need my duplocate stores to point to it's own files and MySQL DB, not the original's.


I sure hope this makes sense. I have been trying to figure this out for 5 months and I have gotten nohwere.


Thanks for any info any of you can provide.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...