0

I moved a magento project (version 1.9.0.1) from one server to another (lets say from magento.domain.com to magentotest.domain.com). I changed the web/unsecure/base_url and web/secure/base_url in the core_config_data table, I also changed the paths in the local.xml

I deleted everything var/cache, var/session and var/tmp and yet when I try to access magentotest.domain.com I am always redirected to the old page (magentotest.domain.com/admin as well)

I tried to track the problem in the magento code and what I found was that in Mage_Core_Store_Model the URL called with $this->getConfig('web/unsecure/base_url') still contains magento.domain.com - and for the life of me I cannot find out why.

Having googled this for three hours now and what I found was a clue that magento sometimes stores its cache files in the SYSTEM tmp folder. When I looked there I found a folder magento/var/cache but it was empty. I deleted it but to no avail.

I don't know what else to do. Did anyone ever encounter this problem?

Chi
  • 1,320
  • 1
  • 14
  • 48
  • 1
    Try using magerun CLI tool (http://magerun.net/) to determine where cache files are stored and delete that cache. What also could help is doing a search on the database in the config tables for you old domain. Please mention your magento version in the question! – RichardBernards Jan 27 '16 at 14:20
  • As a sanity check, make sure there isn't a rewrite in .htaccess redirecting you? – Aric Watson Jan 27 '16 at 20:35
  • @RichardBernards - Thanks for the mention of this highly useful tool -> Here's the command line for finding that misplaced cache directory, if you can install `n98-magerun`, use the command `n98-magerun.phar sys:info` to get a basic system info listing with one item being `Cache Directory` location. – Fiasco Labs Jan 28 '16 at 02:24
  • Encountered and driven totally nuts => http://stackoverflow.com/questions/8940458/cant-change-magento-base-url-stuck-in-cache – Fiasco Labs Jan 28 '16 at 02:25

1 Answers1

0

seems like mine was a special case: for performance reasons, there was an extension named "redis cache" installed and only when I emptied THAT, it finally worked.

Chi
  • 1,320
  • 1
  • 14
  • 48