I migrated my magento project (magento version 1.9.1 ) to live server. But when I try to access the live site, it gets redirected to localhost. I have followed everything I could find regarding this issues like:

  1. changed the secure/insecure base_url values in core_config_data table.
  2. deleted all the contents of /var/ folder
  3. cleared browser cache
  4. modified the permission of /var/ folder to 777
  5. changed the database name, username and password in local.xml file.

Still the problem is not solve.

Futhermore, if I try to access the backend, the login page in the live server is accessible but once I login, I get redirected to the backend of localhost or my local computer. Also, it is a multi-website projects. I have two websites for national and international clients.

What am I missing here?

3 Answers 3


Look in the /tmp/ folder (the one on the root of the server, not the one in your vhosts document root) and see if there is a magento folder. If there is, delete it, your cache is stored here if your webserver didn't have write access to var/cache on first request.

If that doesn't work, try running the query SELECT * FROM core_config_data WHERE value LIKE 'http%'; incase you missed one of the URL settings.

  • I guess the query should be "WHERE value LIKE" instead of "WHERE path LIKE". The values are intact in core_config_data table. Furthermore, I am accessing the live site using FTP and I dont have access to the server root. Is there any way I can manage it? Feb 22, 2015 at 10:59
  • Good shout on the query, I updated it. Hmm, I'm not 100% sure how Magento determines to still write to the /tmp/ dir, have you checked that your webserver can write to the var directory? Feb 22, 2015 at 11:19

Redirects can be cached in the browser. After fixing such an issue, you should always clear your browser cache (or try accessing the live site in private browsing mode)

Another thing that is often oveerlooked: do you have any custom rewrite rules in .htaccess, like redirection from non-www to www domain?


I'm answering rather than commenting as I don't have enough rep to comment yet.

I concur that it will be the cache in the /tmp folder. I think magento must look there first, or combine it with //var/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.