Magento migration - base_url one thing you might forget.

Magento migration - base_url one thing you might forget.

I recently had the need to move a site which I was building using the Magento eCommerce platform. Magento has proven to be useful time and again, and the set of features are second to none as far as I can tell.

I was building the site on a domain which was completely different to the one that it would eventually end up on, the reasons are not important, but had to do with Google Checkout.

Anyway, when the site was complete, I opened up the terminal and copied over the Magento database and files to the correct domain. I thought that I had checked everything. However, when I tried to access the site, I got some unwelcome error messages.

Turns out that Magento keeps track of the secure and insecure 'base_url' in the backend and these no longer matched up, as I was now on a different domain. 

A quick hunt around and I found that I needed to alter the database, two fields to be exact.

The easiest way to modify these two fields is by opening up PHPMyAdmin and hunting for the 'core_config_data' table.

Open that up and look for:

web/unsecure/base_url - alter path - deals with http://

and 

web/secure/base_url - alter path - deals with https://

Make changes so that they now point to the correct domain and not the old one. Save the changes and you should now be able to access the site again. It's a small thing, but it kills the site until you do!

The site is live now, in case you are interested: www.happykiddies.co.uk

Click on the image above to see where the sections that you need to alter are.