How to move X-Cart and its database to a new hosting server

  • Make sure that you close your store. Log in to X-Cart Admin, click on Store Maintenance and check the close store.
  • Use phpMyAdmin provided by your hosting server provider. Export all tables of your X-Cart database to a .sql file
  • Go to the new hosting server, create a database and import this .sql file to new server. Some data may cause a corruption during the import.
  • Make sure that no files in your root directory have names similar to those in your X-Cart directory, otherwise they’ll be a overwritten or the files will not be able to be moved.
  • Using an FTP program, or File Manager program such as that available in cPanel, Plesk, and/or other web hosting control program, move all of your files from the xcart folder to the root. Be sure that your .htaccess files are also transferred as sometimes these files are hidden by FTP programs.
  • Using a file editor, open your config.php and find:
$xcart_web_dir = '/xcart';
  • You also need to modify the Database host server, username and password that is existing on the new server.
$sql_host = 'localhost';
$sql_db = 'newdbname';
$sql_user = 'newusername';
$sql_password = 'newpassword';
  • You will also need to modify the file .htaccess file (be sure to substitute example.com with your domain name).
  • Clear your template cache by visiting http://www.example.com/cleanup.php
  • Manually change any hard-coded links throughout your site. While the code from step 6 will ensure that links are