{"id":2129,"date":"2007-05-31T19:43:34","date_gmt":"2007-05-31T10:43:34","guid":{"rendered":"http:\/\/www.sssg.org\/blogs\/hiro345\/archives\/2129.html"},"modified":"2007-05-31T19:43:34","modified_gmt":"2007-05-31T10:43:34","slug":"wordpress-database","status":"publish","type":"post","link":"https:\/\/www.hiro345.net\/blogs\/hiro345\/archives\/2129.html","title":{"rendered":"WordPress Database"},"content":{"rendered":"<p>\u3069\u3046\u3082option\u306e\u30c6\u30fc\u30d6\u30eb\u3092\u79fb\u884c\u3059\u308b\u3068\u554f\u984c\u304c\u767a\u751f\u3059\u308b\u3088\u3046\u3002UTF-8\u306b\u3057\u305f\u3044\u306e\u3067\u3001DB\u306f\u79fb\u884c\u3057\u305f\u3044\u306e\u3067\u3059\u304c\u3001\u3069\u3046\u3059\u308b\u306e\u304c\u4e00\u756a\u3044\u3044\u306e\u304b\u306a\u3041\u3002\u4e0b\u8a18\u306f\u65e2\u5b58\u306e\u3082\u306e\u3092\u3044\u3063\u305f\u3093wordpress2\u3078\u3044\u308c\u3066\u304b\u3089\u3001SQL\u6587\u3067\u8ee2\u9001\u3057\u3066\u3044\u307e\u3059\u3002\u53e4\u3044WordPress\u306eDB\u3060\u3068\u8b0e\u306e\u30d5\u30a3\u30fc\u30eb\u30c9\u304c\u5897\u3048\u3066\u3044\u305f\u308a\u3057\u3066\u3001\u4e00\u81f4\u3057\u3066\u3044\u306a\u304b\u3063\u305f\u305f\u3081\u3001\u3053\u306e\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><!--more--><\/p>\n<pre>\r\ncreate database wordpress character set utf8;\r\ngrant all on wordpress.* to wordpress@localhost identified by 'xxxxxxxx';\r\n\r\ndelete from wordpress.wp_hiro345_linkcategories;\r\ninsert into wordpress.wp_hiro345_linkcategories (\r\n cat_id,\r\n cat_name,\r\n auto_toggle,\r\n show_images,\r\n show_description,\r\n show_rating,\r\n show_updated,\r\n sort_order,\r\n sort_desc,\r\n text_before_link,\r\n text_after_link,\r\n text_after_all,\r\n list_limit\r\n) select\r\n cat_id,\r\n cat_name,\r\n auto_toggle,\r\n show_images,\r\n show_description,\r\n show_rating,\r\n show_updated,\r\n sort_order,\r\n sort_desc,\r\n text_before_link,\r\n text_after_link,\r\n text_after_all,\r\n list_limit\r\n from wordpress2.wp_hiro345_linkcategories;\r\n\r\n\r\n\r\ndelete from wordpress.wp_hiro345_links;\r\ninsert into wordpress.wp_hiro345_links (\r\n link_id,\r\n link_url,\r\n link_name,\r\n link_image,\r\n link_target,\r\n link_category,\r\n link_description,\r\n link_visible,\r\n link_owner,\r\n link_rating,\r\n link_updated,\r\n link_rel,\r\n link_notes,\r\n link_rss\r\n) select\r\n link_id,\r\n link_url,\r\n link_name,\r\n link_image,\r\n link_target,\r\n link_category,\r\n link_description,\r\n link_visible,\r\n link_owner,\r\n link_rating,\r\n link_updated,\r\n link_rel,\r\n link_notes,\r\n link_rss\r\n from wordpress2.wp_hiro345_links;\r\n\r\n\r\ndelete from wordpress.wp_hiro345_post2cat;\r\ninsert into wordpress.wp_hiro345_post2cat (\r\n rel_id,\r\n post_id,\r\n category_id\r\n) select\r\n rel_id,\r\n post_id,\r\n category_id\r\n from wordpress2.wp_hiro345_post2cat;\r\n\r\n\r\ndelete from wordpress.wp_hiro345_postmeta;\r\ninsert into wordpress.wp_hiro345_postmeta (\r\n meta_id,\r\n post_id,\r\n meta_key,\r\n meta_value\r\n) select\r\n meta_id,\r\n post_id,\r\n meta_key,\r\n meta_value\r\n from wordpress2.wp_hiro345_postmeta;\r\n\r\n\r\ndelete from wordpress.wp_hiro345_posts;\r\ninsert into wordpress.wp_hiro345_posts (\r\n ID,\r\n post_author,\r\n post_date,\r\n post_date_gmt,\r\n post_content,\r\n post_title,\r\n post_category,\r\n post_excerpt,\r\n post_status,\r\n comment_status,\r\n ping_status,\r\n post_password,\r\n post_name,\r\n to_ping,\r\n pinged,\r\n post_modified,\r\n post_modified_gmt,\r\n post_content_filtered,\r\n post_parent,\r\n guid,\r\n menu_order,\r\n post_type,\r\n post_mime_type,\r\n comment_count\r\n) select \r\n ID,\r\n post_author,\r\n post_date,\r\n post_date_gmt,\r\n post_content,\r\n post_title,\r\n post_category,\r\n post_excerpt,\r\n post_status,\r\n comment_status,\r\n ping_status,\r\n post_password,\r\n post_name,\r\n to_ping,\r\n pinged,\r\n post_modified,\r\n post_modified_gmt,\r\n post_content_filtered,\r\n post_parent,\r\n guid,\r\n menu_order,\r\n post_type,\r\n post_mime_type,\r\n comment_count\r\nfrom wordpress2.wp_hiro345_posts;\r\n\r\n\r\n\r\n\r\ndelete from wordpress.wp_hiro345_categories;\r\ninsert into wordpress.wp_hiro345_categories(\r\n cat_ID,\r\n cat_name,\r\n category_nicename,\r\n category_description,\r\n category_parent,\r\n category_count\r\n) select \r\n cat_ID,\r\n cat_name,\r\n category_nicename,\r\n category_description,\r\n category_parent,\r\n category_count\r\nfrom wordpress2.wp_hiro345_categories;\r\n\r\n\r\ndelete from wordpress.wp_hiro345_comments;\r\ninsert into wordpress.wp_hiro345_comments(\r\n comment_ID,\r\n comment_post_ID,\r\n comment_author,\r\n comment_author_email,\r\n comment_author_url,\r\n comment_author_IP,\r\n comment_date,\r\n comment_date_gmt,\r\n comment_content,\r\n comment_karma,\r\n comment_approved,\r\n comment_agent,\r\n comment_type,\r\n comment_parent,\r\n user_id\r\n) select \r\n comment_ID,\r\n comment_post_ID,\r\n comment_author,\r\n comment_author_email,\r\n comment_author_url,\r\n comment_author_IP,\r\n comment_date,\r\n comment_date_gmt,\r\n comment_content,\r\n comment_karma,\r\n comment_approved,\r\n comment_agent,\r\n comment_type,\r\n comment_parent,\r\n user_id\r\nfrom wordpress2.wp_hiro345_comments;\r\n\r\n\r\n      \r\n\r\ndelete from wordpress.wp_hiro345_usermeta;\r\ninsert into wordpress.wp_hiro345_usermeta (\r\n umeta_id,\r\n user_id,\r\n meta_key,\r\n meta_value\r\n) select \r\n umeta_id,\r\n user_id,\r\n meta_key,\r\n meta_value\r\nfrom wordpress2.wp_hiro345_usermeta;\r\n\r\n\r\n\r\ndelete from wordpress.wp_hiro345_users;\r\ninsert into wordpress.wp_hiro345_users (\r\n ID,\r\n user_login,\r\n user_pass,\r\n user_nicename,\r\n user_email,\r\n user_url,\r\n user_registered,\r\n user_activation_key,\r\n user_status,\r\n display_name\r\n) select \r\n ID,\r\n user_login,\r\n user_pass,\r\n user_nicename,\r\n user_email,\r\n user_url,\r\n user_registered,\r\n user_activation_key,\r\n user_status,\r\n display_name\r\nfrom wordpress2.wp_hiro345_users;\r\n\r\n\r\n\r\ndelete from wordpress.wp_hiro345_options;\r\ninsert into wordpress.wp_hiro345_options (\r\n option_id,\r\n blog_id,\r\n option_name,\r\n option_can_override,\r\n option_type,\r\n option_value,\r\n option_width,\r\n option_height,\r\n option_description,\r\n option_admin_level,\r\n autoload\r\n) select\r\n option_id,\r\n blog_id,\r\n option_name,\r\n option_can_override,\r\n option_type,\r\n option_value,\r\n option_width,\r\n option_height,\r\n option_description,\r\n option_admin_level,\r\n autoload\r\n from wordpress2.wp_hiro345_options;\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u3069\u3046\u3082option\u306e\u30c6\u30fc\u30d6\u30eb\u3092\u79fb\u884c\u3059\u308b\u3068\u554f\u984c\u304c\u767a\u751f\u3059\u308b\u3088\u3046\u3002UTF-8\u306b\u3057\u305f\u3044\u306e\u3067\u3001DB\u306f\u79fb\u884c\u3057\u305f\u3044\u306e\u3067\u3059\u304c\u3001\u3069\u3046\u3059\u308b\u306e\u304c\u4e00\u756a\u3044\u3044\u306e\u304b\u306a\u3041\u3002\u4e0b\u8a18\u306f\u65e2\u5b58\u306e\u3082\u306e\u3092\u3044\u3063\u305f\u3093wordpress2\u3078\u3044\u308c\u3066\u304b\u3089\u3001SQL\u6587\u3067\u8ee2\u9001\u3057\u3066\u3044 &hellip; <a href=\"https:\/\/www.hiro345.net\/blogs\/hiro345\/archives\/2129.html\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-2129","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/posts\/2129","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/comments?post=2129"}],"version-history":[{"count":0,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/posts\/2129\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/media?parent=2129"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/categories?post=2129"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/tags?post=2129"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}