How to move Zen Cart to a new server – the easy way!

1. Copy site files and database
a) Use ftp and download entire zen cart directory to your local machine
b) Use ftp and upload entire zen cart directory to your new server
c) Head to your phpmyadmin and export your zen cart database to your local machine
d) Head to your phomyadmin on your new server and import the database file

2. Locating configure.php files – of which there are two.

One is in includes/configure.php and the other is in admin/includes/configure.php

I’ll use ‘store’ as our example – IE if you browsed to your site it would be http://www.mydomain.com/store

3. Adjusting the first config file: includes/configure.php

a) Find this code and replace details with your new domain name.
define(‘HTTP_SERVER’, ‘http://www.mydomain.com/store’);
define(‘HTTPS_SERVER’, ‘https://www.mydomain.com/store’);
define(‘HTTP_CATALOG_SERVER’, ‘http://www.mydomain.com’);
define(‘HTTPS_CATALOG_SERVER’, ‘https://www.mydomain.com’);

b) Find the code:

define(‘DIR_FS_CATALOG’, ‘/home/yourname/public_html/store/’);

and replace with your new path. If you’re unsure how to find your path, click here find out how here.

c) Find the code:

define(‘DIR_FS_SQL_CACHE’, ‘/home/yourname/public_html/store/cache’);

and change the path to suit here as well.

d) Change these connection details to your new server database.

define(‘DB_SERVER’, ‘localhost’);
define(‘DB_SERVER_USERNAME’, ‘yourusername’);
define(‘DB_SERVER_PASSWORD’, ‘yourpassword’);
define(‘DB_DATABASE’, ‘yourdatabasename’);
e) Copy the config file to your server

4. Working on the next config file: admin/includes/configure.php

a) Same again, replace the domain urls

define(‘HTTP_SERVER’, ‘http://www.mydomain.com’);
define(‘HTTPS_SERVER’, ‘https://www.mydomain.com’);
define(‘HTTP_CATALOG_SERVER’, ‘http://www.mydomain.com’);
define(‘HTTPS_CATALOG_SERVER’, ‘https://www.mydomain.com’);

b) Find this code:

define(‘DIR_FS_CATALOG’, ‘/home/yourname/public_html/store/’);

and replace with the correct path

c) Find this code:

define(‘DIR_FS_SQL_CACHE’, ‘/home/yourname/public_html/shop/cache’);

and replace with the correct path

d) Replace database connection details as before:

define(‘DB_SERVER’, ‘localhost’);
define(‘DB_SERVER_USERNAME’, ‘yourusername’);
define(‘DB_SERVER_PASSWORD’, ‘yourpassword’);
define(‘DB_DATABASE’, ‘yourdatabasename’);

e) Upload and replace file via FTP to the correct location

5) Last step – update session key.

Super simple, click here and head over to this site for a free quick tool that does it for you. Simple.

Leave a Reply

Your email address will not be published. Required fields are marked *