Child pages
  • System Administrator Guide

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Moving your shop from your local computer to your online server.
  • Moving your shop from a test sub-domain to the main domain.
  • Moving your shop from a one server to another.
  • Moving your shop from a one domain name to another.

In all of these circumstances, you have to must be careful to properly move both all of your files (including the custom images, your themes, the modules you bought...) and all your data (which is contained in your MySQL database).

Moving PrestaShop

...

to a New Server

Here are the main steps when changing server/domainservers, or copying from the your local hard-drive to the your online server:

  1. Put your shop in maintenance mode, so as to not lose new customers or orders will while moving the data.
    Go to your back-office, and under the "Preference" tab, set the "Enable shop" option to "No".
  2. Move your files
    1. Make a backup of all the files: connect to your FTP server, and copy all the files and folders to your local hard-drive.
    2. Transfer your files to your new host: Connect to the FTP server for your new host, and copy all the files and folders that you just downloaded to your local hard-drive, as is.
  3. Move your data
    1. Make a backup of you database (a "dump"): connect to phpMyAdmin, click on the "Export" tab, select the database of your PrestaShop installation, and click the "Go" button. Save the downloaded file on your hard-drive. If phpMyAdmin times out before it is able to export all your data, contact your host.
    2. Transfer the SQL dump on to the new database: connect to the new server's phpMyAdmin, click on the "Import" tab, click the "Browse..." button and , find the SQL file you just downloaded, and click the "Go" button to upload it. If phpMyAdmin times out before it is able to import all your data, contact your new host.
  4. Setting things right Configuration
    1. On the new server, open the /config/settings.inc.php file and update the settings for the new database server (with your own settings):
      • define('_DB_SERVER_', 'sql.domainname.com');
      • define('_DB_NAME_', 'prestashop');
      • define('_DB_USER_', 'PS-user');
      • define('_DB_PASSWD_', 'djsf15');
      • define('_DB_PREFIX_', 'ps_');
    2. (1.4 only) In that same file, update the Base URI setting ('/' being the server root):
      • define('__PS_BASE_URI__', '/prestashop/');
    3. Log - in to your back-officeBack Office, go to the "Preferences" tab, sub-tab select the "SEO & URLs" sub-tab, and change the domain name for the to your new domain. Do the same for the SSL domain.
      In effect, this will update the "PS_SHOP_DOMAIN" and "PS_SHOP_DOMAIN_SSL" rows in the "ps_configuration" SQL table.
    4. In your back-office, go to the "Tools" tab, "Generators" sub-tab, and regenerate both the .htaccess and robots.txt files.
  5. Connect to your new FTP server and delete the whole content of the following folders (excepts their everything except the index.php files )in the following folders:
    • /tools/smarty/cache
    • /tools/smarty/compile
    • /tools/smarty_v2/cache
    • /tools/smarty_v2/compile
  6. Go to your back-office, and under the "Preference" tab, set the "Enable shop" option to "Yes".

You should be good to go! Check that all the links are functioning, that all your products, images, modules and themes are still there, and try to make create a full new account creation and place an order in order so as to make sure your shop is working as expected.

Moving PrestaShop

...

to a New Domain

Here are the main steps when moving PrestaShop to a new domain within the same server. They These are mostly a simpler version of the above steps – we do not touch the data, which supposedly stays on the same MySQL server.

  1. Put your shop in maintenance mode, so as to not lose new customers or orders will moving the data.
    Go to your back-office, and under the "Preference" tab, set the "Enable shop" option to "No".
  2. Move your files
    1. Make a backup of all the files: connect to your FTP server, and copy all the files and folders to your local hard-drive.
    2. Transfer your files to your new host: Connect to the FTP server for your new host, and copy all the files and folders that you just downloaded to your local hard-drive, as is.
  3. Setting things right Configuration
    1. On the new server, open the /config/settings.inc.php file and update the settings for the new database server (with your own settings rather than the examples here):
      • define('_DB_SERVER_', 'sql.domainname.com');
      • define('_DB_NAME_', 'prestashop');
      • define('_DB_USER_', 'PS-user');
      • define('_DB_PASSWD_', 'djsf15');
      • define('_DB_PREFIX_', 'ps_');
    2. (1.4 only) In that same file, update the Base URI setting ('/' being the server root):
      • define('__PS_BASE_URI__', '/prestashop/');
    3. Log - in to your back-officeBack Office, go to the "Preferences" tab, sub-tab select the "SEO & URLs" sub-tab, and change the domain name for the to your new domain. Do the same for the SSL domain.
      In effect, this will update the "PS_SHOP_DOMAIN" and "PS_SHOP_DOMAIN_SSL" rows in the "ps_configuration" SQL table.
    4. In your back-office, go to the "Tools" tab, "Generators" sub-tab, and regenerate both the .htaccess and robots.txt files.
  4. Connect to your new FTP server and delete the whole content of the following folders (excepts their everything except the index.php files )in the following folders:
    • /tools/smarty/cache
    • /tools/smarty/compile
    • /tools/smarty_v2/cache
    • /tools/smarty_v2/compile
  5. Go to your back-office, and under the "Preference" tab, set the "Enable shop" option to "Yes".

You should be good to go! Check that all the links are functioning, that all your products, images, modules and themes are still there, and try to make create a full new account creation and place an order in order so as to make sure your shop is working as expected.