Zen Cart Logo
Forums / Installing on a Linux/Unix Server / Moving to another server as a template for a new site

Moving to another server as a template for a new site

Views: 1,601

Results 1 to 8 of 8
16 Feb 2011, 1:39 PM
#1
keneb avatar

keneb

New Zenner

Join Date:
Sep 2010
Posts:
17
Plugin Contributions:
0

Moving to another server as a template for a new site

Hi

I have a live Zencart site (latest Zencart version) and have a question about moving it to another server to use it as a template for a new site.

I have read extensively on the forum and Tutorials/FAQ and am fairly confident that I will be able to follow the instructions on moving the site.

The existing site has a DB_prefix that is unrelated to the subject matter of the new site and i cannot find insttructions on how to change the DB_prefix.

The instructions for moving a Zencart site clearly state that the DB_prefix of the source and destination site must be the same.

Would I have to move the site, then change the DB_prefix? Would it be matter of creating a new database, then deleting the old one.

I did many changes to the classic template including adding the zones shipping module, so it would be much quicker starting with this as a base for the new website. When it is working I will merely delete the products and then do further changes.

Theroretically it would not matter that the DB_prefix is cushjons and the new website is about about movies, but that is just not professional.

So, is it easy to change the DB-prefix?

16 Feb 2011, 3:19 PM
#2
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Location:
Norfolk, United Kingdom
Posts:
3,189
Plugin Contributions:
0

Re: Moving to another server as a template for a new site

Take a backup of your existing database and open in a plain text edtor like PS Pad or Text Pad and use the "Find and Replace" feature. Tell it to look for all instances of cushjons_ in the Find box and leave the Replace box empty. It will then remove all prefixes from every database table. Save it after edting and Import it into the new and empty db using phpMyAdmin.

Vger

16 Feb 2011, 4:28 PM
#3
keneb avatar

keneb

New Zenner

Join Date:
Sep 2010
Posts:
17
Plugin Contributions:
0

Re: Moving to another server as a template for a new site

Vger, thanks for the prompt response. I will try your suggestion.

16 Feb 2011, 6:26 PM
#4
z3nn3d avatar

z3nn3d

New Zenner

Join Date:
Jun 2009
Location:
Porthleven, Cornwall, UK
Posts:
43
Plugin Contributions:
0

Re: Moving to another server as a template for a new site

The cushjons_ prefix would normally only be in the filename of a database dump taken from PhpMyAdmin, not in the MySql statements inside the file.
If any prefixes exist in the sql file itself, they are likely to be zen_ Example: zen_admin , zen_address_book etc.

17 Feb 2011, 10:13 AM
#5
keneb avatar

keneb

New Zenner

Join Date:
Sep 2010
Posts:
17
Plugin Contributions:
0

Re: Moving to another server as a template for a new site

Hi, thanks for the responses. However I do not know how to proceed. The database dump is in compacted format, so cannot edit that.

Can the DB-prefix be changed after I move the Zencart installation to a different server. I would really appreciate some help on how to do that?

17 Feb 2011, 10:30 AM
#6
keneb avatar

keneb

New Zenner

Join Date:
Sep 2010
Posts:
17
Plugin Contributions:
0

Re: Moving to another server as a template for a new site

Apologies, it is not DB_prefix that I want to change but
DB_SERVER_USERNAME', 'cushions_xxxx'); and define('DB_DATABASE', 'cushions_XXXX').

I know how to change this in the config files, but not the database side.

I want to change cushions to movies

17 Feb 2011, 4:23 PM
#7
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Location:
Norfolk, United Kingdom
Posts:
3,189
Plugin Contributions:
0

Re: Moving to another server as a template for a new site

The cushjons_ prefix would normally only be in the filename of a database dump taken from PhpMyAdmin, not in the MySql statements inside the file.

Well, that's nonsense. Each table would have the prefix in the dump of the db.

Apologies, it is not DB_prefix that I want to change but
DB_SERVER_USERNAME', 'cushions_xxxx'); and define('DB_DATABASE', 'cushions_XXXX').

I know how to change this in the config files, but not the database side.

You don't have to change it in the db, only in the two configure.php files.

Vger

17 Feb 2011, 4:33 PM
#8
keneb avatar

keneb

New Zenner

Join Date:
Sep 2010
Posts:
17
Plugin Contributions:
0

Re: Moving to another server as a template for a new site

Thanks Vger