Wondering how we can help? Call us! 1.604.477.7049 / M-F 8am-4pm PST
X-Cart Mods, X-Cart Addons - WebsiteCM
Did you know...
We offer a Community Forum to learn, build, and share with other users of x-cart software?
X-Cart Excellence eZine
Subscribe for proven tips and special discounts!
Cart is empty
X-Cart Services
X-Cart Customization X-Cart Optimization X-Cart Upgrades Non X-Cart Services
X-Cart Mods
Recommended Packages Volume Discount Reseller Program Must Have Mods
Filter Mods By Version
Mods By Purpose
X-Cart Administration X-Cart Packages X-Cart Appearance X-Cart Conversion X-Cart Customers X-Cart Integration X-Cart Marketing X-Cart Navigation X-Cart Search X-Cart SEO X-Cart Shopping Feeds X-Cart Upselling X-Cart Templates
Mods By Firm
WebsiteCM BCSE Cart-Lab Firetank

Moving X-Cart Database

Moving X-Cart Database
Category: X-Cart Tutorials
Posted: Feb 2, 2010
Comments: 0 [Post]
Synopsis: This tutorial will take you step by step how to transfer your x-cart database from it's current server to a new server.

This tutorial will take you step by step how to transfer your x-cart database from it's current server to a new server.

Legend:
SERVER1 - The server that your x-cart is currently on.
SERVER2 - The server that x-cart is being moved to.


Step 1 - Back Up The Current Database

  1. Telnet/SSH into SERVER1.

    Type:
    mysqldump --opt -Q -uUSERNAME -p DATABASENAME > /PATH/TO/DUMP.SQL

    In this line, you should change the following:
    USERNAME – this is the username you use to access MySQL. It is specified in your config.php file.
    DATABASENAME – the name of the database which your X-Cart is installed into. It is specified in your config.php file.
    /PATH/TO/DUMP.SQL – this is the path to the file that will be output to.

  2. Once you press enter, you will be prompted for the password you use to access MySQL. This is also specified in your config.php file.

  3. Once it has returned to the prompt, verify that DUMP.SQL exists in the directory you specified. If you did not specify a full directory, the file will be in the directory you are currently in.


Step 2 - Transfer To The New Server
  1. While still telnet/SSH'd into SERVER1.

    Type:
    ftp SERVER2
    Replace SERVER2 with the host name (www.example.com) or IP address of the new server.

    You should be prompted for a username and password. This is the username and password that you use to login via FTP to your new server.
  2. Type:
    bin
    cd /PATH/TO/NEW/DIRECTORY
    put /PATH/TO/DUMP.SQL

    Here you should change the following:
    /PATH/TO/NEW/DIRECTORY – this is the path to the directory in which you want to place the database backup. If you are unsure what to specify here, you can usually omit the entire cd /PATH/TO/NEWDIRECTORY/ command.
    /PATH/TO/DUMP.SQL – this is the same path that you specified in step 1.

    Once these commands have finished, type:
    close
    quit

Step 3 - Restore On The New Server
  1. If necessary, create the database which your X-Cart will be installed in. Refer to your host for specific information on how this is done. (Can usually be done through a control panel such as Plesk or CPanel).
  2. Telnet/SSH into SERVER2.

    Type:
    mysql -uUSERNAME -p NEWDBNAME < /PATH/TO/NEW/DUMP.SQL

    In this line, you should change the following:
    USERNAME – this is the new username which you will use to access MySQL. If you do not know this value, you should contact your host.
    NEWDBNAME – the name of the new database that you created in the first part of this step.
    /PATH/TO/NEW/DUMP.SQL – this is the path to the backup file that you transferred to this server in step 2.


Step 4 - Edit your X-Cart config.php
  1. If your mysql host, username, or password has changed on your new server, will need to open the config.php of SERVER2 and change the values of the database information.

Related Items

There are no matching available products to list at this time.

Comments on Moving X-Cart Database

Be the first to comment on this entry!

Share comments

Your Name: *
Comments: *
Please Note: HTML Markup will be automatically removed.
The ability to post urls has been disabled by the site administrator.
*

Type the characters you see in the picture. (If you do not see any picture here, please enable images in your web browser options and refresh this page):

Get a different code
Live Help

Site Map