Zen Cart Logo
Forums / General Questions / Migrating subdomain to a new domain

Migrating subdomain to a new domain

Views: 795

Results 1 to 6 of 6
16 May 2016, 5:06 PM
#1
jmberman avatar

jmberman

Zen Follower

Join Date:
May 2016
Location:
Ohio
Posts:
422
Plugin Contributions:
0

Migrating subdomain to a new domain

I have some concerns I'm hoping you all can help allay...

I currently run my webstore on a subdomain using DreamHost.
My plan is to buy a domain, and switch the whole store to the new domain using the same hosting...

I know there are two config files I need to change the site address, but is there more I need to do,
what all is required to do this painlessly?

I don't want to buy the domain and suddenly be faced with a full reinstall and setup of the store.

THANK YOU!

16 May 2016, 6:46 PM
#2
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Migrating subdomain to a new domain

So on the surface, yes just the two includes/configure.php files need modification (assuming that all changes that you've made to your store use the constants of the site and didn't hard code any links/references to include your current URI.) but, if not mistaken when you setup the new host name you will likely also need to update the file paths beginning with DIR_FS_ in the same two files.

The other thing may be that you may have a new database link/database. So you may have to modify that information as well in the two files...

The easiest way to deal with most of this, is to "setup" a site of the same version so that you can have your configure.php files created for you with the correct link(s). Then copy over all of your files (except those two) and export your old database to be imported to your new database (while the store is temporarily down for maintenance) and pretty much done...

Somewhere in all this, you need/want to redirect all your old traffic to this new location, and if you're really on top of things you request your host to reduce the cache duration of your existing site in preparation for the move.

All of this is covered in the FAQ. Here's two links: https://www.zen-cart.com/content.php?142-i-want-to-move-my-zen-cart-installation-to-another-host-or-a-different-server
https://www.zen-cart.com/content.php?160-i-have-installed-zen-cart-to-a-directory-how-do-i-rename-or-move-that-directory

17 May 2016, 5:40 PM
#3
jmberman avatar

jmberman

Zen Follower

Join Date:
May 2016
Location:
Ohio
Posts:
422
Plugin Contributions:
0

Re: Migrating subdomain to a new domain

My concern is I went to export my MYSQL database for my store, and it's titled jmbrman_com, but my new domain install of the store will be different... so when I import the old MYSQL to the new phpmyadmin on the new domain, won't that cause problems? HOw do I solve this?

17 May 2016, 5:47 PM
#4
jmberman avatar

jmberman

Zen Follower

Join Date:
May 2016
Location:
Ohio
Posts:
422
Plugin Contributions:
0

Re: Migrating subdomain to a new domain

Oh whoa, when I go to install zen cart on my new domain, it's letting me choose the mysql from the other site, that seems like the way to go, right?

17 May 2016, 5:54 PM
#5
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Migrating subdomain to a new domain

You using an autoinstaller then? If so generally not suggested/recommended.

17 May 2016, 6:21 PM
#6
jmberman avatar

jmberman

Zen Follower

Join Date:
May 2016
Location:
Ohio
Posts:
422
Plugin Contributions:
0

Re: Migrating subdomain to a new domain

I bought my new domain.
Did a install of Zen Cart.
Replacing my changed files.
But how do I make the new store point to the old db?