Thursday, June 23, 2016

live server magento site redirecting to localhost.

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. 
Everything seemed to work fine but when I point a browser at the staging site it redirects to the localhost.
So Plz try mention below points.
  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 & cookies
  4. modified the permission of /var/ folder to 777
  5. changed the database name, username and password in local.xml file.
  6. Changing the .htaccess file to include RewriteBase /live server/
The Redirect problem was due to Magento cache. I Simply deleted everything from the /varfolder of my Magento site. After that I cleared my browser's cache/cookies for good measure & it worked!

Still the problem is not solve then try also.

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.

No comments:

Post a Comment

Magento 2 Useful Commands List

Setup Upgrade Using Command Line php bin/magento setup:upgrade Cache Clean Using Command Line php bin/magento cache:clean ...