• Resolved Vakantie Ameland

    (@christianebuddy)


    When Updating from 4.3.1 to 4.4 one of my installations does not complete the upgrade.
    After clicking the “Update Database” button this is the error message:

    WordPress database error Multiple primary key defined for query ALTER TABLE wp_options ADD PRIMARY KEY (option_id) made by wp_upgrade, make_db_current_silent, dbDelta

Viewing 3 replies - 1 through 3 (of 3 total)
  • It’s an old post, but perhaps it will help if your web host doesn’t have an answer: https://core.trac.www.ads-software.com/ticket/10994

    Thread Starter Vakantie Ameland

    (@christianebuddy)

    Well the “web host” does not have the answer, it’s me ?? . I changed the upgrade.php according to the patch in the old post. Still the same error message and the upgrade process did not end.

    So I’m stuck here

    Thread Starter Vakantie Ameland

    (@christianebuddy)

    Solution:

    First drop both the primary keys in the table wp_options

    ALTER TABLE wp_options DROP INDEX option_id
    ALTER TABLE wp_options DROP INDEX option_name

    Then add one primary key back

    ALTER TABLE wp_options ADD PRIMARY KEY (option_id);

    And then perform the update

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘WordPress database error’ is closed to new replies.