Zen Cart Logo
Forums / Installing on a Windows Server / sync online site with local host?

sync online site with local host?

Locked

Views: 5,559

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
16 Dec 2007, 06:15
#1
oxymoronz avatar

oxymoronz

New Zenner

Join Date:
Apr 2007
Posts:
65
Plugin Contributions:
0

sync online site with local host?

I am pretty new to this so I apologize in advance. Please bare with me. I have a version of my site loaded on my local host but I also have another version on a live server. I want to create a backup of the live database and then restore it on my localhost so that my sites are synced. How do I create the database...and then how do I restore it on my local host?

16 Dec 2007, 08:22
#2
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: sync online site with local host?

Depends what program you are using to replicate
zencart on localhost..basic method would be to take a copy
of your live site's mysql database..create new database on
localhost, load into it, your newly saved live site's mysql database..
then in localhost zencart, adjust both configure files to reflect
new database details i.e. database name, database user
and password etc........
You will require copy of phpmyadmin on localhost to achieve
above...

17 Dec 2007, 21:05
#3
oxymoronz avatar

oxymoronz

New Zenner

Join Date:
Apr 2007
Posts:
65
Plugin Contributions:
0

Re: sync online site with local host?

I believe I know how or can fiqure out how to create a backup on my live host but I am running xamp on my local host and can't figure out how to backup or restore databases. If anyone is familiar with xamp any help would be appreciated.

17 Dec 2007, 21:59
#4
oxymoronz avatar

oxymoronz

New Zenner

Join Date:
Apr 2007
Posts:
65
Plugin Contributions:
0

Re: sync online site with local host?

Sooo. It turns out that through my host I have phpmyadmin which has an import/export function that I presume is made for this purpose. I am just not sure about the different settings. I don't feel like jackin' up my site AGAIN. :frusty:

18 Dec 2007, 00:03
#5
drbyte avatar

drbyte

Sensei

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

Re: sync online site with local host?

oxymoronz:

I have phpmyadmin which has an import/export function that I presume is made for this purpose. I am just not sure about the different settings.

  1. Click on "tutorials/FAQ" in the top right corner of this page.
  2. Search for "backup"
  3. Choose the first link, which discusses doing database backups with phpmyadmin.
18 Dec 2007, 06:54
#6
oxymoronz avatar

oxymoronz

New Zenner

Join Date:
Apr 2007
Posts:
65
Plugin Contributions:
0

Re: sync online site with local host?

Thank you for the help. I'll check that out. Much appriciated.

20 Dec 2007, 05:33
#7
oxymoronz avatar

oxymoronz

New Zenner

Join Date:
Apr 2007
Posts:
65
Plugin Contributions:
0

Re: sync online site with local host?

My question is why is my local site not reading from the appropriate database?

here is what I've done thus far...

  1. I created a database backup with phpmyadmin from my live site.
  2. Then on my local phpmyadmin I created a database called oxymdan0_.
  3. After I created that I uploaded the backed up database named oxymdan0_zc1 to it and only the zc1 portion showed up under the database oxymdan0_.
  4. Then I completed the install of the new local zen cart.
  5. Then I used ftp to download my files from the live site to local.
  6. logged into admin and changed template.

Now the site pulls up with the right look but no products like it's not reading from the same database from the live site. The only steps that I didn't complete yet is to edit the includes/config.php and admin/includes/config.php because I'm not quite sure exactly what I should be changing the pathes to or even what to look for if they are even incorrect. :frusty:

20 Dec 2007, 05:43
#8
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: sync online site with local host?

The only steps that I didn't complete yet is to edit the includes/config.php and admin/includes/config.php because I'm not quite sure exactly what I should be changing the pathes
This is why not working correctly.. you need to alter both config files to reflect that you are now on localhost and have different database details...otherwise your new zencart site is trying to read mysql database on your live site i.e. oxymdan0_zc1 instead of oxymdan0

20 Dec 2007, 20:22
#9
oxymoronz avatar

oxymoronz

New Zenner

Join Date:
Apr 2007
Posts:
65
Plugin Contributions:
0

Re: sync online site with local host?

Then all I would need to change in the config files is the...

define('DB_DATABASE', 'oxymdan0_z1');

changed to 'oxymdan0_'?:unsure:

20 Dec 2007, 20:35
#10
oxymoronz avatar

oxymoronz

New Zenner

Join Date:
Apr 2007
Posts:
65
Plugin Contributions:
0

Re: sync online site with local host?

The funniest thing happened! I tried changing the DB_Database and DB_Prefix settings with no result except the site that once worked changed to a page saying there was trouble connecting to the database and to try again later. So I went back to the config files and put them back to their original settings of 'DB_Database Oxymdan0_zc1' and all of a sudden the site began to work properly with the appropriate database. All is well now!
:shocking:...:clap: