More than 800+ satisfied clients and counting, since 2010

Blog

How to move Magento from one server to another?

Magento developer sometimes need to move the Magento eCommerce shop from one directory location to another directory location or from one host server domain to new host server domain. Migrating Magento to a new server is a simple task once you understand how to do it. Below are the two methods of moving Magento from one server to another. So read through to know how to move Magento from one server to another.

First Method

  1. Back up the files in the test server. Refresh Cache by System > Cache Management by going to your test site admin backend. Then download and save the whole magento shop root directory via File manager or FTP tools.
  2. Export the magento Database. Enter your server control panel database area and EXPORT your magento shop database in to “name.sql.zip “format.
  3. Move magento files to the new server. Upload the root directory of your test magento shop backup taken in the step 1 in to the new server domain folder.
  4. Import the database to the new server. Create a new database, database user and database user password by going to your new host account. Then open the database sql file saved with a text editor and then edit the database name mention in to the new database name and then save it. Then import the “name.sql.zip “database backup in to this new database.
  5. Update the database details file and edit the database details file. To do this find out “app/etc/local.xml” files by going to magento live site folder, and enter the latest database details which is created.
  6. Modify the base URL database table and then replace old server domain name with new domain name.
  7. Refresh cache and Reindex Data. The final step here is to clear the cache. Go to your sites admin panel System > Cache management > Select all & disable cache management. Then go through System>Index Management.

Second Method

One problem with this method is that both magento setups must be the same version

  1. Refresh cache by system > cache management by going to your test site backend. Then take a backup of test site database by exporting database in to “dbname.sql.zip” format.
  2. Then take a backup of below folders on the test site to your system
    1. Contents inside frontend folder
    2. Contents inside frontend folder
    3. Catalogue & other required folders
  3. Install a new magento store in to the new server.
  4. Go to the new server database and delete all the tables.
  5. Unzip the backup database on the first step “dbname.sql.zip” and import “dbname.sql” file to the new database.
  6. Copy below folders to their respective new magento server directory
    1. Contents inside frontend (app) folder to app\design\frontend.
    2. Contents inside frontend (skin) folder to skin\frontend.
    3. Catalogue & other required folders to media\catalogue, xx\
  7. Edit base URL mentioning table on the new magento.
  8. Go to your sites admin panel System > Cache management > Select all & disable cache management. Also index data by going to System—>Index Management. Select fields in Status — ‘REINDEX REQUIRED’, then choose ‘Reindex Data’ from drop down and click Submit.

Written by

The author didnt add any Information to his profile yet