First you should know that your X-Cart application consists of two components: X-Cart files and X-Cart database.
* The files and folders of your X-Cart application contain the scripts and core application code.
* The X-Cart database contains all records for your X-Cart website.
Let's assume that you are running your own *LAMP or *WAMP webserver or you have a hosting account with another company. You should know the root directory where your X-Cart installation resides. It is often called httpdocs, public_html or www. Those are the so-called web server root directories. So let's suppose that your X-Cart application is installed under your web server root directory (although you can use any subdirectory of your choice ).
The first thing you have to do when you want to transfer your X-Cart applications to your SiteGround server, is to copy the entire content of your X-Cart root directory straight into the public_html folder of your SiteGround hosting account(or in the subfolder by which you want to access your X-Cart website).
If you are running your own server probably you have already had your X-Cart site files on your hard drive. In case you are hosting your account on a remote machine, simply download your X-Cart site files and directories (please mind that you should keep the directory structure in tact) on your desktop PC by using your favorite FTP client(http://www.siteground.com/tutorials/ftp/ftp_client.htm).
Once the download is finished, you should connect to your SiteGround FTP account, change your current working directory to the public_html one (this is the root/main folder for your website) and drag and drop your X-Cart files and folders from your desktop PC to your public_html folder (or in the subfolder you want to use).
The next step you should follow is to create a full backup of your X-Cart MySQL database. If you are running your own *WAMP or *LAMP server, probably you already have phpMyadmin installed. If you are using a different web host, they should provide you with access to a database manipulation tool. You should ask them for further assistance. Here we assume that you are managing your databases with the phpMyadmin tool as it is the most popular tool for managing MySQL databases.
Once you are logged in to your phpMyadmin tool, backing up (exporting) your database is simple. First choose your database from the left menu. Then click the Export tab. Select all the tables, check Add DROP TABLE andSave as file. Leave all other options untouched. Finally, click Go and the database dump will be downloaded to your PC.
We are done with your X-Cart database backup and you should already have it downloaded on your hard drive. The next step is to import your database dump to your SiteGround hosting account.
To do that, go to your cPanel area and create a brand new database with a name of your choice. Please mind that you can create databases only from your cPanel area (MySQL Databases). You cannot execute CREATE database; MySQL statement from the phpMyadmin tool. Once you've created your new database, please create a new database username and add it to the database you have created during the previous step. For detailed instructions on MySQL database creation you can refer to the video tutorial for creating MySQL database and user in cPanel.
We assume that you have created your MySQL database and the next step is to go into your phpMyadmin interface.
To restore (import) a database in phpMyAdmin, first choose the database you'll be restoring into from the left menu. Then click the Import tab. You have the option of importing an .sql file. Use the “Browse” button to find it on your PC and then click “Go” at the bottom.
The final step is to adjust the core settings which are defined in your main X-Cart config.php file. Go to your File Manager, change the current working directory to public_html(or the subdirectory, containing X-Cart files) and if you have followed the steps mentioned above correctly you should be able to easily locate config.php file in there. Open it for editing. (If you want to know more about this file, check this article.
Below are the main variables you need to adjust so they can fit to your new SiteGround hosting environment:
$sql_host ='localhost'; // Leave it to localhost if you are unsure
$sql_db ='your_database_name'; // Change it to the name of your database
$sql_user ='your_database_user'; // This should be changed to yours
$sql_password ='yourpass'; // Change it to the password for the database user
$xcart_http_host ="www.yourhost.com"; // Host name of the server on which your X-Cart software is to be installed;
$xcart_https_host ="www.yourhost.com"; // Host name of the secure server that will provide access to your X-Cart-based store via the HTTPS protocol;
$xcart_web_dir ="/subdirectory_if_any"; // X-Cart web directory (if any);
Here are few examples:
EXAMPLE 1:
$xcart_http_host ="www.yourhost.com";
$xcart_https_host ="www.securedirectories.com/yourhost.com";
$xcart_web_dir ="/xcart";
will result in the following URLs:
http://www.yourhost.com/xcart
https://www.securedirectories.com/yourhost.com/xcart
EXAMPLE 2:
$xcart_http_host ="www.yourhost.com";
$xcart_https_host ="www.yourhost.com";
$xcart_web_dir ="";
will result in the following URLs:
http://www.yourhost.com/
https://www.yourhost.com/
If you need to make any further changes to the config.php file, we recommend that you check this article.
If you have correctly followed the instructions mentioned above and your domain name properly points to the DNS servers of your SiteGround hosting account, you should be able to see your X-Cart website .
If you have problems transferring your X-Cart yourself, ask your host for assistance. SiteGround provides the bestX-Cart hosting and such requests are handled with ease.
You need help with a shopping cart? hostlantern is specialized in eCommerce hosting and provides expert support for a large number of shopping carts. Check out our shopping cart hosting services!