Results 1 to 10 of 10
  1. #1
    Join Date
    Apr 2007
    Posts
    65
    Plugin Contributions
    0

    Default 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?

  2. #2
    Join Date
    Apr 2004
    Location
    UK
    Posts
    5,821
    Plugin Contributions
    2

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

  3. #3
    Join Date
    Apr 2007
    Posts
    65
    Plugin Contributions
    0

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

  4. #4
    Join Date
    Apr 2007
    Posts
    65
    Plugin Contributions
    0

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

  5. #5
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: sync online site with local host?

    Quote Originally Posted by oxymoronz View Post
    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.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  6. #6
    Join Date
    Apr 2007
    Posts
    65
    Plugin Contributions
    0

    Default Re: sync online site with local host?

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

  7. #7
    Join Date
    Apr 2007
    Posts
    65
    Plugin Contributions
    0

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

  8. #8
    Join Date
    Apr 2004
    Location
    UK
    Posts
    5,821
    Plugin Contributions
    2

    Default 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

  9. #9
    Join Date
    Apr 2007
    Posts
    65
    Plugin Contributions
    0

    Default 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_'?

  10. #10
    Join Date
    Apr 2007
    Posts
    65
    Plugin Contributions
    0

    Default 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!
    ...

 

 

Similar Threads

  1. v151 Problem with header different from local site to remote site.
    By eazy in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 14 Nov 2012, 03:45 AM
  2. v139h local host - how do I set up a copy of my site on xampp?
    By Maynards in forum Installing on a Windows Server
    Replies: 2
    Last Post: 3 Mar 2012, 08:23 PM
  3. Sync my site from local to production server
    By orange_juice in forum General Questions
    Replies: 0
    Last Post: 16 Sep 2009, 07:04 PM
  4. Problems replicating site on local host
    By Visionvek in forum Installing on a Mac Server
    Replies: 2
    Last Post: 1 Jul 2008, 08:08 PM
  5. Replies: 0
    Last Post: 17 Jun 2008, 01:45 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR