This article covers the process of moving your CubeCart store from one hosting account to another. It is intentionally vague in places as processes vary widely between different web hosting providers so it may be necessary to consult their support documentation also.
Our staff will do this for you as part of our technical support service. Find out more at https://www.cubecart.com/technical-support
Stage 1 - Get a copy of the existing store files and database
CubeCart effectively has two components. The website files which contain the program code and images etc and the MySQL database which will contain all your inventory such as customers, products and orders.
- Downloading the files
This can be done in one of three ways:- If you login to the admin side of your store and navigate to "Advanced" "Maintenance". Under the "Backup" tab you can make a backup of your store files. Once complete you can download it to your computer from the list of backup items. Once downloaded make an attempt to extract the file to make sure that this worked successfully.
- In your web hosting control panel there may be a file manager which can be used to create an archive of your store files as a zip (or equivalent) file. Once created there should be a method to download the file.
- You can connect to your web hosting account with an FTP client and drag and drop the files to download to your computer. Please check the FTP log to make sure it completes in full with no errors.
- If you login to the admin side of your store and navigate to "Advanced" "Maintenance". Under the "Backup" tab you can make a backup of your store files. Once complete you can download it to your computer from the list of backup items. Once downloaded make an attempt to extract the file to make sure that this worked successfully.
- Downloading the MySQL database
This can be done in a couple of different ways:- If you login to the admin side of your store and navigate to "Advanced" "Maintenance". Under the "Backup" tab you can tale a back up of your database and download it to your computer.
- From your web hosting control panel there may be a link to phpMyAdmin. Once you have located the database there should be a number of ways to export the database and download it to your computer.
- If you login to the admin side of your store and navigate to "Advanced" "Maintenance". Under the "Backup" tab you can tale a back up of your database and download it to your computer.
Stage 2 - Import the store files and database to the new hosting account
Once you have a backup of your files and database these need to be uploaded to the new web hosting account. There are three stages to this process.
- Create a MySQL Database & User
The first step is to create a MySQL database and MySQL user. Please make sure the user is assigned to the database with suitable permissions. Please refer to your web hosting companies support documents as this process can vary between provider.
- Import the old database
From your web hosting account there should be a link to phpMyAdmin. Once phpMyAdmin has loaded navigate to the database that you just created and select the import tool. Select the file on your computer and upload it. The file should upload and all database tables and rows should be created. If your MySQL file is too large to upload you may be able to compress it as a zip file and upload again. If that fails it may be possible to import via SSH command line or with a different tool like BigDump.
- Upload the files
The next stage is to upload the stores files to the new hosting account. If your hosting account has a file manager it may be possible to upload a compressed archive to extract. Alternatively it is possible to upload the file with and FTP client.
- Edit the includes/global.inc.php file
Once the files have been uploaded you need to make sure the files connect to the database. To do this open the includes/global.inc.php file with Notepad or TextEdit (if you use a Mac). Please edit the fields below;
Parameter Description dbdatabase The name of the database dbhost The hostname of the database. This is normally "localhost" but could be an IP address or domain name dbusername The username assigned to the database dbpassword The password of the username above - Amend the .htaccess to have correct paths
Open the .htaccess file which can be found in the stores base folder. The "RewriteBase" path and 404 error page paths need to match your install location.
If for example your store is installed at http://www.example.com/store these should be;
RewriteBase /store/
ErrorDocument 404 /store/index.php
If you store is in the root of the domain at say http://www.example.com these should be;
RewriteBase /
ErrorDocument 404 /index.php
Stage 3 - Testing it worked
Some hosting companies have a temporary or preview domain. You can use this to check the store is working as you expect. Please note that CubeCart automatcally detects paths and preview URLs with a tilda ("~") in the path may cause the store to work incorrectly. You should find that it works with a "normal" URL.
Stage 4 - Switching the DNS
To get your existing domain name to point to your new hosting account the DNS "name servers" will need updating. Instructions will be provided by your web hosting company. This process can take 24 to 48 hours.
Comments
0 comments
Please sign in to leave a comment.