Quote Originally Posted by schoolboy View Post
You could create a SUB-FOLDER on your current install (call the folder "testsite"), and create a CLONE of your current site that runs out of that folder.

You will need to create copies of:

1. The FOLDERS and FILES
2. The DATABASE.

All of this can be done in C-Panel (assuming you are with a host that runs a proper C-Panel).

MAKE A BACKUP OF EVERYTHING FIRST... AND THEN...

In the C-Panel FILE MANAGER, COPY the current zencart installation into your new testsite folder.

Create a NEW database (name eg: testsite) and apply the SAME database user and database password to that database, as you have on your current database.

In phpMy Admin, you can COPY your existing database to the NEW one you just created. (I think the copy function is under the OPERATIONS tab).

Now you have your CLONE.

Final steps are to EDIT the two configure.php files (you may need to change the CHMOD permissions to 644 in order to edit them) to show the new SUB-FOLDER in the path locations, and the new DATABASE NAME. (remember... the USER and PASS should not need changing, as you have assigned the same user to the cloned database.)

After editing, change their CHMOD back to 444.

You should be able to login to the copied site's admin panel using the same username and password as the live site. REMEMBER the admin login for the clone will be in the sub-folder location!

After logging in you need to adjust the SESSIONS path (Admin >>> Configuration >>> Sessions)...

... and the LOGGING path (Admin >>> Configuration >>> logging)...

This just requires that you insert the name of the subfolder (testsite) into the paths.

I then set the testsite DOWN FOR MAINTENANCE, so nobody can access it (including search engines).

What I do... IMMEDIATELY AFTER THE ABOVE, is give the cloned site a NEW HEADER LOGO that says in bright red text "YOU ARE IN THE CLONED SITE". I do the same for its ADMIN PANEL, so I immediately know I am in the TEST SITE and not the LIVE SITE.

What you don't want to do, is think you are in the testsite, when in fact you are in the LIVE site...

REMEMBER... the test site is a SNAPSHOT of the database as it was the minute you made a copy of it. After you have played around on it and tested things, you SHOULD NOT turn it into a live site... Its database will be very different from your LIVE site, and "merging" the two later on will cause huge problems.

SO... you will make DETAILED NOTES of everything you do in the test site, because later, some of thie things you do will have to be done again when you modify or upgrade the LIVE site.

When you are done with testing and practicing, and you are ready to upgrade and reconfig your LIVE site. you should DELETE COMPLETELY the test site and its database.

Refer to your DETAILED NOTES for procedures you can now apply to the live site.

We routinely create test sites, and the whole process (above) should take no longer than 20 minutes.
Thanks for a great guide. I have followed step by step and am very confused why I am having these issues as it seems that both test and live are looking at the same database somehow even though the configure files have been changed to show the new database?

In test site admin shows fine. My test site looks fine if I manually type in the address

Problem 1
When I set the test site to down for maintenance, it also puts my live site in the same state!? Configure.php in admin and includes have both been changed to reflect the new test database created

Problem 2
When clicking on storefront in admin on test site, it is taking me to my live storefront??

Any help would be very appreciated!