Write Review

How to Migrate a Prestashop Site from Local Host to Live Server

Want to migrate PrestaShop from your web server to local; and inversely? We have got you covered.

Assuming you have an e-commerce hosting account that supports Prestashop, Just follow the given steps and you will be able to do this quite easily.

Moving from Server to Local PC

Firstly you will require PHP, MySQL and Apache configured on your local machine.

Once you have got all this configured, download all the website files from FTP. Put them to the local directory after downloading them.

Then you have got to log in to your phpMyAdmin and look for the option to export your database. Make sure to export it in .sql form and then download it. Then the downloaded file will have to be imported into your local database.

Next, you have got to make some changes to your local database, files, and BackOffice as per the following instructions.

Changes to be Made in Database

1: First you will have to visit the table “PS_SHOP_URL” and change the given columns’ values.

  • domain localhost
  • domain_ssl localhost
  • Also edit physical_uri by writing the name of the directory where PrestaShop is located if it is located in any additional directory.

2: Next, visit the table “PS_CONFIGURATION” where you have got to change the value of two columns: PS_SHOP_DOMAIN and PS_SHOP_DOMAIN_SSL

Changes to be Made in Files

1: In the config/defines.inc.php you will have to set the debug mode on by:

1 define('_PS_MODE_DEV_', true)

2: In the config/settings.inc.php you will have to set your local database parameters.

3: In the PrestaShop main folder, there is a file named “.htaccess”. It will have to edit if your PrestaShop is located in any additional directory.

1 RewriteRule . - [E=REWRITEBASE:

For instance, if your PrestaShop is located in the ‘pshop’ directory, then the code will be:

1 RewriteRule . - [E=REWRITEBASE:/pshop/

Changes to be Made in BackOffice

Navigate to ‘Performance’ under ‘Advanced Parameters’. In smarty settings select ‘Force compilation’. Use the button in the upper right header of the page to disable and clear cache.

Moving from Local PC to Server

Basically, this part is also very similar to the one performed above.

Firstly you have to upload your files to the FTP server.

Then you have got to export your local database. Make sure to export it as a .sql file. Now you will have to import the exported file to your server phpMyAdmin.

Next, you have got to make some changes to your local database, files, and BackOffice as per the following instructions.

Changes to be Made in Database

1: First you will have to visit the table “PS_SHOP_URL” and change the given columns’ values.

  • domain You URL
  • domain_ssl You URL
  • Also, edit physical_uri by writing the name of the directory where PrestaShop is located if it is located in any additional directory.

2: Next, visit the table “PS_CONFIGURATION” where you have got to change the value of two columns: PS_SHOP_DOMAIN and PS_SHOP_DOMAIN_SSL

Changes to be Made in Files

1: In the config/defines.inc.php you will have to set the debug mode on by:

1 define('_PS_MODE_DEV_', false)

2: In the config/settings.inc.php you will have to set your local database parameters.

3: In the PrestaShop main folder, there is a file named “.htaccess”. It will have to edit if your PrestaShop is located in any additional directory.

1 RewriteRule . - [E=REWRITEBASE:

For instance, if your PrestaShop is located in the ‘pshop’ directory, then the code will be:

1 RewriteRule . - [E=REWRITEBASE:/pshop/

Changes to be Made in BackOffice

Navigate to ‘Performance’ under ‘Advanced Parameters’. In smarty, settings select the first option (Never recompile template files) or the second option (Recompile templates if the files have been updated). Use the button in the upper right header of the page to enable and clear cache.

Once all this is done, you should consider regenerating the .htaccess file. Navigate to  ‘SEO & URLs’ under ‘Preferences’. There look for ‘Friendly URL’ and then select the option near it. Then click on save changes.

That’s it.

We hope our article helped you :).

Check out these top 3 Best web hosting services

Was this article helpful?