{"id":409,"date":"2005-06-22T13:57:32","date_gmt":"2005-06-22T11:57:32","guid":{"rendered":"http:\/\/www.marblestation.com\/blog\/?p=409"},"modified":"2012-04-26T18:01:02","modified_gmt":"2012-04-26T16:01:02","slug":"migrar-de-drupal-a-wordpress","status":"publish","type":"post","link":"https:\/\/www.marblestation.com\/?p=409","title":{"rendered":"Migrar de drupal a wordpress"},"content":{"rendered":"<p>Para migrar de drupal a wordpress es posible utilizar las sentencias SQL que indico al final del post. Las he sacado de otra web cuyo link he perdido y he hecho alg\u00fan peque\u00f1o retoque.<\/p>\n<p>Se pierden los usuarios y las relaciones art\u00edculos\/comentarios &#8211; autores. El resto se conserva.<\/p>\n<p>Las sentencias suponen que estamos trabajando sobre la BD de wordpress y que la base de datos de drupal se llama precisamente &#8220;drupal&#8221;:<br \/>\n<!--more--><\/p>\n<pre>\r\ndelete from wp_categories ;\r\ndelete from wp_posts;\r\ndelete from wp_post2cat ;\r\ndelete from wp_comments ;\r\n\r\ninsert into wp_categories(cat_ID,cat_name, category_nicename, category_description, category_parent) select term_data.tid, name, name, description, parent from drupal.term_data, drupal.term_hierarchy where term_data.tid=term_hierarchy.tid ;\r\n\r\nINSERT INTO wp_posts(\r\nID, post_date, post_content, post_title, post_excerpt, post_name, post_modified\r\n)\r\n\r\nSELECT nid, FROM_UNIXTIME(created), REPLACE(body, '--break--', '--more--'), title, teaser, concat(\"OLD\",nid), FROM_UNIXTIME(changed) FROM drupal.node WHERE type=\"blog\" OR type=\"page\" OR type=\"story\" ;\r\n\r\nINSERT INTO wp_post2cat (post_id,category_id) SELECT nid,tid FROM drupal.term_node ;\r\n\r\nINSERT INTO wp_comments (\r\ncomment_post_ID, comment_date, comment_content, comment_parent\r\n)\r\n\r\nSELECT nid, FROM_UNIXTIME(timestamp), concat(\"\",subject, \"\", comment), thread FROM drupal.comments ;\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Para migrar de drupal a wordpress es posible utilizar las sentencias SQL que indico al final del post. Las he sacado de otra web cuyo link he perdido y he hecho alg\u00fan peque\u00f1o retoque. Se pierden los usuarios y las relaciones art\u00edculos\/comentarios &#8211; autores. El resto se conserva. Las sentencias suponen que estamos trabajando sobre &hellip; <a href=\"https:\/\/www.marblestation.com\/?p=409\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Migrar de drupal a wordpress<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/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,6],"tags":[],"class_list":["post-409","post","type-post","status-publish","format-standard","hentry","category-espanyol","category-tecnologia"],"_links":{"self":[{"href":"https:\/\/www.marblestation.com\/index.php?rest_route=\/wp\/v2\/posts\/409","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.marblestation.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.marblestation.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.marblestation.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.marblestation.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=409"}],"version-history":[{"count":1,"href":"https:\/\/www.marblestation.com\/index.php?rest_route=\/wp\/v2\/posts\/409\/revisions"}],"predecessor-version":[{"id":1507,"href":"https:\/\/www.marblestation.com\/index.php?rest_route=\/wp\/v2\/posts\/409\/revisions\/1507"}],"wp:attachment":[{"href":"https:\/\/www.marblestation.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=409"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.marblestation.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=409"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.marblestation.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=409"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}