{"id":1035,"date":"2008-03-31T00:06:10","date_gmt":"2008-03-31T00:06:10","guid":{"rendered":"http:\/\/irdial.com\/blogdial\/?p=1035"},"modified":"2008-03-31T16:57:11","modified_gmt":"2008-03-31T16:57:11","slug":"word-press-upgrade","status":"publish","type":"post","link":"https:\/\/irdial.com\/blogdial\/?p=1035","title":{"rendered":"WordPress 2.5 upgrade"},"content":{"rendered":"<p>We have finally upgraded WordPress!<\/p>\n<p>Whenever I previously tried to do it, MSQL returned:<\/p>\n<pre>WordPress database error: [Duplicate entry '1'\r\nfor key 1]\r\nINSERT INTO wp_terms (term_id, name, slug, term_group)\r\nVALUES ('1', 'In', 'in-2', '1')\r\n\r\nWordPress database error: [Duplicate entry '1-category'\r\nfor key 2]\r\nINSERT INTO wp_term_taxonomy (term_id, taxonomy, description,\r\nparent, count) VALUES ('1', 'category', '', '0', '22')\r\n\r\nWordPress database error: [Duplicate entry '2' for key 1]\r\nINSERT INTO wp_terms (term_id, name, slug, term_group)\r\nVALUES ('2', 'Administravia', 'administravia-2', '1')\r\n\r\nWordPress database error: [Duplicate entry '2-category'\r\nfor key 2]\r\nINSERT INTO wp_term_taxonomy (term_id, taxonomy, description,\r\nparent, count) VALUES ('2', 'category', '', '0', '6')\r\n\r\nWordPress database error: [Duplicate entry '3' for key 1]\r\nINSERT INTO wp_terms (term_id, name, slug, term_group)\r\nVALUES ('3', 'The Law', 'the-law-2', '1')<\/pre>\n<p>Which resulted in an upgraded WordPress, with 1000 posts that were all Uncategorized.<\/p>\n<p>Eventually, after reading up and doing some dry runs, I discovered the solution:<\/p>\n<ul>\n<li>Back everything up, deactivate plugins.<\/li>\n<li>Upload the new WordPress files.<\/li>\n<li>Truncate the wp-terms table.<\/li>\n<li>Truncate the wp-taxonomy table.<\/li>\n<li>run the wp-admin\/upgrade.php script.<\/li>\n<\/ul>\n<p>It works!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We have finally upgraded WordPress! Whenever I previously tried to do it, MSQL returned: WordPress database error: [Duplicate entry &#8216;1&#8217; for key 1] INSERT INTO wp_terms (term_id, name, slug, term_group) VALUES (&#8216;1&#8217;, &#8216;In&#8217;, &#8216;in-2&#8217;, &#8216;1&#8217;) WordPress database error: [Duplicate entry &#8216;1-category&#8217; for key 2] INSERT INTO wp_term_taxonomy (term_id, taxonomy, description, parent, count) VALUES (&#8216;1&#8217;, &#8216;category&#8217;, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2,8,23],"tags":[71,67,66,68,70,69],"_links":{"self":[{"href":"https:\/\/irdial.com\/blogdial\/index.php?rest_route=\/wp\/v2\/posts\/1035"}],"collection":[{"href":"https:\/\/irdial.com\/blogdial\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/irdial.com\/blogdial\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/irdial.com\/blogdial\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/irdial.com\/blogdial\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1035"}],"version-history":[{"count":0,"href":"https:\/\/irdial.com\/blogdial\/index.php?rest_route=\/wp\/v2\/posts\/1035\/revisions"}],"wp:attachment":[{"href":"https:\/\/irdial.com\/blogdial\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1035"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/irdial.com\/blogdial\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1035"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/irdial.com\/blogdial\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1035"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}