Posts

PrestaShop

How to move a PrestaShop 1.6 from one domain to another (resolving redirect problems)

There are several descriptions online on how to do this but in one occasion, even though I followed the instructions carefully it kept redirecting me to the old domain name. In my particular case the culprit was that the site used file system cache which was active before the move.

The following procedure fixed my problem. The base of the instructions come from the PrestaShop site with my additions below.

  1. Put the site in Maintenance mode.
  2. Copy all files from the old site (domain) to the new using for example a FTP program.
  3. Dump the old site database to a file and import the database on the new server.
  4. Edit config/settings.inc.php and update the values for _DB_SERVER, _DB_NAME, _DB_USER, _DB_PASSWD and you might need to adjust _PS_DIRECTORY value.
  5. Using phpMyAdmin, go to the table ps_store_url and update the record regarding domain name and physical uri.
  6. Using phpMyAdmin, go to the table ps_configuration and find the records for column name with the records for PS_SHOP_DOMAIN, PS_SHOP_DOMAIN_SSL and __PS_BASE_URI__ and update the values corresponding to the new domain name and base uri.
  7. Using FTP (or other preferred method) clear all content except index.php of the ‘/cache/smarty/compile’ and ‘/cache/smarty/cache’ directories.
  8. Using FTP (or other preferred method) clear all content of the ‘/cache/cachefs’ directory.
  9. Log in to the backend and disable Maintenance mode.