Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to move live prestashop site to localhost?

i have a problem when transfer PS 1.7 from server domain to my local host

I have followed all the steps of file transfer from the Prestashop documentation.

****I do this step:****

1 - Download all prestashop files from server to my mac and placed it into /mamp/htdocs/prestashop/

2 - Export prestashop database from server, create a database and import the SQL file in phpmyadmin from localhost, then add user to database with all privileges.

3 - Edit the file /app/config/parameters.php:

<?php

define('_DB_SERVER_', 'localhost');

define('_DB_NAME_', 'DBName');

define('_DB_USER_', 'user');

define('_DB_PASSWD_', 'xxxxxxxxx');

define('_PS_VERSION_', '1.7.0.6');

4 - In livehost database change tables: ps_shop_url

shop url table info:

domain=localhost

domain_ssl=localhost

physical_uri=/prestashop/

I also clean the cache and delete all file except index.php in folder:

cache/smarty/compile and /chache/smarty/cache.

I check file rights and made a

chmod -R 777 on /mamp/htdocs/prestashop/

I deleted the .htacess file

When i try co connect in localhost:8888/prestashop/ i am still redirecting to the live server url. Sometime i also get the error 403 Forbidden.

like image 326
VâneVâne Avatar asked Jun 08 '18 07:06

VâneVâne


Video Answer


1 Answers

I've got the same problem - here are the steps that worked for me (live->MAMP):

  1. Download prestashop files from the live server
  2. Export database with default settings
  3. Create localhost database with the same name
  4. Import database copy
  5. Copy downloaded files into new location
  6. Change database_host, database_user and database_password in the app/config/parameters.php file
  7. In ps_configuration table:

    • Change PS_SHOP_DOMAIN to localhost:8888
    • Change PS_SHOP_DOMAIN_SSL to localhost:8888
    • Change PS_SSL_ENABLED to 0
  8. In ps_shop_url:

    • Change domain to localhost:8888
    • Change domain_ssl to localhost:8888
    • Change physical_uri to the PS location (mine is /WWW/presta/)
  9. Delete .htaccess from the root folder

  10. Disable and enable once again Friendly URLs in admin settings

like image 113
Kuba Paweł Rawek Avatar answered Oct 02 '22 13:10

Kuba Paweł Rawek