Title: WordPress database error
Last modified: August 30, 2016

---

# WordPress database error

 *  Resolved [Vakantie Ameland](https://wordpress.org/support/users/christianebuddy/)
 * (@christianebuddy)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/wordpress-database-error-103/)
 * 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)

 *  [WebPrezence](https://wordpress.org/support/users/webprezence/)
 * (@webprezence)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/wordpress-database-error-103/#post-6845692)
 * It’s an old post, but perhaps it will help if your web host doesn’t have an answer:
   [https://core.trac.wordpress.org/ticket/10994](https://core.trac.wordpress.org/ticket/10994)
 *  Thread Starter [Vakantie Ameland](https://wordpress.org/support/users/christianebuddy/)
 * (@christianebuddy)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/wordpress-database-error-103/#post-6845772)
 * 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](https://wordpress.org/support/users/christianebuddy/)
 * (@christianebuddy)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/wordpress-database-error-103/#post-6845954)
 * 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.

## Tags

 * [upgrade](https://wordpress.org/support/topic-tag/upgrade/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [Vakantie Ameland](https://wordpress.org/support/users/christianebuddy/)
 * Last activity: [10 years, 5 months ago](https://wordpress.org/support/topic/wordpress-database-error-103/#post-6845954)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
