Zen Cart Logo
Forums / General Questions / Working on a website off line?

Working on a website off line?

Locked

Views: 1,326

Results 1 to 14 of 14
This thread is locked. New replies are disabled.
7 Apr 2010, 4:37 PM
#1
comicmegastore avatar

comicmegastore

New Zenner

Join Date:
Dec 2009
Posts:
30
Plugin Contributions:
0

Working on a website off line?

What is the best way to work on our site offline. I'd like to be able to download the whole site, open it in a program and make changes off line while the site online is still working without any changes.

Which programs have this capability? Notepad +?

Our site is https://www.comicmegastore.com

7 Apr 2010, 6:22 PM
#2
schoolboy avatar

schoolboy

Totally Zenned

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

Re: Working on a website off line?

What exactly is it that you want to change?

For small edits, you can usually (safely) make changes to a live store during quieter periods.

For more significant changes, you can put the site into "maintenance" mode.

7 Apr 2010, 7:56 PM
#3
libertyguy avatar

libertyguy

New Zenner

Join Date:
Oct 2009
Posts:
37
Plugin Contributions:
0

Re: Working on a website off line?

comicmegastore:

What is the best way to work on our site offline. I'd like to be able to download the whole site, open it in a program and make changes off line while the site online is still working without any changes.

Which programs have this capability? Notepad +?

Our site is https://www.comicmegastore.com

Down load EasyPHP (free) Install as local host then install ZC You can then run and work on your site from your own computer

Nick

7 Apr 2010, 8:32 PM
#4
nightdesigns avatar

nightdesigns

New Zenner

Join Date:
Nov 2008
Posts:
55
Plugin Contributions:
0

Re: Working on a website off line?

Set up a test site such as test.mystore.com. Copy all of the files from you working store to your test store. You will need to make a few adjustments in the configuration files. Nothing complicated. I have my test domain set up with password protection.

You can then use the same database files, or set up a test set and copy from your main DB to the test DB and make necessary changes.

7 Apr 2010, 8:57 PM
#5
comicmegastore avatar

comicmegastore

New Zenner

Join Date:
Dec 2009
Posts:
30
Plugin Contributions:
0

Re: Working on a website off line?

schoolboy:

What exactly is it that you want to change?

For small edits, you can usually (safely) make changes to a live store during quieter periods.

For more significant changes, you can put the site into "maintenance" mode.

I'm just looking to mess around with it off line. Some of the improvements I would like to make are complicated and most likely will be by trial and error.

7 Apr 2010, 8:59 PM
#6
comicmegastore avatar

comicmegastore

New Zenner

Join Date:
Dec 2009
Posts:
30
Plugin Contributions:
0

Re: Working on a website off line?

libertyguy:

Down load EasyPHP (free) Install as local host then install ZC You can then run and work on your site from your own computer

Nick

I'll check this out. I think this is what I am looking for! :cheers:

7 Apr 2010, 9:02 PM
#7
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Working on a website off line?

The best method then would be to install a local server (xampp or easyPHP, or others) and copy and install your site on your computer, so you can test functions locally.

See the "Making a Local Copy of your Website" article in the wiki for complete instructions.
http://www.zen-cart.com/wiki/index.php/LocalCopySite

8 Apr 2010, 8:04 AM
#8
schoolboy avatar

schoolboy

Totally Zenned

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

Re: Working on a website off line?

I re-iterate my earlier question... WHAT type of changes are envisaged using the offline system?

Bear in mind there are TWO fundamental components to your Zencart store:

  1. The code files and other static resources (including images, html for the "defined pages", etc...)
  2. The database, which contains most of the dynamic data and to which a lot of information is "written" during the operational functioning of the store.

These two components are intricately intertwined and there are many "dangers" in trying to manage a site "offline" and then transfer that managed material back to the server.

Consider, for example...

You successfully create an "offline clone" of your site... And this will require a copy of BOTH COMPONENTS, because without one, the other will not function.

Now... in the offline site, you make a range of changes and edits, some of which may involve activating certain "switches" that exist in the database - changing side-column widths is one example of the many that are possible.

After you have made such edits, you may think that all you need do is ftp a copy of the changed files to overwrite those on the server, and then to "truncate" the database and re-import it from the database linked to the offline site.

However... while you have been busy working on your offline site, people have visited the LIVE site, made purchases, registered their details and conducted a range of activities that will have resulted in data being both ADDED TO and CHANGED WITHIN the live store's database.

Now... you take your offline database and overwrite the live database, trusting that all the settings you (may) have changed will be evident on the live site...

You will INSTANTLY lose all the information that has been captured in the interim...

When a site is LIVE and ACTIVE... the database is sacrosanct. It is working in real time and being altered all the time. If you then over-write it, all that data captured between the time you made your dbase clone, and the time you overwrite the dbase will be lost.

The FILE SYSTEM, however, is not as critical. You can modify most of the php in real-time.

8 Apr 2010, 9:11 AM
#9
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: Working on a website off line?

gjh42:

The best method then would be to install a local server (xampp or easyPHP, or others) and copy and install your site on your computer, so you can test functions locally.

See the "Making a Local Copy of your Website" article in the wiki for complete instructions.
http://www.zen-cart.com/wiki/index.php/LocalCopySite

What Glenn is suggesting here is (in my humble opinion) the best way to develop your site locally. Copy your live stuff onto your local machine and go from there.

When I first delved into Zen Cart some 3 years ago, I had no idea at all and developed everything 'live' - big mistake. You live and you learn.....:yes:

Here is a link to a thread I started a couple of years ago, asking for help about how to do it the reverse way: http://www.zen-cart.com/forum/showthread.php?t=105506

At the time of posting this, that thread had more than 2000 views.....

Hope this helps

Frank

8 Apr 2010, 9:25 AM
#10
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: Working on a website off line?

May I also add that schoolboy's advice must be taken very seriously. Some changes only affect a few files but are not written to the database. In that case you can just upload the modified files. If you are attempting changes that also affect the DB then you can't just overwrite your live DB with a copy of your local development DB.

Having said that, you can still test changes locally which are written to DB. Once you are happy with the outcome then you can implement same on the live site without uploading a local copy of your DB.

8 Apr 2010, 10:12 AM
#11
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Working on a website off line?

frank18:

What Glenn is suggesting here is (in my humble opinion) the best way to develop your site locally. Copy your live stuff onto your local machine and go from there.

I, on the other hand, have never installed Zencart locally. I have a domain I only use for (multiple) test installations. Works for me.

8 Apr 2010, 10:47 AM
#12
schoolboy avatar

schoolboy

Totally Zenned

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

Re: Working on a website off line?

stevesh:

I, on the other hand, have never installed Zencart locally. I have a domain I only use for (multiple) test installations. Works for me.

I used to use local set-ups, but abandoned this because live hosting on a proper internet server is way better for proper testing.

I have a dedicated hosting account where I have about 50 to 60 zencart installations running - each one configured for specific environments and testing situations.

8 Apr 2010, 2:18 PM
#13
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Working on a website off line?

I think we're talking about the difference between someone working on their own site and someone doing it professionally, with the resources and the need for multiple server installations.

The point about database changes and live shops is valid. There has been discussion and directions in the forum about merging customer/order tables when moving an upgraded cart to the live location. I think the usual advice is (when ready to move) put the live shop down for maintenance, copy its db into the test shop, redo any db changes, make sure it still works right, then move it to the live location and reopen. A more direct method for those who are knowledgeable may be to move just some tables from the test db to the live db - only for the bold and competent!

8 Apr 2010, 2:39 PM
#14
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: Working on a website off line?

Bear in mind that the minute you create a backup (or copy) of your database, it is nothing more than a "snap-shot" of its contents at that point in time.

That is why it is important when doing upgrades, or reconfigurations to the database, to put the store "offline" (maintenance mode) so that activity that influences changes to database content is stopped.