CMS, E-Commerce, Magento

Magento – Migration from Localhost to Live Server

Migrating from a localhost development version of Magento to a live Production server may be a pain in the ass for starters as we get scared of the too many files and configurations that needs to be changed which is almost an inception.

I’m writing this post to clear the myth and to say that migrating from localhost to live server Magento is as easy as it sounds.

Following are the steps that one should follow to migrate the localhost magento to live server magento.

Step : 1

Login to your PHPMYADMIN of your local server and export the magento database which you need to migrate.

Zip all your localhost files and keep it ready for upload.

Step : 2

Now Upload the zip file to your server and extract the files and make sure the files are placed inside ‘public_html’ folder in your server.

Assuming you’ve created the database through CPanel, now login to your server’s PHPMYADMIN, and import the dump SQL file to the created database.

Step : 3

Go to the ‘public_html’ folder in your server and traverse through the following folder and reach the file “local.xml”


Below is the database configuration for the whole magento installation.

 <initStatements><![CDATA[SET NAMES utf8]]></initStatements>


Make sure you change the values for “<host>”, “<username>”, “<password>” with your own server credentials.

Save the file and don’t go yet., we’ve two more things to do.


Step : 4

Now, go to your live server’s PHPMYADMIN and we’ve to do some changes with the core_config_data values which has the base_url that needs to be changed with the live server url.

Now go to that particular table in your PHPMYADMIN and run the below query

select * from core_config_data where path = 'web/unsecure/base_url';

you’ll see the base url value which is your localhost server url that needs to be changed to your live server domain url like “”

We also have to run the below query to change the secure base_url

select * from core_config_data where path = 'web/secure/base_url';

Edit the value to your https domain url like “”

That’s it., you’ve successfully migrated your Magento website from Localhost to Live Server without any issues.

P.S : Drop me a comment if you’ve any issues or problems in migration.

Photo Credit : Flickr

If you want to read about WordPress – Migration from Localhost to Live Server

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.