phpmysql.htaccessphpmyadminprestashop-1.6

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 domain.com to dev.domain.com

The process I followed is

  1. Disable cache and compilation
  2. Copy the files from domain.com to dev.domain.com
  3. Dump the mysql database from domain.com in dump.sql
  4. Open dump.sql on vi and search and replace using :%s/domain.com/dev.domain.com/g
  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 domain.com entries have changed to dev.domain.com
  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 dev.domain.com i still get redirected to domain.com and I'm at a loss as to what to try next.

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

Any suggestions what I can try next?

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


Solution

  • First of all it's great that you follow each step in correct manner. Now the problem is:-

    When ever you are running any domain on your browser. Browser create cache and cookie for this. If you change any setting of your domain, it will not reflect till you not clear your browser cache and cookie completely.

    So just remove your browser cache and cookie and try to check is it working or not.

    Note:- Based on your process that you follow, this only problem seems to exist.