Migrate your TomatoCart Store into a Sub-Domain Safely

Some store owner may want to migrate their store into a sub-domain. In this article, I will teach you how to migrate your store safely.

Let’s assume your store’s current domain is www.example.com and the linked directory on your web server is /var/www/www.example.com/public_html. Now, you wish to put your store under sub.example.com which linking to /var/www/www.example.com/public_html/store.

Step 1. Backup all of the files and folds under /var/www/www.example.com/public_html.

Step 2. Move all of the files and folds under /var/www/www.example.com/public_html to /var/www/www.example.com/public_html/store.

Step 3. Edit the includes/configure.php.

– Find the following code snippet:

  define('HTTP_SERVER', 'http://www.example.com');
  define('HTTPS_SERVER', 'http://www.example.com');

  define('HTTP_COOKIE_DOMAIN', 'www.example.com');
  define('HTTPS_COOKIE_DOMAIN', 'www.example.com');

  define('DIR_FS_CATALOG', '/var/www/www.example.com/public_html/');

  define('DIR_FS_WORK', '/var/www/www.example.com/public_html/includes/work/');

  define('DIR_FS_BACKUP', '/var/www/www.example.com/public_html/' . DIR_FS_ADMIN . 'backups/');

– Replace it with following code snippet:

define('HTTP_SERVER', 'http://sub.example.com');
define('HTTPS_SERVER', 'http://sub.example.com');

define('HTTP_COOKIE_DOMAIN', 'sub.example.com');
define('HTTPS_COOKIE_DOMAIN', 'sub.example.com');

define('DIR_FS_CATALOG', '/var/www/www.example.com/public_html/store/');
define('DIR_FS_WORK', '/var/www/www.example.com/public_html/store/includes/work/');
define('DIR_FS_BACKUP', '/var/www/www.example.com/public_html/store/' . DIR_FS_ADMIN . 'backups/');

As you can see, it is necessary to modify the new domain for the server and cookie domain. Then, you must modify the new path for the TomatoCart system in order to use the sub-domain. You could get the correct path linked to your sub-domain in your web host cpanel.

If you can’t migrate your store by yourself, please contact us via support@tomatocart.com to get professional technical support. We provide free technical support service(not include customization) for the Arvixe users.

Looking for quality web hosting? Look no further than Arvixe Web Hosting!

Tags: , , , , , , , , , , , , , , | Posted under TomatoCart | RSS 2.0

Author Spotlight

Jack Yin

Jack Yin

TomatoCart Developer & Co Founder - Arvixe Web Hosting / TomatoCart Community Liaison

Leave a Reply

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


7 × 3 =

You may use these HTML tags and attributes: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>