Changing Installation Directory

Recently I developed a Zen Cart website within a sub-directory called shop the shop.

To launch the new website the contents of the shop directory were moved to the root and configuration changes made.

Changing the operational directory for Zen Cart to the root directory the changes to be made are in the following configuration files:

/includes/configure.php
/admin/includes/configure.php

The details for the references before and after are given below:

Original values

/includes/configure.php

  • define(‘HTTP_SERVER’, ‘http://shop.example.com’);
  • define(‘DIR_WS_HTTPS_CATALOG’, ‘/example.com/shop/’);
  • define(‘DIR_FS_CATALOG’, ‘/home/sites/example.com/public_html/shop/’);
  • define(‘DIR_FS_SQL_CACHE’,
    ‘/home/sites/example.com/public_html/shop/cache’);

/admin/includes/configure.php

  • define(‘HTTP_SERVER’, ‘http://shop.example.com’);
  • define(‘HTTP_CATALOG_SERVER’, ‘http://shop.example.com’);
  • define(‘DIR_WS_HTTPS_ADMIN’, ‘/example.com/shop/admin/’);
  • define(‘DIR_WS_HTTPS_CATALOG’, ‘/example.com/shop/’);
  • define(‘DIR_FS_ADMIN’, ‘/home/sites/example.com/public_html/shop/admin/’);
  • define(‘DIR_FS_CATALOG’, ‘/home/sites/example.com/public_html/shop/’);
  • define(‘DIR_FS_SQL_CACHE’,
    ‘/home/sites/example.com/public_html/shop/cache’);

New values

/includes/configure.php

  • define(‘HTTP_SERVER’, ‘http://www.example.com’);
  • define(‘DIR_WS_HTTPS_CATALOG’, ‘/example.com/’);
  • define(‘DIR_FS_CATALOG’, ‘/home/sites/example.com/public_html/’);
  • define(‘DIR_FS_SQL_CACHE’, ‘/home/sites/example.com/public_html/cache’);

/admin/includes/configure.php.

  • define(‘HTTP_SERVER’, ‘http://shop.example.com’);
  • define(‘HTTP_CATALOG_SERVER’, ‘http://www.example.com’);
  • define(‘DIR_WS_HTTPS_ADMIN’, ‘/example.com/admin/’);
  • define(‘DIR_WS_HTTPS_CATALOG’, ‘/example.com/’);
  • define(‘DIR_FS_ADMIN’, ‘/home/sites/example.com/public_html/admin/’);
  • define(‘DIR_FS_CATALOG’, ‘/home/sites/example.com/public_html/shop/’);
  • define(‘DIR_FS_SQL_CACHE’, ‘/home/sites/example.com/public_html/cache’);Fix
    cache mod

In addition to the above changes it is likely that whilst moving your files
around that the file permission settings have been changed. The configuration file /admin/includes/configure.php needs to have permission chmod value of 644.