You are here:  » Duplicating Installation

Duplicating Installation

Submitted by Erik on Fri, 2019-12-06 21:57 in

Hey David,

Had a general question that might be duplicate.

If I already have a site set up with pricetapestry and want to basically duplicate that for a completely new domain and setup would I copy that pt folder into the new directory and rework the config.php file and then run setup.php?

Let's say I have a Wordpress site set up already on a domain and wish to install the pt into a subdirectory of /products/ would I then set up a rewrite rule in .htaccess?

If you have any helpful links detailing this it would be great, thank you! :)


Submitted by support on Mon, 2019-12-09 14:05

Hi Eric,

You can use the Backup / Restore function to duplicate a site easily. The steps would be;

1) Copy site to new location and modify config.php as required (new database etc.)

2) Run setup.php as per new installation

3) If you have added custom fields the following single dbmod.php script will apply the new fields for all custom fields configured in $config_fieldSet in config.advanced.php without having to run individual scripts:

$config_databaseDebugMode FALSE;
$ignore = array("name","description","image_url","buy_url","price","category","brand");
$config_fieldSet as $field => $v)
    if (
in_array($field,$ignore)) continue;
$sql "ALTER TABLE `".$config_databaseTablePrefix."feeds`
              ADD `field_"
.$field."` VARCHAR(255) NOT NULL";
$sql "ALTER TABLE `".$config_databaseTablePrefix."products`
              ADD `"
.$field."` VARCHAR(255) NOT NULL";

4) On the original installation, go to /admin/ > Tools > Backup and Restore and use the Backup function to download the backup XML file

5) On the new installation use the Restore function from the same page to upload and update the database from the backup XML

6) Run an import all via /admin/ oron.php on the new installation.