Forums

[resolved] Cannot publish page "duplicate entry" (6 posts)

  1. corrijo
    Member
    Posted 2 years ago #

    I have this error:

    -----------
    WordPress database error: [Duplicate entry '0' for key 1]
    INSERT INTO wp_post2cat (post_id, category_id) VALUES ('68', '1')

    WordPress database error: [Duplicate entry '0' for key 1]
    INSERT INTO wp_postmeta (post_id,meta_key,meta_value) VALUES ('68','_wp_page_template','default')

    Warning: Cannot modify header information - headers already sent by (output started at /home/lemonlan/public_html/wp-includes/wp-db.php:133) in /home/lemonlan/public_html/wp-includes/pluggable.php on line 331

    -----------

    I've done this:
    http://wordpress.org/support/topic/107994

    and this:
    http://wordpress.org/support/topic/129725

    and deactivated all of my plugins.

    This problem showed up after I moved to a new server.

  2. MichaelH
    moderator
    Posted 2 years ago #

    Make sure your database tables are correctly defined. Use phpMyAdmin and look at the structure of your tables and make sure they agree with [[Database_Description/2.2]].

    In particular, make sure the tables with auto increment reflect that in your database tables.

  3. corrijo
    Member
    Posted 2 years ago #

    I've noticed that my old Information_schema had 16 tables.

    My new Infomation_schema has 17, the new one being "profiling". Is that the problem? If so, what should I do?

  4. MichaelH
    moderator
    Posted 2 years ago #

    profiling isn't a table that is part of the WordPress core tables. Maybe from a plugin.

  5. corrijo
    Member
    Posted 2 years ago #

    I am in phpmyadmin, but I am unsure how to know if my tables "agree" with database_description/2.2. Where is that found?

  6. corrijo
    Member
    Posted 2 years ago #

    Problem solved! I uploaded my backup .sql file and linked the config.php file to the new database and now it works!

    Thank you for your help Michael!

Topic Closed

This topic has been closed to new replies.

About this Topic