Post by krneki » Fri May 30, 2014 2:24 am

I need to create exactly the same copy of my current Opencart store to have it for testing purposes. But since I'll have this copy of Opencart store on the same server in X subfolder, I can't just use migration tutorial because they are meant to migrate on another server. Could you please point me out how to achieve my idea?

Active Member

Posts

Joined
Tue Jul 17, 2012 9:58 pm

Post by IP_CAM » Fri May 30, 2014 2:44 am

jut download the whole Shop with all it's sub's by using an FTP-Client, to your HD.
Then, export/download your MySql DB by use of the MySql-Admin Tool, located in your Server Admin Section.

Ernie

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by krneki » Fri May 30, 2014 2:57 am

Do you mean to export and import MySQL database with PHPMyAdmin? But won't they interfere with each other because the name of databases (and prefixes) will be the same?

Also, I guess I need to change config of newly created Opencart test store to use new database?

Active Member

Posts

Joined
Tue Jul 17, 2012 9:58 pm

Post by victorj » Fri May 30, 2014 3:22 am

Download all files and folders of your shop using ftp to your hard drive.

now download a fresh copy of opencart same version as your running shop.

copy install folder to root of downloaded files.

make a backup op your database using phpmyadmin.
rename downloaded sql file opencart.sql
copy to downloaded files and place in folder install, it will overwrite existing file.

find config.php in in root and admin in downloaded files on your harddrive and remove all entrys and save, both should be 0 byte.

upload to your new hosting space, go through install, and there is a working copy of your website on new hosting.

Koeltechnische deurrubbers eenvoudig online op maat bestellen.
Alle niet stekplichtige onderdelen zoals scharnieren, sloten, randverwarming en verlichting voor alle typen koelingen en vriezers.
https://koelcel-onderdelen.com


User avatar
Expert Member

Posts

Joined
Sat Jun 25, 2011 4:09 am
Location - Alkmaar Holland

Post by krneki » Fri May 30, 2014 3:35 am

But shouldn't I create new database with new name, username and password for newly created Opencart? I don't know where will database of newly created Opencart reside with that procedure... ???. Please notice that I also need to copy database content, VQmod and all other extension, modifications etc.
copy install folder to root of downloaded files.
What do you mean by that? Do you mean to:
1. Download from http://www.opencart.com/index.php?route ... d/download and extract those files
2. Download all files and folder from FTP and overwrite the ones from http://www.opencart.com/index.php?route ... d/download
3. Upload everything to FTP in subfolder named X
4. Delete all entries within config.php
5. Run installation from /x/install
?

Active Member

Posts

Joined
Tue Jul 17, 2012 9:58 pm

Post by victorj » Fri May 30, 2014 4:21 am

Yes a new database should be created.

I image you want a copy of your existing shop running on a different or new domain name.

say you want a second shop in a subfolder of your existing hosting.

upload all files to subfolder, upload install folder found in the fresh oc download, to subfolder in your hosting.
copy database backup to subfolder/install, overwriteing existig opencart.sql

edit config files as in previous post.

if youre sitll unsure how to perform this, drop a pm and ii can create a complete installer for you, so you can set up a copy of your shop

Koeltechnische deurrubbers eenvoudig online op maat bestellen.
Alle niet stekplichtige onderdelen zoals scharnieren, sloten, randverwarming en verlichting voor alle typen koelingen en vriezers.
https://koelcel-onderdelen.com


User avatar
Expert Member

Posts

Joined
Sat Jun 25, 2011 4:09 am
Location - Alkmaar Holland

Post by debbiekipt » Wed Feb 18, 2015 5:43 pm

Hi guys and thanks for this post!

I followed the instructions and voila, my test site home page looks exactly as expected, BUT...
none of the links work.

Is it because the original DB (OC_1)was copied to a new DB with a different name(OC_2)?

Can anyone advise how I fix this?

Many thanks!

Active Member

Posts

Joined
Sun Nov 21, 2010 8:10 pm

Post by IP_CAM » Thu Feb 19, 2015 12:01 am

Just as an advise, this here is a good guide to do such:

http://cartadvisor.com/blog/2012/02/20/ ... ew-domain/

Ernie
bigmax.ch/shop/

My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by debbiekipt » Thu Feb 19, 2015 2:49 am

Many thanks IP_CAM
The config files are all correct for the new copy test site - it is on the same server, just different folder.

Having not been able to get past this, I employed my host to do it.

They got the same result and said the links were all 'hard coded' so they changed them, but still the same result.

So I (and my host) are stuck with this for the moment.

Hopefully a solution will present itself soon. I guess it is something hundreds of people have done successfully, so I must be missing something - will keep trying.

Thanks again :-)

Active Member

Posts

Joined
Sun Nov 21, 2010 8:10 pm

Post by victorj » Thu Feb 19, 2015 7:16 am

drop me a pm probally solved in a couple off minutes

Koeltechnische deurrubbers eenvoudig online op maat bestellen.
Alle niet stekplichtige onderdelen zoals scharnieren, sloten, randverwarming en verlichting voor alle typen koelingen en vriezers.
https://koelcel-onderdelen.com


User avatar
Expert Member

Posts

Joined
Sat Jun 25, 2011 4:09 am
Location - Alkmaar Holland

Post by debbiekipt » Thu Feb 19, 2015 11:37 pm

PM'd you thanks

Active Member

Posts

Joined
Sun Nov 21, 2010 8:10 pm

Post by Sekaman » Sat Feb 28, 2015 6:41 pm

Hi,

Could mind to share results?

I got a same kind of issue...
I would like to create a exact copy of opencart 1.5.6 to another domain.
Both would be at separate domain and database, but same host.

Copying the opencart to the new domain is ok.
But rename and set the copy of database to work with the "new" copy of opencart is a bit challenge to me.

Should I just edit the config file to the renamed database...?
krneki wrote:4. Delete all entries within config.php
5. Run installation from /x/install
Isn't this make a NEW database?

New member

Posts

Joined
Mon Apr 08, 2013 2:44 pm

Post by debbiekipt » Sun Mar 01, 2015 3:55 pm


Active Member

Posts

Joined
Sun Nov 21, 2010 8:10 pm

Post by imartin_1983 » Fri Sep 30, 2016 4:30 pm

Hello guys,

I try to explain this in simple steps since no one seems to get it. :)
So the initial question is about creating a test website, so you can work on it.

1) Copy your FTP of your current web.
2) Create new folder in FTP, name URL say "www.test.domain.com" (folder name will be "www.test" or depending how your host names subdomains).
3) Copy all files to the new folder.
3) Export your curent database (DB).
4) Open text editor (I use free Sublime, you can use any editor), go to Find > Replace, type "domain.com" replace with "test.domain.com". Save your new database as test.domain.sql (name doesn't matter, its just for you). Edit you config files (see below).
5) Now create a database in phpAdmin (or your host administration inteface)
6) Import the test.domain.sql database into it.

Now you need to edit your config files (you can edit them in Sublime, before uploading to FTP!)
1) Open robots.txt, make sure its set to:

Code: Select all

User-agent: *
Disallow: /
You dont want bots to index your test domain.

2) Open config.php in Sublime.
- For all folders: Find>Replace domain.com with "test.domain.com". (This is important! Doesn't have to be with this structure. It can be: "host/www/domain.com/www.test/catalog" So in this case, you will have to manually add the "test" after "www". Depends what is considered as a subdomain for your host.
- set DB password and proper DB_DATABASE name. Important: Make sure this is correct.

3) Open config.php in admin>config.php
Rename as above. Rename HTTP_SERVER and CATALOG with like "http://www.test.domain.com/" etc.
Add the subdomain folders location.

Remember: If anything in displaying the admin or front-end section is wrong, maybe you have these folders in both config files set incorrect, or your DB does not contain the "test" location as mentioned above.

4) .htaccess - get a fresh file for OC, if you have some 301 redirections set in this file. If there is a mess in the front end preview, use the old .htaccess file.

When you login to test OC admin:
1) Delete your customers and orders - you dont want them in the testing web. Delet 1 entry in test DB to see if its connected properly and original DB stays intact.

Few notes:
Make sure you triple check before you extract files to test domain. It's not fun otherwise..
You can usually copy FTP to about 120 Mb (depends on hosting), so copying everything except folder "image" will do it. Then copy folder image seperately.
Keep different names and folders for test databases and files, it can get messy.

Good luck!
Cheers.

Newbie

Posts

Joined
Sun Mar 01, 2015 11:50 pm
Who is online

Users browsing this forum: No registered users and 109 guests