Zen Cart Logo
Forums / Upgrading to 1.5.x / Moving to a new server

Moving to a new server

Views: 1,392

Results 1 to 6 of 6
01 Feb 2023, 13:44
#1
w9dkc avatar

w9dkc

New Zenner

Join Date:
Apr 2020
Location:
Tampa, FL
Posts:
15
Plugin Contributions:
0

Moving to a new server

Yesterday morning I read posts for 3 hours. Last night I read posts for 2 hours. Most of what I read was older posts that appear not to work anymore. I have a cart running on server A for 15 years. I recently updated to 157C. I have over 3000 products fully set up, images, multiple attributes, etc. I need to move the database to the new server B. I have installed 157C on new server B. I have customized the pages that need that. I attempted to import the server A database into server B database and got an error about not authorized. Maybe db user name prefix is too blame. Can someone point me in a direction that will work in 157C?

01 Feb 2023, 17:54
#2
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,682
Plugin Contributions:
56

Re: Moving to a new server

Be sure the configure.php files on old vs new are identical for the fields starting with DB_.

01 Feb 2023, 23:41
#3
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Moving to a new server

May also help (as discouraging as it may be to read) to identify the steps taken. Thought to ask just about the database transfer, but then realized that any steps along the way may be a cause. Of course the above may resolve the issue as well you will be the one to best identify.

02 Feb 2023, 00:08
#4
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,682
Plugin Contributions:
56

Re: Moving to a new server

Also please note that there is a canonical answer to the question "how do I move to another server" in the help:

https://docs.zen-cart.com/user/installing/change_hoster/

02 Feb 2023, 03:22
#5
oldngrey avatar

oldngrey

Zen Follower

Join Date:
Apr 2008
Location:
Qld, Australia
Posts:
417
Plugin Contributions:
0

Re: Moving to a new server

w9dkc:

I attempted to import the server A database into server B database and got an error about not authorized.
This is a long shot but I assume that you are using Linux. If you are trying to import using mysql -u USERNAME -p DATABASENAME <OLDDATAFILE.gz
try using the --binary-mode switch eg mysql --binary mode -u USERNAME -p DATABASENAME <OLDDATAFILE.gz

If that fails with the "not authorized" error try unzipping the database file first eg ```
gunzip OLDDATAFILE.sql.gz

03 Feb 2023, 20:18
#6
w9dkc avatar

w9dkc

New Zenner

Join Date:
Apr 2020
Location:
Tampa, FL
Posts:
15
Plugin Contributions:
0

Re: Moving to a new server

So, I started over. I uploaded version 158 and installed it. Had a few bumps (forgot to use the db prefix and user prefix). I dumped the database except table 3 (Admin). I had already exported the other database leaving out table 3. I imported that. it worked. I then updated the database to 158. Everything works. I then uploaded my product and category images. It worked. Then uploaded my custom templates. It worked.
I checked 4 hours ago and had 11 bots crawling.
Already got some bad news from Bing - "The page contains 'noindex' directive either in a meta tag or HTTP header".
somebody tell me where to look?