Magento Migration From Localhost To Live Server

Magento Migration From Localhost To Live Server

ced-pdf-title-image

Running short of time? Get PDF of the blog in your mail.

sharepost

Now that you have built your magento website on your localhost, it’s time to move it to a live server so that you can gain popularity at the global level.

 

In this article we will guide you to migrate your website from your localhost to live server.

 

Before we start, just make sure that you are working with a domain. If not then you can buy it from any domain provider.

 

So let’s get started

 

Step 1

 

Login to the phpMyAdmin account on your localhost using a localhost software. The localhost software can be XAMPP or WAMP or any other localhost software.

 

Now open the current database and export it by clicking on the Export option displayed on the header.

 

Make sure the format of the files should be SQL or ZIP. (.sql or .zip)

 

Click the Go button.

 

The database will be downloaded to your PC.

 

Refer the screenshot

 

Exporting Database

 

Step 2

 

Now go to your localhost and find Magento folders and compress all the files of this folder into .zip format on your PC.

It will look something like this

 

Refer the screenshot

 

Magento Folder

 

 

Step 3

 

Now login to the phpMyAdmin via control panel of your live server and create a new database by clicking on the New button. Make a note of the database credentials i.e. username and password. Also note down the database name.

 

Refer the screenshot

 

Creating New Database

 

Step 4

 

Now import the database that you exported on your PC in step 1 to the new database that you created in step 3.

 

To import click on the Import button on the header. Next click on the Choose Files button and choose the database that you exported on your PC in step 1.

 

Make sure the format of the file should be .sql (Ex: MagentoDB.sql)

 

And finally click on the Go button.

 

Your database will be imported in few minutes.

 

Refer the screenshot

Importing Database

 

Step 5

 

Now upload the magento zip files that you created in step 2 to the directory of your new domain. Once your upload is done, extract the files there.

 

Step 6

 

Once your magento zip file is uploaded and extracted, you need to make some changes in the local.xml file.

 

Go to the location app/etc/local.xml and select the local.xml file. You need to change the old information corresponding to your database. The information will be username, password and database name. The credentials will be the one you noted down in step 3.

 

Refer the screenshot

Credentials

Make sure you save the changes once it is done.

 

 

Step 7

 

Now go to your Magento database and search for table  core_config_data. Replace the localhost URL with your domain name in ‘web/unsecure/base_url’ and ‘web/unsecure/base_url’

 

Refer the screenshot

 

Core Config Data

 

 

Step 8

 

Now you need to clear the cache which contains the data related to your localhost. You need to perform this activity so that the cache can have new data related to your new Magento Website.

To clear the cache you just need to go to /var/cache and select all the data and delete it by right clicking on the mouse and selecting the delete option or you can delete it by clicking the red colour cross button with the hover tip Delete.

 

Refer the screenshot

 

Clear The Cache

 

 

Step 9

 

Your Magento website will be migrated from your localhost to the domain once all the above steps are followed. Open any browser and enter your domain name and press Enter. You can see your website which will look exactly similar to the website that was hosted on Localhost.

 

Bottomline

 

That’s all. This article will help you migrate any magento website from your localhost to production server. Keep in mind that you need to maintain a backup of every file i.e. database files and magento files. Follow the steps and your job is done. But still if you face some issue you can come back to us with your questions. Feel free to share your feedback, also you can post your comments in the comments section.

Hope this article helps.

 

Read More Blogs On Magento:

About The Author

0
Leave a Reply