Zen Cart Logo
Forums / Upgrading from 1.3.x to 1.3.9 / test site for upgrades

test site for upgrades

Views: 56,033

Results 1 to 20 of 49
31 Mar 2012, 5:22 PM
#1
sash avatar

sash

New Zenner

Join Date:
Jul 2010
Posts:
99
Plugin Contributions:
0

test site for upgrades

Hi Sorry if this is in the wrong place, seems relevant a little,

I said in a previous post that i was running 1.9h, It's not it's only 1.39d, So really need to get move on and get upgrading,

Before i could attempt it, i would like to go for a test site, so i can see if i'm upgrading it correctly, and not destroy my live site,

Could someone tell me how to set up a practice site that won't interfere with the live site at all, (without techy terms if possible),

I reckon on even my capabilities i could upgrade my live site to at least 1.39h without much of a problem, I've upgraded Ceon mapping from the originally installed module (probably 4 or 5 upgrades away from the new one out now),

So i have some capabilities, but would like a practice site first (Just in case)

31 Mar 2012, 5:44 PM
#2
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: test site for upgrades

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.

31 Mar 2012, 6:17 PM
#3
sash avatar

sash

New Zenner

Join Date:
Jul 2010
Posts:
99
Plugin Contributions:
0

Re: test site for upgrades

Thanks Schoolboy, Appreciate the detailed reply, my site sits at https://www.mysite.co.uk so the test site would be https://www.mysite.co.uk/testsite and not a seperate folder on it's own (testsite).

Seems a dumb question,:blush: but even in the the year i've been playing with websites, i've realised the slightest wrong detail , even as little as a missing (comma) somewhere, like i found in my meta tag file, can take a website down and can completely baffle a "newbie" like me lol

I'm sure i can follow your details ( i hope lol)

I've brought a wordpress back to life by replacing databases, so i'm sure i can do this (he says) lol

31 Mar 2012, 6:40 PM
#5
sash avatar

sash

New Zenner

Join Date:
Jul 2010
Posts:
99
Plugin Contributions:
0

Re: test site for upgrades

schoolboy:

Correct

Er... the folder "testsite" is separate... https://www.mysite.co.uk/testsite

:blush::smile:

Knew it was a dumb question lol, :lamo:

Make a new folder https://www.mysite.co.uk/testsite
not just a folder "testsite"

31 Mar 2012, 9:50 PM
#6
sash avatar

sash

New Zenner

Join Date:
Jul 2010
Posts:
99
Plugin Contributions:
0

Re: test site for upgrades

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.

Schoolboy, It won't allow me to have the same username as my original database??

31 Mar 2012, 10:10 PM
#7
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: test site for upgrades

You are probably trying to CREATE a NEW USER with the same name. All you need do is associate the new database with the EXISTING user. (The existing user for the original database).

If you are using proper C-Panel, scroll down to the bottom of the MySQL manager screen. There you will see a dropdown with the existing user and another dropdown with the databases. Your NEW database should appear. Simply SELECT the existing user, and associate that user with the NEW database. You need to give ALL PRIVILEGES to the user, for the new database.

31 Mar 2012, 10:17 PM
#8
sash avatar

sash

New Zenner

Join Date:
Jul 2010
Posts:
99
Plugin Contributions:
0

Re: test site for upgrades

schoolboy:

You are probably trying to CREATE a NEW USER with the same name. All you need do is associate the new database with the EXISTING user. (The existing user for the original database).

If you are using proper C-Panel, scroll down to the bottom of the MySQL manager screen. There you will see a dropdown with the existing user and another dropdown with the databases. Your NEW database should appear. Simply SELECT the existing user, and associate that user with the NEW database. You need to give ALL PRIVILEGES to the user, for the new database.

My Bad , that did it, thanks

31 Mar 2012, 10:46 PM
#9
sash avatar

sash

New Zenner

Join Date:
Jul 2010
Posts:
99
Plugin Contributions:
0

Re: test site for upgrades

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.)

Came unstuck at the bits in bold , Can you tell me the exact places to change in the file/ obviuosly i done it wrong

31 Mar 2012, 11:41 PM
#10
sash avatar

sash

New Zenner

Join Date:
Jul 2010
Posts:
99
Plugin Contributions:
0

Re: test site for upgrades

Got further, I can access admin on test site , but if i type in the url of the test site, it gives me a 404 page not found message?

I added the test site url into ht.access to see if it would help, but it didnt??

1 Apr 2012, 12:21 AM
#11
sash avatar

sash

New Zenner

Join Date:
Jul 2010
Posts:
99
Plugin Contributions:
0

Re: test site for upgrades

sash:

Got further, I can access admin on test site , but if i type in the url of the test site, it gives me a 404 page not found message?

I added the test site url into ht.access to see if it would help, but it didnt??

Edit above, I can access the test site, but if i click on a category it become a 404 not found,

Plus i'm supposed to password protected and that doesn't work, I just get straight through.

1 Apr 2012, 11:27 AM
#12
sash avatar

sash

New Zenner

Join Date:
Jul 2010
Posts:
99
Plugin Contributions:
0

Re: test site for upgrades

The site shows up just fine,it's only if i click on any category i get the "Custom" 404 page, not the typical google 404 error page,??

1 Apr 2012, 12:14 PM
#13
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: test site for upgrades

Where in my instructions do I say you need to mess about with htaccess?

If your TEST site does not work, then you have not followed my instructions... and it is possible that if you continue, you could end up messing up your LIVE site. :shocking:

Follow my instructions. There should be no 404 errors, no htaccess tweaks...

If you get errors, then you have not followed my instructions

1 Apr 2012, 12:25 PM
#14
sash avatar

sash

New Zenner

Join Date:
Jul 2010
Posts:
99
Plugin Contributions:
0

Re: test site for upgrades

schoolboy:

Where in my instructions do I say you need to mess about with htaccess?

If your TEST site does not work, then you have not followed my instructions... and it is possible that if you continue, you could end up messing up your LIVE site. :shocking:

Follow my instructions. There should be no 404 errors, no htaccess tweaks...

If you get errors, then you have not followed my instructions

Hi, I did follow the instructions, everything works, as in the admin, url to the test site, It's just that small error somewhere, I just added the testsites url to the ht.access to see if it would help, (But it didnt) so i took it out,

27 May 2012, 11:28 AM
#15
thannaree avatar

thannaree

Zen Follower

Join Date:
Dec 2010
Location:
Thailand
Posts:
304
Plugin Contributions:
1

Re: test site for upgrades

sash:

Hi, I did follow the instructions, everything works, as in the admin, url to the test site, It's just that small error somewhere, I just added the testsites url to the ht.access to see if it would help, (But it didnt) so i took it out,

did you figure it out - perhaps a wrong path in the configure files?

3 Jun 2013, 6:18 PM
#16
shopville avatar

shopville

Zen Follower

Join Date:
Aug 2012
Posts:
331
Plugin Contributions:
0

Re: test site for upgrades

schoolboy:

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.

Hello,

I followed your detailed instructions, thanks so much it works great, i now have a site to do testing, however according to your instructions i copied the complete data from the main site database to the new database i created for the test site, so now all customers, orders etc. are showing in the test site admin, i do not need this information how can i delete all orders/customer details?

3 Jun 2013, 9:11 PM
#17
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: test site for upgrades

ShopVille:

... i copied the complete data from the main site database to the new database i created for the test site, so now all customers, orders etc. are showing in the test site admin, i do not need this information how can i delete all orders/customer details?

Additional Considerations
Just to be on the safe side, you may wish to disable the email subsystem prior to manipulating anything with customer data (just to be on the safe side if you have existing orders / customer data)...

If you plan to test sending email, I'd recommend changing the store name (and / or the email address they are sent to). This makes identifying emails easier.

Safe Way
This method is tried, true, and safe. Use the Zen Cart admin folder to remove all unnecessary data. This includes orders, customers, admin users, etc.

Fast Way
While this method is fast, any mistakes made when directly modifying the database can break things.

Use phpMyAdmin to TRUNCATE (will empty the table) the following database tables: address_book, customers, customers_basket, customers_basket_attributes, customers_info, orders, orders_products, orders_products_attributes, orders_products_download, orders_status, orders_status_history, and orders_total.

TRUNCATE `address_book`;

Afterwards use something similiar to the following to remove all administrative users except admin.

DELETE FROM `admin` WHERE NOT `admin_name` = 'admin';
3 Jun 2013, 10:35 PM
#18
shopville avatar

shopville

Zen Follower

Join Date:
Aug 2012
Posts:
331
Plugin Contributions:
0

Re: test site for upgrades

Followed your instructions, i successfully deleted all information, however how do i do this:

lhungil:

Additional Considerations
Just to be on the safe side, you may wish to disable the email subsystem prior to manipulating anything with customer data?

Also, i have a lot of links on my site (in ezpages etc.) which the full link is incorporated in the html therefore resulting them in being opened in the regular site instead of in the test site, is there a way to add the links dynamically it should automatically consider the subfolder if in the test site? i tried having them as /index.php?main_page=index&cPath=2 but it still took it to the regular site

3 Jun 2013, 11:29 PM
#19
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: test site for upgrades

ShopVille:

however how do i do this:Admin->Configuration->Email Options->Send Emails? yes/no

ShopVille:

Also, i have a lot of links on my site (in ezpages etc.) which the full link is incorporated in the html therefore resulting them in being opened in the regular site instead of in the test site, is there a way to add the links dynamically it should automatically consider the subfolder if in the test site? i tried having them as /index.php?main_page=index&cPath=2 but it still took it to the regular site
You would have to manually edit every link that you had hard-coded into an ez-page.
Or, just don't click on those links because you know they're gonna point to the wrong site. Instead use the normal site-provided navigation.
This is a TEST site, right? so only you will be using it, and it's all experimental and will never be the actual "live" site. Right?

4 Jun 2013, 1:56 PM
#20
shopville avatar

shopville

Zen Follower

Join Date:
Aug 2012
Posts:
331
Plugin Contributions:
0

Re: test site for upgrades

DrByte:

You would have to manually edit every link that you had hard-coded into an ez-page.
Or, just don't click on those links because you know they're gonna point to the wrong site. Instead use the normal site-provided navigation.
This is a TEST site, right? so only you will be using it, and it's all experimental and will never be the actual "live" site. Right?

Right, i'm asking if there's a way to incorporate it in the live site for the future so that whenever i'm doing a clone copy for testing purposes it should automatically consider the subfolder