{"id":4538,"date":"2016-05-02T16:09:05","date_gmt":"2016-05-02T15:09:05","guid":{"rendered":"https:\/\/www.utilewebsites.nl\/knowledgebase\/migrating-moving-magento-2-from-one-server-to-another\/"},"modified":"2016-05-02T16:09:05","modified_gmt":"2016-05-02T15:09:05","slug":"migrating-moving-magento-2-from-one-server-to-another","status":"publish","type":"wz_knowledgebase","link":"https:\/\/www.utilewebsites.nl\/en\/knowledgebase\/migrating-moving-magento-2-from-one-server-to-another\/","title":{"rendered":"Migrating\/moving Magento 2 from one server to another"},"content":{"rendered":"<p>&lt;!--&gt;Sometimes one needs to move a Magento 2.0 webshop to another server. This is a fairly simple task and the steps are explained below.<\/p>\n<p><strong>Export Magento 2 Database<\/strong><\/p>\n<p>First, back up the database from PHPMyAdmin, for example.<\/p>\n<p><strong>Backup and transfer of Magento 2 Files and folders<\/strong><\/p>\n<p>Next, backup the directory where your magento webshop is installed via ftp. Perhaps you can also backup directly from your server and download it as a zip file. Then install\/upload the files to the Magento directory of your new server.<\/p>\n<p><strong>Import Magento 2 Database<\/strong><\/p>\n<p>Meanwhile, using PHPMyAdmin, for example, import the database you previously backed up. To avoid problems always check that the (mysql) database versions are the same<\/p>\n<p><strong>Edit Magento 2 configurations<\/strong><\/p>\n<p>We have finished exchanging files between the two servers. Now is the time to configure your Magento 2 store with your new server. First, edit the app\/etc\/env.php by entering the new database data. Open the env.php file using your server file manager and change the lines below:<\/p>\n<pre>'Db' =&gt;\n\narray (\n\n'Table_prefix' =&gt; \",\n\n'Verbinding' =&gt;\n\narray (\n\n'Default' =&gt;\n\narray (\n\n'Host' =&gt; 'DATABASE_HOST',\n\n'Dbname' =&gt; 'database_name',\n\n'Username' =&gt; 'DATABASE_USERNAME',\n\n'Wachtwoord' =&gt; 'DATABASE_PASSWORD',\n\n'Actieve' =&gt; '1',\n\n)\n\n)\n\n)<\/pre>\n<p>Where:<\/p>\n<p>'host' is the database hostname. The most commonly used host is \"localhost.\"<\/p>\n<p>'dbname' is the name of the database.<\/p>\n<p>'username' is a username.<\/p>\n<p>'password' is the password.<\/p>\n<p>You may have a new domain name for your Magento 2.0 webshop. You need to replace your old server domain name with a new domain name. For this you need to change the value in the database in table <em><br \/>\n  <strong>core_config_data<\/strong><br \/>\n<\/em> at <em><br \/>\n  <strong>web\/unsecure\/base_url<\/strong><br \/>\n<\/em> and <em><br \/>\n  <strong>web\/secure\/base_url<\/strong><br \/>\n<\/em><\/p>\n<p><strong>  Magento 2 Cache in<\/strong><\/p>\n<p>The final step is to clear the Magento 2 cache and perhaps wisely redeploy it. You can do this by deleting everything in <strong>var\/cache<\/strong> located in the magento directory, or you can run the following CLI commands through your terminal:<\/p>\n<pre><span style=\"font-family: Courier New;\">1: $ php bin\/magento cache:flush<\/span>\n<span style=\"font-family: Courier New;\">2: $ php bin\/magento setup:di:compile<\/span>\n<span style=\"font-family: Courier New;\">3: $ php bin\/magento setup:static-content:deploy (en_US nl_NL)<\/span>\n\n<\/pre>\n<p>&nbsp;<\/p>\n<p>That's all you have to do. Your Magento 2 store will now be back online.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&lt;!--&gt;Sometimes one needs to move a Magento 2.0 webshop to another server. This is a fairly simple task and the steps are explained below. Export Magento 2 Database First, back up the database from PHPMyAdmin, for example. Backup and transfer of Magento 2 Files and folders Next, backup the directory where your magento webshop is installed via ftp. Perhaps you can also backup directly from your server and download it as a zip file. Then install\/upload the files to the Magento directory of your new server. Import Magento 2 Database Meanwhile, using PHPMyAdmin, for example, import the database you previously&nbsp;<a href=\"https:\/\/www.utilewebsites.nl\/en\/knowledgebase\/migrating-moving-magento-2-from-one-server-to-another\/\" class=\"read-more\">Continue Reading<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"wzkb_category":[61],"wzkb_tag":[],"class_list":["post-4538","wz_knowledgebase","type-wz_knowledgebase","status-publish","hentry","wzkb_category-magento-2-0-x"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Migrating\/moving Magento 2 from one server to another - Utilewebsites<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.utilewebsites.nl\/en\/knowledgebase\/migrating-moving-magento-2-from-one-server-to-another\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Migrating\/moving Magento 2 from one server to another - Utilewebsites\" \/>\n<meta property=\"og:description\" content=\"&lt;!--&gt;Sometimes one needs to move a Magento 2.0 webshop to another server. This is a fairly simple task and the steps are explained below. Export Magento 2 Database First, back up the database from PHPMyAdmin, for example. Backup and transfer of Magento 2 Files and folders Next, backup the directory where your magento webshop is installed via ftp. Perhaps you can also backup directly from your server and download it as a zip file. Then install\/upload the files to the Magento directory of your new server. Import Magento 2 Database Meanwhile, using PHPMyAdmin, for example, import the database you previously&nbsp;Continue Reading\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.utilewebsites.nl\/en\/knowledgebase\/migrating-moving-magento-2-from-one-server-to-another\/\" \/>\n<meta property=\"og:site_name\" content=\"Utilewebsites\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.utilewebsites.nl\\\/en\\\/knowledgebase\\\/migrating-moving-magento-2-from-one-server-to-another\\\/\",\"url\":\"https:\\\/\\\/www.utilewebsites.nl\\\/en\\\/knowledgebase\\\/migrating-moving-magento-2-from-one-server-to-another\\\/\",\"name\":\"Migrating\\\/moving Magento 2 from one server to another - Utilewebsites\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.utilewebsites.nl\\\/en\\\/#website\"},\"datePublished\":\"2016-05-02T15:09:05+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.utilewebsites.nl\\\/en\\\/knowledgebase\\\/migrating-moving-magento-2-from-one-server-to-another\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.utilewebsites.nl\\\/en\\\/knowledgebase\\\/migrating-moving-magento-2-from-one-server-to-another\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.utilewebsites.nl\\\/en\\\/knowledgebase\\\/migrating-moving-magento-2-from-one-server-to-another\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.utilewebsites.nl\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Knowledge Base\",\"item\":\"https:\\\/\\\/www.utilewebsites.nl\\\/en\\\/knowledgebase\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Migrating\\\/moving Magento 2 from one server to another\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.utilewebsites.nl\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/www.utilewebsites.nl\\\/en\\\/\",\"name\":\"Utilewebsites\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.utilewebsites.nl\\\/en\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.utilewebsites.nl\\\/en\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.utilewebsites.nl\\\/en\\\/#organization\",\"name\":\"Utilewebsites\",\"url\":\"https:\\\/\\\/www.utilewebsites.nl\\\/en\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.utilewebsites.nl\\\/en\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.utilewebsites.nl\\\/wp-content\\\/uploads\\\/2019\\\/08\\\/logo-Utilewebsites-2017.png\",\"contentUrl\":\"https:\\\/\\\/www.utilewebsites.nl\\\/wp-content\\\/uploads\\\/2019\\\/08\\\/logo-Utilewebsites-2017.png\",\"width\":3000,\"height\":593,\"caption\":\"Utilewebsites\"},\"image\":{\"@id\":\"https:\\\/\\\/www.utilewebsites.nl\\\/en\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Migrating\/moving Magento 2 from one server to another - Utilewebsites","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.utilewebsites.nl\/en\/knowledgebase\/migrating-moving-magento-2-from-one-server-to-another\/","og_locale":"en_US","og_type":"article","og_title":"Migrating\/moving Magento 2 from one server to another - Utilewebsites","og_description":"&lt;!--&gt;Sometimes one needs to move a Magento 2.0 webshop to another server. This is a fairly simple task and the steps are explained below. Export Magento 2 Database First, back up the database from PHPMyAdmin, for example. Backup and transfer of Magento 2 Files and folders Next, backup the directory where your magento webshop is installed via ftp. Perhaps you can also backup directly from your server and download it as a zip file. Then install\/upload the files to the Magento directory of your new server. Import Magento 2 Database Meanwhile, using PHPMyAdmin, for example, import the database you previously&nbsp;Continue Reading","og_url":"https:\/\/www.utilewebsites.nl\/en\/knowledgebase\/migrating-moving-magento-2-from-one-server-to-another\/","og_site_name":"Utilewebsites","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.utilewebsites.nl\/en\/knowledgebase\/migrating-moving-magento-2-from-one-server-to-another\/","url":"https:\/\/www.utilewebsites.nl\/en\/knowledgebase\/migrating-moving-magento-2-from-one-server-to-another\/","name":"Migrating\/moving Magento 2 from one server to another - Utilewebsites","isPartOf":{"@id":"https:\/\/www.utilewebsites.nl\/en\/#website"},"datePublished":"2016-05-02T15:09:05+00:00","breadcrumb":{"@id":"https:\/\/www.utilewebsites.nl\/en\/knowledgebase\/migrating-moving-magento-2-from-one-server-to-another\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.utilewebsites.nl\/en\/knowledgebase\/migrating-moving-magento-2-from-one-server-to-another\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.utilewebsites.nl\/en\/knowledgebase\/migrating-moving-magento-2-from-one-server-to-another\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.utilewebsites.nl\/en\/"},{"@type":"ListItem","position":2,"name":"Knowledge Base","item":"https:\/\/www.utilewebsites.nl\/en\/knowledgebase\/"},{"@type":"ListItem","position":3,"name":"Migrating\/moving Magento 2 from one server to another"}]},{"@type":"WebSite","@id":"https:\/\/www.utilewebsites.nl\/en\/#website","url":"https:\/\/www.utilewebsites.nl\/en\/","name":"Utilewebsites","description":"","publisher":{"@id":"https:\/\/www.utilewebsites.nl\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.utilewebsites.nl\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.utilewebsites.nl\/en\/#organization","name":"Utilewebsites","url":"https:\/\/www.utilewebsites.nl\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.utilewebsites.nl\/en\/#\/schema\/logo\/image\/","url":"https:\/\/www.utilewebsites.nl\/wp-content\/uploads\/2019\/08\/logo-Utilewebsites-2017.png","contentUrl":"https:\/\/www.utilewebsites.nl\/wp-content\/uploads\/2019\/08\/logo-Utilewebsites-2017.png","width":3000,"height":593,"caption":"Utilewebsites"},"image":{"@id":"https:\/\/www.utilewebsites.nl\/en\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.utilewebsites.nl\/en\/wp-json\/wp\/v2\/wz_knowledgebase\/4538","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.utilewebsites.nl\/en\/wp-json\/wp\/v2\/wz_knowledgebase"}],"about":[{"href":"https:\/\/www.utilewebsites.nl\/en\/wp-json\/wp\/v2\/types\/wz_knowledgebase"}],"author":[{"embeddable":true,"href":"https:\/\/www.utilewebsites.nl\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.utilewebsites.nl\/en\/wp-json\/wp\/v2\/comments?post=4538"}],"version-history":[{"count":0,"href":"https:\/\/www.utilewebsites.nl\/en\/wp-json\/wp\/v2\/wz_knowledgebase\/4538\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.utilewebsites.nl\/en\/wp-json\/wp\/v2\/media?parent=4538"}],"wp:term":[{"taxonomy":"wzkb_category","embeddable":true,"href":"https:\/\/www.utilewebsites.nl\/en\/wp-json\/wp\/v2\/wzkb_category?post=4538"},{"taxonomy":"wzkb_tag","embeddable":true,"href":"https:\/\/www.utilewebsites.nl\/en\/wp-json\/wp\/v2\/wzkb_tag?post=4538"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}