Tuesday, February 25, 2014

Moving Magento From One Server To Another Server

If you are a Magento developer sometimes you need to move the Magento eCommerce shop from one host server domain to new host server domain or from one directory location to another directory location. Migrating Magento to a new server is a simple task once you know how to do it. This “move Magento from one server to another” post will outline the steps involved to successfully migrate a Magento website.


  • Back up the files in the test server.But,Before Taking Backup Go to your test site admin backend and refresh Cache by System > Cache Management.
  • Here i'll show you how to take Backup on Test Server.First,If you have Installed Magento using softaculous Installer then Go to Softaculous Page using cpanel as shown below:














  • On Softaculous page,In the Top Right Corner Click on backup & restore  Option.After that, You Just Click on the file to Which backup You want.It will automatically take backup of all files & Folders and myaql database as well.
  • It will automatically create Folder named Softaculous where you can find all the Files as shown In below Screenshot:

  • Export the magento Database. Enter your server control panel phpmyadmin database area and EXPORT your magento shop database in to “name.sql.zip “format.
  • Now,Move magento Backup files to the new server.
    Upload the root directory (all the files) of your test magento shop backup taken on the step 1 in to the new server domain folder.
  • Import the database to the new server.
    Go to your new host account MySql Databases Under Databases Section and create a new database.After That,On that Same page,Create database user and database user password. Then open the database sql file saved on step 2 with a text editor and edit the database name mention in to the new database name as shown in Below Screenshot & save it. Then import the “name.sql.zip “database backup saved on the step 2 in to this new database.

























  • Next step is to edit the database details file. To do this go to magento live site folder, find out “app/etc/local.xml” file and enter the latest Database details which is created on the step 4.Here is the Screenshot of Local.xml. Update Field Values which you created before using mysql Databases Wizard.














  • Next is to replace old server domain name with new domain name. For this go to your new server phpmyadmin magento database and modify core_config_data table as shown below.
    1. web/unsecure/base_url     >   http://www.newdomain.com/
    2. web/secure/base_url         >   http://www.newdomain.com/
  • Refresh cache and Reindex Data.
    The final step is to clear the cache. Go to your sites admin panel (Login with the test site username and password) System > Cache management > Select all & disable cache management. Then navigate through System—>Index Management. Select fields in Status — ‘REINDEX REQUIRED’, then choose ‘Reindex Data’ from drop down and click Submit or delete all the files in “var/session” and “/var/cache” folders of new site.
  • Take a look to your new magento ecommerce store frontend.

No comments: