Jump to content

How to copy your live website prestashop 1.7.6 from server to Local / Localhost

Recommended Posts

Hi guys, 

I write the steps I followed for clonating my online shop with prestashop 1.7.6 to my local machine (localhost).

What did I use?

-  OS linux mint

- terminal shell command line and phpmyadmin


  1. Download prestashop files from the live server

    You can do this from FTP to any folder in your machine
    I did it  in /Downloads/clon-presta-new-folder/
    (If you try to do it in /var/www/html you could have some permission problems...)
  2. Export database with default settings
    Best way is from phpmyadmin: export

    but if you need via SSH you can do it as follow:
    mysqldump -u dbusername -p dbname > /path/to/file/nameOfFileYouLike.sql


  3. Create localhost database with the same name
  4. Import database copy
    from your machine, open the terminal and import it as:
    mysql -u dbusername -p dbname < /path/to/file/file.sql


  5. Copy downloaded files into new location

    copy from /Downloads/clon-presta-new-folder/ to /var/www/html/prestashopFolderName
  6. Change database_host, database_user and database_password in:

    You can open first your file from live shop to remember some data if you need

  7. In ps_configuration table from phpmyadmin:

    Change PS_SHOP_DOMAIN to localhost
    Change PS_SHOP_DOMAIN_SSL to localhost
    Change PS_SSL_ENABLED to 0
  8. In ps_shop_url:
    Change domain to localhost
    Change domain_ssl to localhost
    Change physical_uri to the PS location (mine is /prestashop/)
    don't forget slash!
  9. Delete .htaccess from the root folder
    better just rename it as: _,htaccess
  10. Disable and enable once again Friendly URLs in admin settings

    Enter to your backoffice (BO) with your URL + adminMANYNUMBERSANDLETTERS (i.e mine: dntlgfmql6vhltxy)

    After you enter, as I say, you have to change to NO and after that save. Do it again to YES and save.
    This is very importat tyo do it.

Hope none have problems.

Happy coding :D


Edited by Calleja (see edit history)
  • Like 1

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More