Magento Expert Forum - Improve your Magento experience

Results 1 to 7 of 7

How to move magento to new Hosting & domain?

  1. #1
    Junior Member jaredovi's Avatar
    Join Date
    Mar 2013
    Posts
    68
    Thanks
    2
    Thanked 14 Times in 11 Posts

    Default How to move magento to new Hosting & domain?

    This tutorial provides detailed information on how to move a Magento store from one host to another (or to a different hosting account).MySQL database backup

    On SiteGround servers you have phpMyAdmin included by default in cPanel for your account. In other cases you will have to use the same tool or a similar one that is capable of exporting your MySQL database. Detailed information on how to perform a MySQL backup can be found in our MySQL Tutorial.

    Alternatively, if you don’t have phpMyAdmin installed but you have shell access you can use the mysqldump tool. The syntax is as follows:

    mysqldump -h HOST -u USER -p DATABASENAME > FILENAME.sql

    where:
    HOST is the database server hostname or it can be omitted if you are running the MySQL server locallyUSER - a user with full privileges to the Magento databaseDATABASENAME - is the full name of the database which Magento is runningFILENAME - can be anything you find suitable for the backup fileAlso, if you have Plesk, DirectAdmin or any other web hosting management tool, you can look at the available options. Many panels allow you to dump the database with just a few clicks. For example cPanel does have an option for this.
    Transfer Files


    You will need to download all files from your current store and upload them to the new location. This can be a time consuming task considering that a standard Magento installation consists of many files. A good alternative is to archive the files prior to downloading/uploading them if possible.

    If you have SSH access you can log on your server -> magento installation directory and archive all the files using the following command:

    tar -czif ARCHIVENAME.tar.gz

    This will create a tarball archive of all the files in the directory.
    You can then download the archive and easily upload it to the new location. To extract it at the new location use the following command in the desired destination folder for the Magento installation:

    tar -xzif ARCHIVENAME.tar.gz

    Adjust Configuration


    After the files are restored you should alter the configuration file in order to match the new settings. All you need to change here is the database details at the new location. Those are stored in the app/etc/local.xml file. The lines you need to alter are:

    < ![CDATA[HOSTNAME]] >
    < ![CDATA[USER]] >
    < ![CDATA[PASSWORD]] >
    < ![CDATA[DATABASENAME]] >

    where:


    HOSTNAME should be the database hostname, most commonly - localhost

    USER is a user that has full privileges to the database

    PASSWORD is the password for the database user

    DATABASENAME is the complete database name for the database you are going to use with the transferred Magento

    Restore Database


    Once you have adjusted the options above you should restore the database at the new location.

    A good practice is to add several options in the MySQL backup file prior to uploading it. The following should be added at the beginning of the SQL file:


    SET SQL_MODE=”NO_AUTO_VALUE_ON_ZERO”;
    SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT;
    SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS ;
    SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION;
    SET NAMES utf8;
    SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
    SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
    SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE=’NO_AUTO_VALUE_ON_ZERO’;
    SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0;


    The next option should be added at the end of the file after all other queries:


    SET SQL_MODE=@OLD_SQL_MODE;
    SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
    SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;
    SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT;
    SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS;
    SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION;
    SET SQL_NOTES=@OLD_SQL_NOTES;


    You can now import the database using phpMyadmin -> Import or another MySQL tool depending on what kind of access you have to the website.

    In case you would like to restore the database via a shell command you can use the following:


    mysql -h HOST -u USER -p DATABASENAME < FILENAME.sql


    and enter the password for the database user when asked.

    Note that if the Magento online store is supposed to work with a different domain name at the new location you should alter the entries for it in the MySQL database.

    The table you should edit is core_config_data and the values you need to change are in the path column. Change theweb/unsecure/base_url and web/secure/base_url to match the new domain name by altering the value column for both records.



    The last step is to clear the Magento cache. You can do this either via the Magento admin panel > System > Cache management or by deleting the contents of the var/cache and var/session folders inside your Magento installation directory.

    That is all. Your Magento should now be properly functioning at the new location.

    View more threads in the same category:


  2. #2
    New member
    Join Date
    Apr 2018
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    There is an internet hierarchy which is called as Domain Name System or DNS, which consists of many domains in a hierarchical order. This system begins with root level domain which is followed by top level domains and then second level domains and the last domain in this hierarchy is the subdomain. A subdomain is a part of a larger domain. In the whole Domain Name System hierarchy, the root domain is the only domain which is not the subdomain because, it is on the top and the hierarchy begins from this domain. Subdomain is an important term under the Domain Name System or DNS.

  3. #3
    Junior Member aishwaryaV's Avatar
    Join Date
    Sep 2018
    Location
    Noida, India
    Posts
    31
    Thanks
    0
    Thanked 1 Time in 1 Post

    Lightbulb

    You will never go wrong with these basic updations, if you will follow it step by step. Moving a Magento site to another server doesnt requires much efforts but 100% precision. Follow the given steps:

    1.- Checkout for the Minimal Magento Requirements
    2.- Be on A Safer Side – Take Store’s Backup and Copy
    3.- Install the Recovery Files to a new server
    4.- Testing Your Newly Moved Store Is Necessary
    5.- Synchronize The Data
    6.- Final Step – Turn On The New Server


    You can follow this complete article here >> https://www.brainsins.com/en/blog/6-...ew-server/4141

    I found this article relevant to your query. Hope it helps. Thanks.

  4. #4
    Senior Member
    Join Date
    Aug 2018
    Posts
    107
    Thanks
    1
    Thanked 4 Times in 4 Posts

    Default

    Log into the phpMyAdmin through the hosting Control Panel of your first site www.template-test.com/magento, open the current database and export it. Save it as a .zip/.sql file on your computer. Move all your site files to a separate folder on your computer.

  5. #5
    New member
    Join Date
    Jan 2018
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Once all these steps are done and confirmed, sign or register with your new hosting provider. If the sever has 'phpmyadmin' then you can give it a miss in the command line. Now navigate to 'phpmyadmin', choose your Magento database and click the 'export' tab. Select appropriate file format and click on go.

  6. #6
    Junior Member
    Join Date
    Sep 2018
    Location
    United Kingdom
    Posts
    228
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Default

    When every one of these means are done and affirmed, sign or enlist with your new facilitating supplier. In the event that the separate has 'phpmyadmin' you can give it a miss in the direction line. Presently explore to 'phpmyadmin', pick your Magento database and tap the 'trade' tab. Select fitting document to organization and than tap to go.

  7. #7
    Junior Member
    Join Date
    Sep 2017
    Posts
    47
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Default

    Thanks for sharing the informative post.

Similar Threads

  1. Email and Domain blacklist of Magento Expert Forum
    By david in forum News, Announcements and Rules
    Replies: 8
    Last Post: 16-07-2020, 06:04 AM
  2. Understanding Domain Level Metrics – Domain Rank
    By golddev in forum Magento SEO technique
    Replies: 3
    Last Post: 21-10-2019, 11:54 AM
  3. Move Magento Cache to RAM by tmpfs
    By david in forum Magento Speed up, Performance and Optimize
    Replies: 4
    Last Post: 13-06-2016, 12:19 PM
  4. How to configure Magento to work with a new domain
    By david in forum Programming & Development
    Replies: 0
    Last Post: 19-03-2013, 04:25 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •