Prestashop server migration (Attention Items)

 

1/.  whole Prestashop files and database

-- Tar whole folder

-- Backup database from Back Office or  mysqldump command

mysqldump -u sqlusername -p'PASSWORD' databasename > /destination-path/databasename.sql

2/. vi .htaccess  (change the path and url)

3/. Update the tables for URL and Cookie  (refer the below table updates session)

4/. file permission 

find /opt/lampp/htdocs -type d -exec chmod 770 {} \;

find /opt/lampp/htdocs -type f -exec chmod 660 {} \;

5/. 750 folder, daemon:daemon

6/. vhost conf under etc folder if you host more than one website 

7/. enable SSL everyhere in ps_configuration  (refer the below table updates session)

8/. disable check cookie key ip in ps_configuration  (refer the below table updates session)

9/. app/config/parameter.php if DB pw change

10/. turn on SSL in cloudflare (if it is using) 

11/. setup a database backup script in /opt/script/database-backup.sh

12/. regenerate the URL by click "save" in Traffic & SEO (better to do that)

 

optimize the database table (if you have a huge table size)
TRUNCATE TABLE ps_connections;
TRUNCATE TABLE ps_connections_page;
TRUNCATE TABLE ps_connections_source;

UPDATE `ps_shop_url` SET `domain` = 'yourdomain.com' WHERE `ps_shop_url`.`id_shop_url` = 1;
UPDATE `ps_shop_url` SET `domain_ssl` = 'yourdomain.com' WHERE `ps_shop_url`.`id_shop_url` = 1;
UPDATE `ps_shop_url` SET `physical_uri` = '/' WHERE `ps_shop_url`.`id_shop_url` = 1;
UPDATE `ps_configuration` SET `value` = '0' WHERE `ps_configuration`.`name` = 'PS_SSL_ENABLED';
UPDATE `ps_configuration` SET `value` = '0' WHERE `ps_configuration`.`name` = 'PS_SSL_ENABLED_EVERYWHERE';
UPDATE `ps_configuration` SET `value` = '0' WHERE `ps_configuration`.`name` = 'PS_COOKIE_CHECKIP';
UPDATE `ps_configuration` SET `value` = 'yourdomain.com' WHERE `ps_configuration`.`name` = 'PS_SHOP_DOMAIN';
UPDATE `ps_configuration` SET `value` = 'yourdomain.com' WHERE `ps_configuration`.`name` = 'PS_SHOP_DOMAIN_SSL';