Php – Prestashop redirects to old domain after changing it in Database


I am trying to create a copy of a prestashop 1.6 e-shop for development purposes from to

The process I followed is

  1. Disable cache and compilation
  2. Copy the files from to
  3. Dump the mysql database from in dump.sql
  4. Open dump.sql on vi and search and replace using :%s/
  5. Import dump.sql in the devdb
  6. Open prestashop cpanel and verify all shop url configuration is changed.
  7. Open phpmyadmin and check that all entries have changed to
  8. Deleted files from /cache/smarty/compile /cache/cachefs
  9. Rebuild .htaccess file from prestashop.
  10. Changed login credentials in the devdb so that the website will load that one

Now the problem is that when I open i still get redirected to and I'm at a loss as to what to try next.

Searching for in phpmyadmin in the devdb doesn't yield results
grep -ri '' * doesn't yield results either in the files

Any suggestions what I can try next?

PS: and are two different domains. Not similar in anyway

Best Solution

For prestashop 1.7 you have to modify some values in the database:

  • ps_configuration table and change PS_SHOP_DOMAIN and PS_SHOP_DOMAIN_SSL to your new domain name, e.g.
  • ps_shop_url table and change again ‘domain’, ‘domain_ssl’ fields to your new domain name and ‘physical_uri’. If you copied files into root folder, the path will be simply ‘/’.

More on

Note: browsers cache redirections, you will have to clean your browser cache. Check to know how to do a "hard refresh" for your browser.

Related Question