- 2009-10-22 (木) 11:50
- WordPress
巧くインポートされなかったのはデータがあるwordpress。
つまり記事データがある状態でインポート。
要は消しちゃえばいいんじゃない?
て試してみたらアタリ。
wordpressの
『wp_posts』『wp_term_relationships』『wp_term_taxonomy』『wp_terms』の4本のテーブルを
create文を取得したあと、消す。
で
作り直す。
それからインポート。
こ れ だ けー!
すると、IDが保持されてるのだ!
なんて単純で優しくてありがとう!
create文を取得し忘れたキミへ
CREATE TABLE "wp_posts" ( "ID" integer PRIMARY KEY NOT NULL , "post_author" integer NOT NULL DEFAULT '0' , "post_date" datetime NOT NULL DEFAULT '0000-00-00 00:00:00' , "post_date_gmt" datetime NOT NULL DEFAULT '0000-00-00 00:00:00' , "post_content" text NOT NULL , "post_title" text NOT NULL , "post_category" integer NOT NULL DEFAULT '0' , "post_excerpt" text NOT NULL , "post_status" text NOT NULL DEFAULT 'publish' , "comment_status" text NOT NULL DEFAULT 'open' , "ping_status" text NOT NULL DEFAULT 'open' , "post_password" text NOT NULL DEFAULT '' , "post_name" text NOT NULL DEFAULT '' , "to_ping" text NOT NULL , "pinged" text NOT NULL , "post_modified" datetime NOT NULL DEFAULT '0000-00-00 00:00:00' , "post_modified_gmt" datetime NOT NULL DEFAULT '0000-00-00 00:00:00' , "post_content_filtered" text NOT NULL , "post_parent" integer NOT NULL DEFAULT '0' , "guid" text NOT NULL DEFAULT '' , "menu_order" integer NOT NULL DEFAULT '0' , "post_type" text NOT NULL DEFAULT 'post' , "post_mime_type" text NOT NULL DEFAULT '' , "comment_count" integer NOT NULL DEFAULT '0' ); CREATE TABLE wp_term_relationships ( object_id integer NOT NULL default 0, term_taxonomy_id integer NOT NULL default 0, term_order integer NOT NULL default 0, PRIMARY KEY (object_id,term_taxonomy_id) ); CREATE TABLE "wp_term_taxonomy" ( "term_taxonomy_id" integer PRIMARY KEY NOT NULL , "term_id" integer NOT NULL DEFAULT 0 , "taxonomy" text NOT NULL DEFAULT '' , "description" text NOT NULL , "parent" integer NOT NULL DEFAULT 0 , "count" integer NOT NULL DEFAULT 0 ); CREATE TABLE wp_terms ( term_id integer NOT NULL PRIMARY KEY AUTOINCREMENT , name text NOT NULL default '', slug text NOT NULL default '', term_group integer NOT NULL default 0, "term_order" INTEGER DEFAULT 9999 );
タグ: WordPress
関連する投稿
- Newer: カテゴリとタグの作り直しと振り直し
- Older: WinSCPのSVN用設定
Comments:0
Trackbacks:0
- Trackback URL for this entry
- http://qooga.jb-jk.net/wp/2009/10/wordpress%e3%82%a4%e3%83%b3%e3%83%9d%e3%83%bc%e3%83%88%e3%83%bb%e3%82%a8%e3%82%af%e3%82%b9%e3%83%9d%e3%83%bc%e3%83%88/trackback/
- Listed below are links to weblogs that reference
- http://qooga.jb-jk.net/wpwordpressインポート・エクスポート from MOT:主にプログラム勉強メモ部屋