If you need to migrate a PrestaShop website from a local to a remote installation or just change the domain name, you need to follow these steps:
0. For security reasons, make a backup of all files and database
1. Upload all files to new hosting via FTP
2. Import the database using the phpMyAdmin utility or through terminal
3. On database we need to open ps_configuration table and edit the following lines: PS_SHOP_DOMAIN and PS_SHOP_DOMAIN_SSL and we replace the current domain www.olddomain.com, with the new one www.newdomain.com
4. Update ps_shop_url to match the new path and domain
[cc lang=”sql”]UPDATE `ps_shop_url` SET `domain` = “www.newdomain.com”, `domain_ssl` = “www.newdomain.com”, `physical_uri` = “/”;[/cc]
If your PrestaShop is under a subdirectory of the main website you have to set physical_uri to “/shop/” or similar.
5. For last we have to edit the settings.inc.php file inside the config folder and change the values for database name _DB_NAME_, user _DB_USER_ and password: _DB_PASSWD_
6. Copy across your COOKIE hashes as well: _COOKIE_KEY_, _COOKIE_IV_, _RIJNDAEL_KEY_, _RIJNDAEL_IV_ otherwise the user won’t be able to login including the admin user of PrestaShop
In settings.inc.php you have the following fields:
Make sure that all these fields have been copied across to the new installation and the values are exactly the same. The main reason is that COOKIES and PASSWORDS get encoded with those values and if they don’t match the user won’t be able to login.
That’s it, you only need to check .htaccess file permissions (777) and all should work correctly!