Difference between revisions of "LiteCommerce:How to move LC to a new server?"

From X-Cart 4 Classic
Jump to: navigation, search
(Created page with 'Before transferring LiteCommerce files please make sure you set binary FTP transfer mode in your FTP client. Some of the transferred files may be damaged if transferred in the AS…')
 
Line 1: Line 1:
Before transferring LiteCommerce files please make sure you set binary FTP transfer mode in your FTP client. Some of the transferred files may be damaged if transferred in the ASCII mode.
+
Before transferring LiteCommerce files please make sure that you set the Binary files transfer mode in your FTP client. Some of the transferred files may be damaged if transferred in the ASCII mode.
  
 
In order to move your LiteCommerce installation to new server you should perform the following steps:
 
In order to move your LiteCommerce installation to new server you should perform the following steps:
  
1. Check if your images are stored in the "filesystem". If so, you should move them to the "database". You can do it under the "Image files" section of the admin interface.
+
1. Check if your images are stored on the "filesystem". If so, you should move them to the "database". You can do it under the "Image files" section of the admin interface.
  
 
2. Make backup of the database. You can do it using either the "DB Backup/Restore" LiteCommerce feature (see the corresponding section in the admin back-end) or a MySQL terminal utility (like 'mysqldump' or 'phpMyAdmin').
 
2. Make backup of the database. You can do it using either the "DB Backup/Restore" LiteCommerce feature (see the corresponding section in the admin back-end) or a MySQL terminal utility (like 'mysqldump' or 'phpMyAdmin').
Line 30: Line 30:
 
NOTE: If the URL to your store is NOT changed, you should NOT edit these lines.
 
NOTE: If the URL to your store is NOT changed, you should NOT edit these lines.
  
7. Change the current directory to the root LiteCommerce folder and adjust file permissions:
+
7. Change the current directory to the root LiteCommerce folder and adjust file permissions. Please refer to [[LiteCommerce:Which are the correct permissions?|this article]] for the details.
  
 +
8. Upload the database backup file into the MySQL database on the new host. You can do it using either the "DB Backup/Restore" LiteCommerce feature or a MySQL terminal utility. If you have SSH access to your host, you can upload the database using the command line interface:
 
<pre>
 
<pre>
chmod 755 .
+
mysql -u mysql_user_name -p mysql_user_password -h mysql_host_name database_name < backup_file_name.sql
chmod 644 etc/config.php
 
chmod -R 777 classes/modules
 
chmod -R 777 var skins
 
chmod 777 LICENSE
 
 
</pre>
 
</pre>
 
If you are using Windows, just make sure that web server has write permissions on 'var' and 'skins' directories)
 
 
8. Upload the database backup file into the MySQL-database on the new host. You can do it using either the "DB Backup/Restore" LiteCommerce feature or a MySQL terminal utility. If you have SSH access to your host, you can upload the database using the command line interface:
 
 
mysql -u mysql_user_name -p mysql_user_password -h mysql_host_name database_name < backup_file_name.sql
 
 
 
where "mysql_user_name" is the mysql database user name, "mysql_host_name" - the mysql host name (typically 'localhost'), "mysql_user_password" - the password to your mysql database, and "database_name" is the database name itself. "backup_file_name.sql" is the name of your database backup file.
 
where "mysql_user_name" is the mysql database user name, "mysql_host_name" - the mysql host name (typically 'localhost'), "mysql_user_password" - the password to your mysql database, and "database_name" is the database name itself. "backup_file_name.sql" is the name of your database backup file.
  
Line 57: Line 47:
  
 
<div class="note">
 
<div class="note">
'''Note''': After you change the URL of your store you should update your license. Follow the instructions from the related question [[#How to install LICENSE?]]
+
'''Note''': After you change the URL of your store you should update your license. Follow the instructions from the related questions [[LiteCommerce:How to install LICENSE?|How to install LICENSE?]] and [[LiteCommerce:How to change the license URL?|How to change the license URL?]]
 
</div>
 
</div>
  
 
[[Category:Installation and configuration]]
 
[[Category:Installation and configuration]]

Revision as of 23:44, 24 December 2009

Before transferring LiteCommerce files please make sure that you set the Binary files transfer mode in your FTP client. Some of the transferred files may be damaged if transferred in the ASCII mode.

In order to move your LiteCommerce installation to new server you should perform the following steps:

1. Check if your images are stored on the "filesystem". If so, you should move them to the "database". You can do it under the "Image files" section of the admin interface.

2. Make backup of the database. You can do it using either the "DB Backup/Restore" LiteCommerce feature (see the corresponding section in the admin back-end) or a MySQL terminal utility (like 'mysqldump' or 'phpMyAdmin').

3. Backup the whole LiteCommerce directory.

4. Upload the whole LiteCommerce directory into the web-directory on the new server.

5. Modify file "/etc/config.php". Check the sections:

[database_details]
hostspec = "your_mysql_host"
database = "your_mysql_database"
username = "your_mysql_username"
password = "your_mysql_password"

[host_details]
http_host = "www.yourhost.com"
https_host = "www.yourhost.com"
web_dir = "litecommerce_root_dir/"

You will find some additional explanations in the 'config.php' file above these sections.

NOTE: If the URL to your store is NOT changed, you should NOT edit these lines.

7. Change the current directory to the root LiteCommerce folder and adjust file permissions. Please refer to this article for the details.

8. Upload the database backup file into the MySQL database on the new host. You can do it using either the "DB Backup/Restore" LiteCommerce feature or a MySQL terminal utility. If you have SSH access to your host, you can upload the database using the command line interface:

mysql -u mysql_user_name -p mysql_user_password -h mysql_host_name database_name < backup_file_name.sql

where "mysql_user_name" is the mysql database user name, "mysql_host_name" - the mysql host name (typically 'localhost'), "mysql_user_password" - the password to your mysql database, and "database_name" is the database name itself. "backup_file_name.sql" is the name of your database backup file.

If you don't have any terminal access (SSH, telnet or others), check the control panel at your hosting - it may contain PHP mysql admin or other mysql tools.

9. Test the newly installed LiteCommerce.

10. Move images from the "database" to the "filesystem" if necessary.

If you find it difficult to move the cart yourself, feel free to contact our support team. The engineers will professionally transfer your store to new host. Please open a support ticket in 'Communication center' to get a quote

Note: After you change the URL of your store you should update your license. Follow the instructions from the related questions How to install LICENSE? and How to change the license URL?