Support » Fixing WordPress » Table wp_postmeta, column meta_id stays on 0

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator bcworkz

    (@bcworkz)

    Determine the highest ID used and set the auto increment to 1 more. Use that number to replace the ##:
    ALTER TABLE wp_postmeta AUTO_INCREMENT = ##;

    While this answers your question, I don’t know if it’ll solve your problem. Good luck!

    wolfneo

    (@noaneo)

    Hi,
    Thank you for your reply.
    But auto_increment is not enabled, nor the primary key, so table option, I do not have the Auto_Increment option, I do not choose 1.

    And not possible to activate auto_increment, the 0 are duplicates.
    Or should I delete wp_postmeta, create it by activating auto_increment and primary key, and then send the data, is it possible?

    Thank you

    wolfneo

    (@noaneo)

    Hi,
    I found, put this code, problem solved

    ALTER TABLE wp_postmeta
        DROP COLUMN meta_id,
        ADD  COLUMN meta_id INT AUTO_INCREMENT NOT NULL PRIMARY KEY;

    Thank you very much

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Table wp_postmeta, column meta_id stays on 0’ is closed to new replies.