{"id":6987,"date":"2017-03-23T08:29:25","date_gmt":"2017-03-23T08:29:25","guid":{"rendered":"https:\/\/jsmwebsolutions.com\/blog\/?p=6987"},"modified":"2017-03-23T08:34:40","modified_gmt":"2017-03-23T08:34:40","slug":"how-to-transfer-magento-to-a-new-host","status":"publish","type":"post","link":"https:\/\/jsmwebsolutions.com\/blog\/how-to-transfer-magento-to-a-new-host\/","title":{"rendered":"How to transfer magento to a new host"},"content":{"rendered":"<ul style=\"border: 0px; margin: 0px 0px 1.5em 3em; outline: 0px; padding: 0px; list-style: disc; color: rgb(58, 58, 58); font-family: &quot;Open Sans&quot;, sans-serif; font-size: 17px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);\">\n<li style=\"border: 0px; margin: 0px; outline: 0px; padding: 0px;\">\n\t\tGo to your Cpanel &gt; File Manager and then select all your magento files and then click compress to create a zip file of the magento files.\n\t<\/li>\n<li style=\"border: 0px; margin: 0px; outline: 0px; padding: 0px;\">\n\t\tDownload the zip file by going to http:\/\/yourdomainname.com\/backup.zip (Replace youdomainname.com with your domain name and backup.zip with the name of your zip file)\n\t<\/li>\n<li style=\"border: 0px; margin: 0px; outline: 0px; padding: 0px;\">\n\t\tThen go to phpmyadmin and on your left click on the database name and then click Export. Select Custom Export Method and choose Output &ldquo;Save output to a file &ldquo; and then choose Compression &ldquo;zipped or gzipped&rdquo; and click Go. This will download the compressed database\/mysql dump file.\n\t<\/li>\n<li style=\"border: 0px; margin: 0px; outline: 0px; padding: 0px;\">\n\t\tOn your new host, upload the zip file using ftp (Filezilla) and then go to&nbsp;Cpanel &gt; File Manager and select the zip file that you uploaded and click extract.\n\t<\/li>\n<li style=\"border: 0px; margin: 0px; outline: 0px; padding: 0px;\">\n\t\tCreate a new database on the new host and add the database user to it.\n\t<\/li>\n<li style=\"border: 0px; margin: 0px; outline: 0px; padding: 0px;\">\n\t\tMagento database makes use of foreign key constraints to ensure database integrity. So if you attempt to import the mysql file that you exported using phpmyadmin you will get errors like\n\t<\/li>\n<\/ul>\n<blockquote style=\"border-width: 0px 0px 0px 5px; border-top-style: initial; border-right-style: initial; border-bottom-style: initial; border-left-style: solid; border-top-color: initial; border-right-color: initial; border-bottom-color: initial; border-left-color: rgba(0, 0, 0, 0.0470588); border-image: initial; margin: 0px 0px 1.5em; outline: 0px; padding: 20px; quotes: &quot;&quot; &quot;&quot;; font-size: 1.2em; font-style: italic; position: relative; color: rgb(58, 58, 58); font-family: &quot;Open Sans&quot;, sans-serif; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);\">\n<div style=\"border: 0px; margin: 0px; outline: 0px; padding: 0px;\">\n\t\tCannot add or update a child row: a foreign key constraint fails\n\t<\/div>\n<\/blockquote>\n<ul style=\"border: 0px; margin: 0px 0px 1.5em 3em; outline: 0px; padding: 0px; list-style: disc; color: rgb(58, 58, 58); font-family: &quot;Open Sans&quot;, sans-serif; font-size: 17px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);\">\n<li style=\"border: 0px; margin: 0px; outline: 0px; padding: 0px;\">\n\t\tSo to import the sql file without constraint checking add the following statements at the beginning of the sql file.\n\t<\/li>\n<\/ul>\n<blockquote style=\"border-width: 0px 0px 0px 5px; border-top-style: initial; border-right-style: initial; border-bottom-style: initial; border-left-style: solid; border-top-color: initial; border-right-color: initial; border-bottom-color: initial; border-left-color: rgba(0, 0, 0, 0.0470588); border-image: initial; margin: 0px 0px 1.5em; outline: 0px; padding: 20px; quotes: &quot;&quot; &quot;&quot;; font-size: 1.2em; font-style: italic; position: relative; color: rgb(58, 58, 58); font-family: &quot;Open Sans&quot;, sans-serif; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);\">\n<pre style=\"border: 0px; margin: 0px 0px 1.5em; outline: 0px; padding: 20px; background: rgba(0, 0, 0, 0.0470588); font-family: inherit; font-size: inherit; line-height: normal; overflow: auto; max-width: 100%;\">\r\nSET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT;\r\nSET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS;\r\nSET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION;\r\nSET NAMES utf8;\r\nSET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;\r\nSET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;\r\nSET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE=&#39;NO_AUTO_VALUE_ON_ZERO&#39;;\r\nSET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0;<\/pre>\n<\/blockquote>\n<ul style=\"border: 0px; margin: 0px 0px 1.5em 3em; outline: 0px; padding: 0px; list-style: disc; color: rgb(58, 58, 58); font-family: &quot;Open Sans&quot;, sans-serif; font-size: 17px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);\">\n<li style=\"border: 0px; margin: 0px; outline: 0px; padding: 0px;\">\n\t\t<span style=\"border: 0px; margin: 0px; outline: 0px; padding: 0px; line-height: 12px;\">At the end of the mysql file add the following statements to enable constraint checking again.<\/span>\n\t<\/li>\n<\/ul>\n<div style=\"border: 0px; margin: 0px; outline: 0px; padding: 0px; color: rgb(58, 58, 58); font-family: &quot;Open Sans&quot;, sans-serif; font-size: 17px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);\">\n<blockquote style=\"border-width: 0px 0px 0px 5px; border-top-style: initial; border-right-style: initial; border-bottom-style: initial; border-left-style: solid; border-top-color: initial; border-right-color: initial; border-bottom-color: initial; border-left-color: rgba(0, 0, 0, 0.0470588); border-image: initial; margin: 0px 0px 1.5em; outline: 0px; padding: 20px; quotes: &quot;&quot; &quot;&quot;; font-size: 1.2em; font-style: italic; position: relative;\">\n<pre style=\"border: 0px; margin: 0px 0px 1.5em; outline: 0px; padding: 20px; background: rgba(0, 0, 0, 0.0470588); font-family: inherit; font-size: inherit; line-height: normal; overflow: auto; max-width: 100%;\">\r\nSET SQL_MODE=@OLD_SQL_MODE;\r\nSET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;\r\nSET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;\r\nSET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT;\r\nSET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS;\r\nSET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION;\r\nSET SQL_NOTES=@OLD_SQL_NOTES;<\/pre>\n<\/blockquote>\n<ul style=\"border: 0px; margin: 0px 0px 1.5em 3em; outline: 0px; padding: 0px; list-style: disc;\">\n<li style=\"border: 0px; margin: 0px; outline: 0px; padding: 0px;\">\n\t\t\t<span style=\"border: 0px; margin: 0px; outline: 0px; padding: 0px; line-height: 12px;\">Now you will be able to import the mysql database without getting any errors.<\/span>\n\t\t<\/li>\n<li style=\"border: 0px; margin: 0px; outline: 0px; padding: 0px;\">\n\t\t\t<span style=\"border: 0px; margin: 0px; outline: 0px; padding: 0px; line-height: 12px;\">Update the database details by going &nbsp;to aap &gt; etc &gt;local.xml &nbsp;and update the database name, host, database user and password.<\/span>\n\t\t<\/li>\n<li style=\"border: 0px; margin: 0px; outline: 0px; padding: 0px;\">\n\t\t\t<span style=\"border: 0px; margin: 0px; outline: 0px; padding: 0px; line-height: 12px;\">Finally change the nameservers of your domain to point your domain to the new host and you are done with transferring magento to a new host.<\/span>\n\t\t<\/li>\n<\/ul>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Go to your Cpanel &gt; File Manager and then select all your magento files and then click compress to create a zip file of the magento files. Download the zip&hellip;<\/p>\n","protected":false},"author":1,"featured_media":6993,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[13],"tags":[285],"class_list":["post-6987","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials-help-fix-bugs","tag-transfer-magento-to-a-new-host"],"rttpg_featured_image_url":{"full":["https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/transfer-magento-to-a-new-host.png",263,192,false],"landscape":["https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/transfer-magento-to-a-new-host.png",263,192,false],"portraits":["https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/transfer-magento-to-a-new-host.png",263,192,false],"thumbnail":["https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/transfer-magento-to-a-new-host-150x150.png",150,150,true],"medium":["https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/transfer-magento-to-a-new-host.png",263,192,false],"large":["https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/transfer-magento-to-a-new-host.png",263,192,false],"1536x1536":["https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/transfer-magento-to-a-new-host.png",263,192,false],"2048x2048":["https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/transfer-magento-to-a-new-host.png",263,192,false]},"rttpg_author":{"display_name":"Aj","author_link":"https:\/\/jsmwebsolutions.com\/blog\/author\/admin\/"},"rttpg_comment":0,"rttpg_category":"<a href=\"https:\/\/jsmwebsolutions.com\/blog\/category\/tutorials-help-fix-bugs\/\" rel=\"category tag\">Tutorials<\/a>","rttpg_excerpt":"Go to your Cpanel &gt; File Manager and then select all your magento files and then click compress to create a zip file of the magento files. Download the zip&hellip;","_links":{"self":[{"href":"https:\/\/jsmwebsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/6987","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jsmwebsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jsmwebsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jsmwebsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jsmwebsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=6987"}],"version-history":[{"count":1,"href":"https:\/\/jsmwebsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/6987\/revisions"}],"predecessor-version":[{"id":6991,"href":"https:\/\/jsmwebsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/6987\/revisions\/6991"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/jsmwebsolutions.com\/blog\/wp-json\/wp\/v2\/media\/6993"}],"wp:attachment":[{"href":"https:\/\/jsmwebsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=6987"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jsmwebsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=6987"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jsmwebsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=6987"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}