Hi... we seem to be talking you round in circles...
If we go back to your ORIGINAL post:
I am just setting up a test site here:
www.ampmgraphics.com/demo
I want to to be the same as this site www.ampmgraphicsprint.com
Then it would appear you want a CLONE of your main site to sit in a SUB-DIRECTORY.
I do this all the time (2 or 3 times a day sometimes) when I create cloned DEMO sites for customers.
This is how I do it and it is ALL done in my CPANEL and phpMyAdmin
NB: this is only possible if you are hosting with a host company that allows you to set up several MySQL databases. If your host is a ############## and gives you only one MySQL database, the following is not possible. You will have to adapt my method to install 2 ZC databases (use different prefixes) into one MySQL database.
STEP ONE - DATABASE
Create a new, empty database in C-Panel, associate it with the SAME USER as the live database. (for the purpose of my explanation, my NEW database is called adevert_hotstuff.
Navigate to your phpMyAdmin. Open the admin screen for your main database. Click OPERATIONS tab. COPY this live database to your new, empty database (eg: adevert_hotstuff). (You can de-select the radio button that says "Create database")
You now have TWO identical databases (process takes about 5 seconds).
STEP TWO - COPYING THE FOLDERS VIA CPANEL
Create a new folder under public_html (or your equivalent root) called "zenshop" (or whatever you wish). I call it zenshop for the purpose of this explanation.
Using CPANEL "COPY" FEATURES, copy all zc folders and files into the folder - "zenshop". (refer to cpanel docs for procedure, but it's very easy - process takes about 5 minutes).
STEP THREE - RECONFIGURE CLONED SITE.
As you now have an indentical CLONE in a subfolder, you must now edit the two configure.php files to reflect the different PATHS and the different DATABASE.
For example, here is a clip of the configure.php code showing a ROOT INSTALLATION:
PHP Code:
define('HTTP_SERVER', 'http://www.yoursite.com');
define('HTTPS_SERVER', 'https://www.yoursite.com');
// Use secure webserver for checkout procedure?
define('ENABLE_SSL', 'false');
// NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
// * DIR_WS_* = Webserver directories (virtual/URL)
// these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
define('DIR_WS_CATALOG', '/');
define('DIR_WS_HTTPS_CATALOG', '/');
Now, the CLONE will read:-
PHP Code:
define('HTTP_SERVER', 'http://www.yoursite.com');
define('HTTPS_SERVER', 'https://www.yoursite.com');
// Use secure webserver for checkout procedure?
define('ENABLE_SSL', 'false');
// NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
// * DIR_WS_* = Webserver directories (virtual/URL)
// these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
define('DIR_WS_CATALOG', '/zenshop/');
define('DIR_WS_HTTPS_CATALOG', '/zenshop/');
... and so on ... you see where I put /zenshop/ to reflect the PATH for the cloned site?
.. and the same for the database... The ORIGINAL configure.php for the database section may read:
PHP Code:
// define our database connection
define('DB_TYPE', 'mysql');
define('DB_PREFIX', 'zen_');
define('DB_SERVER', 'localhost');
define('DB_SERVER_USERNAME', 'adevert_caspar');
define('DB_SERVER_PASSWORD', 'x2er456457');
define('DB_DATABASE', 'adevert_spookie');
define('USE_PCONNECT', 'false'); // use persistent connections?
define('STORE_SESSIONS', 'db'); // use 'db' for best support, or '' for file-based storage
The ONLY CHANGE is the new database name you created earlier (because you are keeping the same username / passwd)
PHP Code:
// define our database connection
define('DB_TYPE', 'mysql');
define('DB_PREFIX', 'zen_');
define('DB_SERVER', 'localhost');
define('DB_SERVER_USERNAME', 'adevert_caspar');
define('DB_SERVER_PASSWORD', 'x2er456457');
define('DB_DATABASE', 'adevert_hotstuff');
define('USE_PCONNECT', 'false'); // use persistent connections?
define('STORE_SESSIONS', 'db'); // use 'db' for best support, or '' for file-based storage
When you have edited the TWO cloned configure.php files to reflect all the PATH and DATABASE changes... you're practically done!!!
Now, the only ftp action required is to Fix the Cache Key, so, go grab Dr Bytes fix_cache_key.php file (free add-ons), FTP it to the clone's folder (in my case zenshop), and "run" the file via your browser.
This will correct the anomoly in the cloned database that still references your root-level cache.
You now have two identical sites - one in the ROOT, and one in a sub-folder.
This process takes me about 8 minutes in total...