Duplicate copy of store on separate domain

Hello All-

I know this topic has been discussed before and I have read & participated in threads on this topic. But I'm trying to figure out the best way to achieve it with my limited experience.



I am wanting to have a duplicate copy of my current website on a separate domain that will be password protected from the general public and search engines. Obviously, I am wanting to use this exclusively for testing purposes.



Would I be successful if my steps were to: FTP my entire store to my other domain and then simply change my config.local.php? Would that work?



Thanks for any insight you can offer.

cmund

Basically yes but there is more to it. Do you have cPanel? If so, for one, it beats the hell out of FTP utilizing the “File manager”. You also need to create a subdomain utilizing the “Subdomain” feature. This will ensure that nothing will cross between the 2 installations.

cPanel How To Add Sub-Domain - YouTube



subdomain vid for cpanel



John

[quote]Would I be successful if my steps were to: FTP my entire store to my other domain and then simply change my config.local.php? Would that work?[/quote]



Your right on track Carol!



You should also consider making a copy of your existing database, and rename it to something different then connect your test store to this “test DB”, this way you don’t run the risk of messing up your actual production DB.



PS: make certain you password protect this test domain right away otherwise it can get crawled before you realize it (of course, this only happens when you dont want your site to get crawled)! :)

Thank you all for the great information, but will I need a subdomain or need to rename my database based on the fact that this up & coming test domain name is under a complete and separate web host? Sorry, should have mentioned that earlier.

cmund

You don't need a sub-domain, just a sub-directory but you do need to update your main store's robots.txt file to Disallow crawling to the directory. Better still is to password protect the directory so customers don't inadvertently wander there.

Process is really pretty straight-forward:

  • prepare by clearing statistics and log data. Delete /var/upgrade/* contents. Edit robots.txt
  • copy db to _test
  • copy main store files to test sub-directory (usually best done by selecting all files/directories in cpanel and creating a compressed file). Then create test directory and uncompress that file into the new directory.)
  • edit config.local.php to reflect new 'path' of '/test' and new db_name
  • edit .htaccess to reflect change of BaseDir from '/' to '/test'



    You should then be ready to go. access your test store via /test/

I don't use either a sub-domain or a sub-directory, I have spare domain names that I own and plenty of server space, so I just setup the new domain and simply install my CS-Cart “test site” into the root just like any other install. Then, I just password protect the entire directory where CS-Cart is installed, this way it is not viewable by the public, nor can it be crawled.



I believe this is what Carol was also attempting to do as she mentioned setting up on a new domain.

Thank you all so much for your replies. I plan to work on this- this week.

Thanks again,

cmund

[quote name='tbirnseth' timestamp='1311967196' post='118506']

You don't need a sub-domain,[/quote]



You don't? Have you ever tried it? Because when I set it up as a sub directory there was all kinds of interference with htaccess files (redirects).

It's the standard way I do upgrades.

You just need to have the .htaccess file in the test directory have the BasePath /test instead of '/'.

Important thing is to add Disallow to robots.txt in the parent directory and it's always best to password protect the test directory to prevent access.



But there's no problem running the site nor upgrading it.

[font=“Verdana”]So having a second installation on a different server and domain doesn't result in having to buy a second cs-cart licence???



I thought they only allowed duplicate installations on the same server as either a sub folder or subdomain?



I will have to give this a try - as I have no clue how to use the “My Changes” partly due to the lack of documentation or details within CS-Cart it self!



It's about time CS-Cart adds baloon help all through the admin panel - click on the name of a config box:


[quote][size=“2”][[color=“#FF0000”]?[/color]][/size] Disable stock levels:



HELP BOX: [quote]Disable stock levels will remove the “Stock: x available” and change the text to simply say “In Stock”.[/quote][/quote][/font]



This very simple addition to their code would reduce support tickets and questions by 500%!!

Fingers crossed!

[quote name='UniDevelopers' timestamp='1315043403' post='120898']

[font=“Verdana”]So having a second installation on a different server and domain doesn't result in having to buy a second cs-cart licence???



I thought they only allowed duplicate installations on the same server as either a sub folder or subdomain?



I will have to give this a try - as I have no clue how to use the “My Changes” partly due to the lack of documentation or details within CS-Cart it self!



It's about time CS-Cart adds baloon help all through the admin panel - click on the name of a config box:



[/font]



This very simple addition to their code would reduce support tickets and questions by 500%!!

Fingers crossed!

[/quote]



As long as you password protect the entire directory where CS-Cart resides, they say you are ok.