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
-
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...)
-
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 -
Create localhost database with the same name
-
Import database copy
from your machine, open the terminal and import it as:
mysql -u dbusername -p dbname < /path/to/file/file.sql -
Copy downloaded files into new location
copy from /Downloads/clon-presta-new-folder/ to /var/www/html/prestashopFolderName
-
Change database_host, database_user and database_password in:
app/config/parameters.phpYou can open first your file from live shop to remember some data if you need
-
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
-
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!
-
Delete .htaccess from the root folder
better just rename it as: _,htaccess
-
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
.png.022b5452a8f28f552bc9430097a16da2.png)