【问题标题】:Post doesn't show up in dashboard - wordpress, MySQL帖子未显示在仪表板中 - wordpress、MySQL
【发布时间】:2010-11-07 18:27:10
【问题描述】:

我最近重新设计了我的网站,并配备了一个新数据库,但我想从旧 wp 网站中获取所有帖子,以便在新网站中添加。只有三个。我将数据库中与所述帖子有关的所有行导入到我的新数据库中。只显示了两个帖子。

当我尝试手动导入第三个帖子时,我得到了这个:

SQL query:

-- -- Database: `erisdesi_wp` -- -- -- Dumping data for table `wp_posts` -- INSERT INTO `wp_posts` (`ID`, `post_author`, `post_date`, `post_date_gmt`, `post_content`, `post_title`, `post_excerpt`, `post_status`, `comment_status`, `ping_status`, `post_password`, `post_name`, `to_ping`, `pinged`, `post_modified`, `post_modified_gmt`, `post_content_filtered`, `post_parent`, `guid`, `menu_order`, `post_type`, `post_mime_type`, `comment_count`) VALUES (188, 1, '2010-08-26 04:42:37', '2010-08-26 04:42:37', 'Hold yr horses! We’re building it!\r\n
\r\n\r\n
', 'Design Blog', '', 'inherit', 'open', 'open', '', '110-revision-6', '', '', '2010-08-26 04:42:37', '2010-08-26 04:42:37', '', 110, 'http://www.erisdesigns.net/http:/www.erisdesigns.net/wordpress/', 0, 'revision', '', 0), (2, 1, '2010-07-17 18:28:39', '2010-07-17 18:28:39', 'Documentation #1062 - Duplicate entry

我对 MySQL 还是很陌生...感谢任何帮助。在此先感谢您加深了我的知识。

【问题讨论】:

    标签: mysql wordpress mysql-error-1062


    【解决方案1】:

    使用 WordPress 拥有的导入和导出工具(在 wp-admin 的工具菜单下)。听起来您正在尝试导入具有相同 ID 的两行。如果您尝试将相同的帖子导入两次,或者导入到已包含具有相同 ID 的帖子的现有表中,则可能会发生这种情况。

    【讨论】:

    • 我实际上得到了成功导入的行,但我的仪表板中仍然没有该帖子。
    • 经过一夜的沮丧后,我发现我错过了一个重要的条目。进口和固定。给你支票,@Dan Grossman,谢谢你的回复。
    猜你喜欢
    • 2012-11-16
    • 2019-02-12
    • 1970-01-01
    • 1970-01-01
    • 2023-01-12
    • 1970-01-01
    • 1970-01-01
    • 2015-05-24
    • 1970-01-01
    相关资源
    最近更新 更多