How to move live prestashop site to localhost?
Asked Answered
L

3

8

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.

Limburger answered 8/6, 2018 at 7:28 Comment(0)
W
9

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

Withdrew answered 22/9, 2018 at 11:48 Comment(1)
You should also add to delete / rename presta cashe at var/cacheChuppah
M
1

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/

Matson answered 8/6, 2018 at 7:55 Comment(5)
same, it' redirect to the live serverIdolism
can you access you admin area / backoffice? or does it redirect too? also, you say "In livehost database change tables: ps_shop_url". in livehost or localhost?Matson
I cannot access the back office it redirect too.Idolism
Localhost, it was a mistakeIdolism
Can you post your httpd or nginx configuration? Because, if the admin is also redirected, it's not not likelly to be a prestashop issue.Matson
Y
-1

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

Yourself answered 12/6, 2018 at 9:38 Comment(1)
Unfortunately even after theses changes it is still redirectingIdolism

© 2022 - 2024 — McMap. All rights reserved.