{"id":165,"date":"2013-11-09T10:58:20","date_gmt":"2013-11-09T10:58:20","guid":{"rendered":"http:\/\/finaldie.com\/blog\/?p=165"},"modified":"2013-11-09T10:58:20","modified_gmt":"2013-11-09T10:58:20","slug":"migration-wordpress-from-5-2-1-to-5-7-1","status":"publish","type":"post","link":"https:\/\/finaldie.com\/blog\/migration-wordpress-from-5-2-1-to-5-7-1\/","title":{"rendered":"Migration WordPress from 5.2.1 to 5.7.1"},"content":{"rendered":"<p>Ok guys, I just made a mistake and broken my blog few days ago, but finally, as it get back to normal, so let me show you what&#8217;s happening.<\/p>\n<p>It is beginning from a mad idea, I upgraded my vps OS to ubuntu 12.04, after that, I found that the php-fpm process has broken(due to the php has upgraded too), and this is just a little bit problem, but I also downloaded the latest version of wordpress, so the\u00a0disaster has coming to me.<\/p>\n<p>During the upgrading to the latest wordpress, I just follow the instructions from its official website, maybe I did a wrong way, I deleted the wp-admin folder, so when I re-try to access my blog from browser, it shown me nothing, yes, there is nothing I can see. I checked the access log, it&#8217;s 500 error in there, but I don&#8217;t know what&#8217;s the exactly error happened.<\/p>\n<p>God help me, I have not too much time to figure it out what&#8217;s the root reason, I only guess the old version of wordpress is not compatible with the latest. After a while, I install the latest wordpress and play with it. it&#8217;s more beautiful that the old one, so I decide to use this one.<\/p>\n<p>Ok, the next thing I need to do is migration the old data to the new one, at first I dump all the old wordpress mysql db, and restore to the new one, unfortunately, it failed, after restoring, I cannot see anything from browser. I guess the wp-metadata table is not suitable for the new one or some other reasons I don&#8217;t care. And when I check the wp-posts table, I didn&#8217;t saw there is any special field depend on other tables, it is only contain the pure data, so I only dumped this table&#8217;s data and restored it to the new one, that&#8217;s great, it works, aha, so excited for that. The exact command as follow:<br \/>\n1. dump the wp-posts table from old wordpress<\/p>\n<pre>mysqldump --add-drop-table -u mysqlusername -p old_databasename wp-posts &gt; old_posts.sql<\/pre>\n<p>2. restore the wp-posts table to the new wordpress<\/p>\n<pre>mysql -u mysqlusername\r\n -p new_databasename &lt; old_posts.sql<\/pre>\n<p>Finally, as you saw, all the things come back except the comments, if you also care about the comments, you should dump the wp-comments table as well.<\/p>\n<p>Have a fun :D<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ok guys, I just made a mistake and broken my blog few days ago, but finally, as it get back to normal, so let me show you what&#8217;s happening. It is beginning from a mad idea, I upgraded my vps OS to ubuntu 12.04, after that, I found that the php-fpm process has broken(due to &#8230; <a title=\"Migration WordPress from 5.2.1 to 5.7.1\" class=\"read-more\" href=\"https:\/\/finaldie.com\/blog\/migration-wordpress-from-5-2-1-to-5-7-1\/\" aria-label=\"More on Migration WordPress from 5.2.1 to 5.7.1\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Migration Wordpress from 5.2.1 to 5.7.1 - Final Blog<\/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:\/\/finaldie.com\/blog\/migration-wordpress-from-5-2-1-to-5-7-1\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Migration Wordpress from 5.2.1 to 5.7.1 - Final Blog\" \/>\n<meta property=\"og:description\" content=\"Ok guys, I just made a mistake and broken my blog few days ago, but finally, as it get back to normal, so let me show you what&#8217;s happening. It is beginning from a mad idea, I upgraded my vps OS to ubuntu 12.04, after that, I found that the php-fpm process has broken(due to ... Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/finaldie.com\/blog\/migration-wordpress-from-5-2-1-to-5-7-1\/\" \/>\n<meta property=\"og:site_name\" content=\"Final Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/hu.yuzhang\" \/>\n<meta property=\"article:published_time\" content=\"2013-11-09T10:58:20+00:00\" \/>\n<meta name=\"author\" content=\"final\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@hyzwowtools\" \/>\n<meta name=\"twitter:site\" content=\"@hyzwowtools\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"final\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/finaldie.com\/blog\/migration-wordpress-from-5-2-1-to-5-7-1\/\",\"url\":\"https:\/\/finaldie.com\/blog\/migration-wordpress-from-5-2-1-to-5-7-1\/\",\"name\":\"Migration Wordpress from 5.2.1 to 5.7.1 - Final Blog\",\"isPartOf\":{\"@id\":\"https:\/\/finaldie.com\/blog\/#website\"},\"datePublished\":\"2013-11-09T10:58:20+00:00\",\"dateModified\":\"2013-11-09T10:58:20+00:00\",\"author\":{\"@id\":\"https:\/\/finaldie.com\/blog\/#\/schema\/person\/2d4c840d6e8e197f8ade98af2bd2fab3\"},\"breadcrumb\":{\"@id\":\"https:\/\/finaldie.com\/blog\/migration-wordpress-from-5-2-1-to-5-7-1\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/finaldie.com\/blog\/migration-wordpress-from-5-2-1-to-5-7-1\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/finaldie.com\/blog\/migration-wordpress-from-5-2-1-to-5-7-1\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/finaldie.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Migration WordPress from 5.2.1 to 5.7.1\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/finaldie.com\/blog\/#website\",\"url\":\"https:\/\/finaldie.com\/blog\/\",\"name\":\"Final Blog\",\"description\":\"As simple as possible...\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/finaldie.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/finaldie.com\/blog\/#\/schema\/person\/2d4c840d6e8e197f8ade98af2bd2fab3\",\"name\":\"final\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/finaldie.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/4c720545b79ddb0f23b527e0bbcfd9bc?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/4c720545b79ddb0f23b527e0bbcfd9bc?s=96&r=g\",\"caption\":\"final\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Migration Wordpress from 5.2.1 to 5.7.1 - Final Blog","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:\/\/finaldie.com\/blog\/migration-wordpress-from-5-2-1-to-5-7-1\/","og_locale":"en_US","og_type":"article","og_title":"Migration Wordpress from 5.2.1 to 5.7.1 - Final Blog","og_description":"Ok guys, I just made a mistake and broken my blog few days ago, but finally, as it get back to normal, so let me show you what&#8217;s happening. It is beginning from a mad idea, I upgraded my vps OS to ubuntu 12.04, after that, I found that the php-fpm process has broken(due to ... Read more","og_url":"https:\/\/finaldie.com\/blog\/migration-wordpress-from-5-2-1-to-5-7-1\/","og_site_name":"Final Blog","article_publisher":"https:\/\/www.facebook.com\/hu.yuzhang","article_published_time":"2013-11-09T10:58:20+00:00","author":"final","twitter_card":"summary_large_image","twitter_creator":"@hyzwowtools","twitter_site":"@hyzwowtools","twitter_misc":{"Written by":"final","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/finaldie.com\/blog\/migration-wordpress-from-5-2-1-to-5-7-1\/","url":"https:\/\/finaldie.com\/blog\/migration-wordpress-from-5-2-1-to-5-7-1\/","name":"Migration Wordpress from 5.2.1 to 5.7.1 - Final Blog","isPartOf":{"@id":"https:\/\/finaldie.com\/blog\/#website"},"datePublished":"2013-11-09T10:58:20+00:00","dateModified":"2013-11-09T10:58:20+00:00","author":{"@id":"https:\/\/finaldie.com\/blog\/#\/schema\/person\/2d4c840d6e8e197f8ade98af2bd2fab3"},"breadcrumb":{"@id":"https:\/\/finaldie.com\/blog\/migration-wordpress-from-5-2-1-to-5-7-1\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/finaldie.com\/blog\/migration-wordpress-from-5-2-1-to-5-7-1\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/finaldie.com\/blog\/migration-wordpress-from-5-2-1-to-5-7-1\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/finaldie.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Migration WordPress from 5.2.1 to 5.7.1"}]},{"@type":"WebSite","@id":"https:\/\/finaldie.com\/blog\/#website","url":"https:\/\/finaldie.com\/blog\/","name":"Final Blog","description":"As simple as possible...","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/finaldie.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/finaldie.com\/blog\/#\/schema\/person\/2d4c840d6e8e197f8ade98af2bd2fab3","name":"final","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/finaldie.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/4c720545b79ddb0f23b527e0bbcfd9bc?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4c720545b79ddb0f23b527e0bbcfd9bc?s=96&r=g","caption":"final"}}]}},"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/finaldie.com\/blog\/wp-json\/wp\/v2\/posts\/165"}],"collection":[{"href":"https:\/\/finaldie.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/finaldie.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/finaldie.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/finaldie.com\/blog\/wp-json\/wp\/v2\/comments?post=165"}],"version-history":[{"count":2,"href":"https:\/\/finaldie.com\/blog\/wp-json\/wp\/v2\/posts\/165\/revisions"}],"predecessor-version":[{"id":167,"href":"https:\/\/finaldie.com\/blog\/wp-json\/wp\/v2\/posts\/165\/revisions\/167"}],"wp:attachment":[{"href":"https:\/\/finaldie.com\/blog\/wp-json\/wp\/v2\/media?parent=165"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/finaldie.com\/blog\/wp-json\/wp\/v2\/categories?post=165"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/finaldie.com\/blog\/wp-json\/wp\/v2\/tags?post=165"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}