CubeCartForums.org Documentation Area

CubeCartForums.org for CubeCart third-party documentation, modifications, skins and services
Permanent Link   Print This Page
Introduction CubeCart v3 CubeCart v4 CubeCart v5 Appendix Search

CubeCart Version 4 Documentation - How to move your store to a different directory or server

Google Translate:

How to move your store to a different directory or server

Sometimes it's necessary to move the location of a CubeCart store. This is fairly easy to do, if you follow a few simple steps.

Important: If using SSL, you will need to change the paths in 'Admin > General Settings' before proceeding with moving any files or changing settings. This will stop the store working as soon as you save the settings, so be sure you know what you are doing.


1. Move/copy/upload the files to the new directory.

2. Find the following file:

/includes/global.inc.php


3. Edit the file, and if your store is in a subdirectory called 'shop' (mydomain.com/shop/), you will have similar content to the code below:
<?php
$glob['adminFile'] = 'admin.php';
$glob['adminFolder'] = 'admin';
$glob['dbdatabase'] = 'my_database_name';
$glob['dbhost'] = 'localhost';
$glob['dbpassword'] = 'my_password';
$glob['dbprefix'] = 'myPrefix_';
$glob['dbusername'] = 'my_username';
$glob['encoder'] = 'ioncube';
$glob['installed'] = '1';
$glob['license_key'] = 'XXXXX-XXXX-X-XXXXXXXXXX-XXXXXXXX';
$glob['rootRel'] = '/shop/';
$glob['storeURL'] = 'http://www.mydomain.com/shop';
?>

To move the store to the root of the site (mydomain.com/), you will need to change the 'rootRel' and 'storeURL' entries as shown below.
$glob['adminFile'] = 'admin.php';
$glob['adminFolder'] = 'admin';
$glob['dbdatabase'] = 'my_database_name';
$glob['dbhost'] = 'localhost';
$glob['dbpassword'] = 'my_password';
$glob['dbprefix'] = 'myPrefix_';
$glob['dbusername'] = 'my_username';
$glob['encoder'] = 'ioncube';
$glob['installed'] = '1';
$glob['license_key'] = 'XXXXX-XXXX-X-XXXXXXXXXX-XXXXXXXX';
$glob['rootRel'] = '/';
$glob['storeURL'] = 'http://www.mydomain.com';
?>

4. Save, and upload to the new location. The same principle applies moving the files to any other directory on the hosting server.

Check permissions: After you have moved the files, ensure the directories listed here have the correct security settings applied. The only exception is the file mentioned in on this page, 'global.inc.php'. This should be CHMOD to 0644.

Moving to a different server: If you are moving the files and database to a different server, then you will need to verify each setting. The easiest way is to create a dummy test installation of CubeCart, and copy the relevant contents of the test install 'global.inc.php' to your main store 'global.inc.php' file.

Remember to disable SSL and SEO module before moving the site.




Comments, Feedback, Suggestions and Documentation Submissions please post in the Documentation Chat Forum.