VâneVâne
VâneVâne

Reputation: 151

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.

Upvotes: 8

Views: 13303

Answers (3)

Kuba Paweł Rawek
Kuba Paweł Rawek

Reputation: 141

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

Upvotes: 9

WebWik
WebWik

Reputation: 3

I think you have to change also the PS_SHOP_URL and PS_SHOP_URL_SSL in the table Configuration

Upvotes: -1

sadlyblue
sadlyblue

Reputation: 2987

You need to change the url's in the table shop_url. Domain and domain_ssl would be localhost (not sure if it needs the :8888) and physical_uri set to /prestashop/

Upvotes: 1

Related Questions