Open Source Network Blog

Moving Magento sites
Tuesday, 16 December 2008 21:56
Ray Bogman

Ray Bogman

Ray Bogman is a former security expert at KPN, is co-founder of Jira ICT, gives Magento and Joomla! consults and trainings. Authors profile

When you're moving a Magento site from one domain to another, you will run into the problem of the old domain still being used. To actually use the new domain, the Magento configuration needs to be changed.

Instead of a configuration XML-file the right place to look for is the database. Within the database table "core_config_data" there are two values pointing to the current domainname: "web/unsecure/host" and "web/secure/host". Both need to be changed.

Either login through a tool like PhpMyAdmin or open up a SQL console, and cut-and-paste the SQL commands below. Replace the word "DOMAIN" with the actual domain you're using.

update core_config_data set value="http://DOMAIN/" where path=’web/unsecure/host’;     
update core_config_data set value="http://DOMAIN/" where path=’web/secure/host’;

Unfortunately Magento is very fond of caching, so we also need to flush the cache. Only after the cache is flushed . For this to work you will need to delete the contents of the Magento-folders "var/cache/" and "var/session/". Hopefully you're a Linux geek as I am, so you login to your favorite UNIX shell and execute the following:

cd /path/to/your/magento/site
rm -r var/cache/* var/session/*

Cross your fingers and refresh the page.

 

Stay In The Loop

Subscribe now and we'll send you our latest News, Tips & Trics and Tutorials by email.
Jira ICT
Open Source Support Desk

Latest Comments

Canonical URLs and Joomla!
... I am working on a pretty huge page for a cli
Using Eclipse as Joomla! IDE
Codelobster isnt bad... I'm a dotnet developer...
Writing your own Joomla! splitmenu
Great job and it's worked! But, how to change the
Comparing VirtueMart and Magento
Magento is way worse of spaghetti code. Do you rea
Is Joomla! safe?
You can nver make any software full proof, the lat

Follow Us On Twitter

Follow me on twitter
Home Blog Administration Moving Magento sites