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

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

Hostinger
£2.28 /mo
Starting price
Visit Hostinger
Rating based on expert review
  • User Friendly
    4.7
  • Support
    4.7
  • Features
    4.8
  • Reliability
    4.8
  • Pricing
    4.7
IONOS
£0.76 /mo
Starting price
Visit IONOS
Rating based on expert review
  • User Friendly
    4.5
  • Support
    4.0
  • Features
    4.5
  • Reliability
    4.5
  • Pricing
    4.3
Ultahost
£1.90 /mo
Starting price
Visit Ultahost
Rating based on expert review
  • User Friendly
    4.3
  • Support
    4.8
  • Features
    4.5
  • Reliability
    4.0
  • Pricing
    4.8

How To Recover a Forgotten or Lost Root Password on a Linux Server

In this tutorial, we will reset the root password of a Linux web server by booti
less than a minute
Eliran Ouzan
Eliran Ouzan
Web Designer & Hosting Expert

How to Install PostgreSQL on an Ubuntu VPS Running Nginx

Brief description Having a remote database system with a client library, one ma
less than a minute
Max Ostryzhko
Max Ostryzhko
Senior Web Developer, HostAdvice CTO

How to Configure Nginx and Apache on the same Ubuntu VPS or Dedicated Server

Nginx and Apache are great and powerful web servers. However, they both have dra
less than a minute
Idan Cohen
Idan Cohen
Marketing Expert

How to Harden the Apache web server on a CentOS 7 VPS or Dedicated Server

In this how-to article, we illustrate how to harden an Apache web server, runnin
less than a minute
Eliran Ouzan
Eliran Ouzan
Web Designer & Hosting Expert
HostAdvice.com provides professional web hosting reviews fully independent of any other entity. Our reviews are unbiased, honest, and apply the same evaluation standards to all those reviewed. While monetary compensation is received from a few of the companies listed on this site, compensation of services and products have no influence on the direction or conclusions of our reviews. Nor does the compensation influence our rankings for certain host companies. This compensation covers account purchasing costs, testing costs and royalties paid to reviewers.
Click to go to the top of the page
Go To Top