Migrating Magento to another server

Migrating your Magento website to another server is relatively a simple task once you know how to do it of course. I have detailed the steps on how to do this below so you can use this post as a point of reference ๐Ÿ™‚

  1. From the admin, go to Configuration -> Web -> and change the (Unsecure and Secure) fields to {{base_url}}.
  2. From the admin, go to System -> Tools -> Backups and click on the backup button. This will create a backup of your database.
  3. Make a copy your Magento root.
  4. Move all data over to the new server.
  5. Restore the database on the new host.
  6. If you have a different username, password or database name. You’ll need to update that as well. You can find the file in (‘magento_root/app/etc/local.xml’) and make the required changes.
  7. Navigate to your Magento root, and delete all of the files and folders in, (i.e. /var/www/magento/var) except for the .htaccess file.

Hope this helps someone ๐Ÿ™‚

22 thoughts on “Migrating Magento to another server”

  1. im not sure i dare to change the adress, last time i changed something in web i lost all acess to my store. and has to make new store, took me 3 weeks , make it all work again change language, mails new products etc. so can you verify its secure to do this, and tell me if i have understand right what i have to do ?

    here is my settings before/ after (i havent actual changed anything yet, only on the paper)

    actual settings.


    Rod URL http://dahlsvarehus.com/magento/

    Base link-URL {{unsecure_base_url}}

    Base skin-URL {{unsecure_base_url}}skin/

    Base medie-URL {{unsecure_base_url}}media/

    Base JavaScript-URL {{unsecure_base_url}}js/


    Rod URL http://dahlsvarehus.com/magento/

    Base link-URL {{secure_base_url}}

    Base skin-URL {{secure_base_url}}skin/

    Base medie-URL {{secure_base_url}}media/

    Base JavaScript-URL {{secure_base_url}}js/


    New Settings.


    Rod URL {{base_url}}

    Base link-URL {{base_url}}

    Base skin-URL {{base_url}}

    Base medie-URL {{base_url}}

    Base JavaScript-URL {{base_url}}


    Rod URL {{base_url}}

    Base link-URL {{base_url}}

    Base skin-URL {{base_url}}

    Base medie-URL {{base_url}}

    Base JavaScript-URL {{base_url}}

    and i will first be in a month or two i change server,

    so do i have to change settings back . or do my site works with all set to {{base_url}}

    looks strange that iยจt can work if the urls is changed,

    best regards hucks.

  2. This post is works. I just want to add one thing.

    If you migrate from from localhost or from other domain don’t forget to change it in your sql database. If you don’t the links will point to your old domain.

    To do it, just open your sql dump using any text editor. Find your old domain and replace it with your new domain. e.g (http://localhost/magento/) to (http://yournewdomain.com/).

    Now you can import the sql dump to your new database.

  3. I had issues with Perl when upgrading through Magento Connect when migrating over….are there any steps you’re supposed to take with perl.ini or anything along those lines?

  4. In my case Magento kept re-directing to my old host. I found that I needed to CHMOD 777 everything so that it would pick up on my .htaccess file.

    Also, Magento Connect wouldn’t work unless CHMOD 777 was applied.

  5. thanks, you’ve done a good job for more advanced people, but what about people like me?

    Could you add some more details to your tutorial? like the first point: under unsecure and secure tab there are a lot to change. which one should be changed to “{{base_url}}”?

    Best regards

  6. Hey guys I’m having a real bad headache with magento these days…after I move my magento install to the new server, even after changing the database and doing everything…I can not access my products pages! it gives me the error “There has been an error processing your request” and I have no idea how to fix this! I’m pushing the deadline and still fighting with this issue! can anyone help me for the love of God?

  7. hey guys! I just figured it out! when using fishpigs wordpress plugin for magento you gotta configure it too! In my case, so far, I have disabled this plugin so I can work without a headache and gonna see if I can configure it, but the website is ALL OK!

  8. hey everyone. I tryed to do the steps above, the home page is oppening, even a product slider that i have installed on the old host works and shows me the products but when i try to click anything it dosen’t work. I get the message Not Found

    The requested URL /produse.html was not found on this server.

    Please advice. Thanks.

  9. Somebody can help me?

    I uploaded the my store to the new server. but I cannot access the store.

    What are the steps I should make in the DB?

    how do I import it for the backup?


  10. What permissions to you need to set, I am moving from one linux dist to another linux dist, so the groups are different? It one guide it shows that you need to do the following:

    chmod o+w var var/.htaccess app/etc

    chmod -R o+w media

    but arent their some executables?

  11. I did all the steps, but lost the layout of the front and backend of the the page .

    after i imported the database in my local server, i had the same issue,..

    any ideas?

    with kind regards


Leave a Reply

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