Thursday, April 4, 2013

Magento site redirected to localhost from live server

After developed magento website in localhost, files will be moved to live server environment. The following needs to be changed in your live server. Other wise your live server URL will redirected to localhost path.


Step 1: Edit old URL values in database 
Table: core_config_data
Columns: web/unsecure/base_url, web/secure/base_url
In this table you need to edit the field named value to your live environment url!

Old Values:
web/unsecure/base_url - http://localhost/magentotest
web/secure/base_url  - https://localhost/magentotest

New Values:

web/unsecure/base_url - http://magentolive.com
web/secure/base_url  - https://magentolive.com




Step 2: Clear the cache folder 
Magento retains all configuration cache in /var/cache folder
You should clear the entire contents in this cache folder. Magento will regenerates all these files when needed.