Jump to content
Calleja

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

- SSH

  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 -pdbpassword 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:
     
    app/config/parameters.php

    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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

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