If this is your first visit, check our documentation. To post, register or login.
Forums / General Questions / Trying to set up local copy of live store on WAMP

Trying to set up local copy of live store on WAMP

Started by whitephantom on 12 May 2016, 3:19 PM · Views: 1,171

Results 1 to 8 of 8
12 May 2016, 3:19 PM
#1
whitephantom avatar

whitephantom

Zen Follower

Join Date:
Jan 2010
Posts:
105
Plugin Contributions:
0

Trying to set up local copy of live store on WAMP

Hi,

I have a live store, but it's not using a responsive template. (ETA - ZenCart version 1.5.4 - says "Your version of Zen Cart® appears to be current" although I think the current one is 1.5.5a?)

I tried installing a couple of responsive templates and switching to them briefly, but they needed a good bit of modification before they'd be ready to put live, and I didnt' want to take my store offline to do that.

So I reckoned the best way was to install WAMP server on my local machine and play around with things there.

I've installed that, and have copied all my zencart files and folders from the live server to my local machine, changing the two configure.php files to account for the change in location (define('DIR_FS_CATALOG', 'C:/wamp/www/ZenLocal/'); define('HTTP_SERVER', 'http://localhost'); etc)

I created a db in phpMyAdmin with the same name as my live one, and I exported / imported from live to local.

Now I can access something vaguely resembling my live site. The homepage has the correct text, and it's showing the correct categories and names of my EZ pages, but everything else is way off. The layout is nothing like the live site, and when I click a category or an EZ page, it just goes straight to my localhost settings. Also, I can't log in to the admin - it just says that the password is wrong. I assumed the password would stay the same when I copied everything down?

Anyone know why it's doing this and what I need to do to get things right? Or is there are better way to do all this? A way to preview / modify new templates on the web server without messing up the live site?

Many thanks for any help!!

WP.

15 May 2016, 4:57 PM
#2
mikeyg avatar

mikeyg

Totally Zenned

Join Date:
May 2005
Posts:
515
Plugin Contributions:
0

Re: Trying to set up local copy of live store on WAMP

Not sure if this is the way to do it but I discovered if you delete the passwords in the admin table and then go to log in you are prompted for a new password. Leave the old one blank (as you have just deleted it in the table using phpmyadmin) and enter the new ones. This allows you to get logged in to the admin area.

hope that helps as a start. I am no expert so sorry if it proves unsucessful

15 May 2016, 11:21 PM
#3
frank18 avatar

frank18

Deceased

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

Re: Trying to set up local copy of live store on WAMP

A pretty sure way of cloning a live site locally on your LAMP / MAMP / WAMP / XAMPP stack (whatever you prefer) is to first install the exact same version of your live ZC store with exactly the same DB / admin credentials and table prefix. Test the fresh install.

Then lock up (change permissions of) your configure files (400 or 444) so they can't be overwritten when later FTP'ing your live file system.

Next you drop all tables from your local DB and import your live DB into the empty local DB.

Lastly, you copy all live files over the existing local files. You should have 2 errors after the copy procedure, namely saying that the 2 'configure.php' files could not be opened / overwritten.

That should be it.... you can now start modifying/testing/customizing whatever on your local clone without interrupting your live business.

NOTE: We are sorry that Frank is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

16 May 2016, 5:19 AM
#4
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Trying to set up local copy of live store on WAMP

If the PHP version on your "backup" site is much below your live site, then the import of your live site to your "backup" site will present difficulties with logging in as the password encryption process may be different and unusable for the lower PHP version after being so encrypted in the higher version.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

16 May 2016, 1:43 PM
#5
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,974
Plugin Contributions:
8

Re: Trying to set up local copy of live store on WAMP

as far as a better way to do this, no, you are going about things in the right way. installing a local version of your site using whatever tool is the way to go. if you want to really have things better under control, but it all under a source version control system, ie git, and set up a repository. a bunch of work to learn on the front end, but well worth the effort down the road.

as far as your current problems, i'm not sure what you mean by clicking onto a page it goes to your localhost settings. can you be more specific?

are all of your products there? are you sure the DB completed the import and you are now using the local database? after that i would check to ensure that you are using the right template...

if all of the code is the same, and the site "works", i have found most of the time the difference is in the DB, so again i would check to ensure that the data is the same.

finally as others have mentioned, different versions of PHP can affect your local site.

good luck!

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

16 May 2016, 6:43 PM
#6
picandnix avatar

picandnix

Totally Zenned

Join Date:
Dec 2010
Location:
UK
Posts:
1,779
Plugin Contributions:
2

Re: Trying to set up local copy of live store on WAMP

Do you have any URL rewrite mods installed or a .htaccess file in the root of your wamp install?

16 May 2016, 7:17 PM
#7
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Trying to set up local copy of live store on WAMP

FYI, the ZC suggested method of changing the password is provided in this FAQ.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

17 May 2016, 2:38 AM
#8
frank18 avatar

frank18

Deceased

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

Re: Trying to set up local copy of live store on WAMP

mc12345678:

If the PHP version on your "backup" site is much below your live site, then the import of your live site to your "backup" site will present difficulties with logging in as the password encryption process may be different and unusable for the lower PHP version after being so encrypted in the higher version.

Valid point indeed!

NOTE: We are sorry that Frank is no longer with us.
We are grateful for all his contributions to the Zen Cart community.