Title: WordPress database error: [Multiple primary key defined]
Last modified: August 24, 2016

---

# WordPress database error: [Multiple primary key defined]

 *  Resolved [Samuel Aguilera](https://wordpress.org/support/users/samuelaguilera/)
 * (@samuelaguilera)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/wordpress-database-error-multiple-primary-key-defined-3/)
 * Hi!
 * After upgrading from 2.0.3 to 2.1.0 I get the following database error:
 *     ```
       WordPress database error: [Multiple primary key defined]
       ALTER TABLE wp_snippets CHANGE COLUMN id id bigint(20) unsigned not null auto_increment primary key
       ```
   
 * Regards.
 * [https://wordpress.org/plugins/code-snippets/](https://wordpress.org/plugins/code-snippets/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * (@bungeshea)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/wordpress-database-error-multiple-primary-key-defined-3/#post-6113073)
 * This should be safe to ignore.
 *  Plugin Author [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * (@bungeshea)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/wordpress-database-error-multiple-primary-key-defined-3/#post-6113176)
 * To elaborate, this error is caused by changing how the primary key is applied
   in the SQL code. It seems that a change was introduced somewhere in 2.1.0, but
   I’ve hopefully fixed this in 2.2.0. Once again, this error should be perfectly
   fine to ignore.
 *  Thread Starter [Samuel Aguilera](https://wordpress.org/support/users/samuelaguilera/)
 * (@samuelaguilera)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/wordpress-database-error-multiple-primary-key-defined-3/#post-6113192)
 * I’m afraid the issue with database errors is not still resolved. Now I get the
   following error after upgrading to 2.2.2:
 *     ```
       WordPress database error: [Multiple primary key defined]
       ALTER TABLE wp_snippets ADD primary key (id)
       ```
   
 * Maybe is not a fatal error, but it’s an error in your database configuration 
   that should be fixed to ensure your plugin tables are created as expected.
 * Regards.
 *  Thread Starter [Samuel Aguilera](https://wordpress.org/support/users/samuelaguilera/)
 * (@samuelaguilera)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/wordpress-database-error-multiple-primary-key-defined-3/#post-6113278)
 * Finally 2.2.3 update fixed the issue.
 * Thanks.
 *  Plugin Author [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * (@bungeshea)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/wordpress-database-error-multiple-primary-key-defined-3/#post-6113280)
 * Thanks for reporting the issue

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘WordPress database error: [Multiple primary key defined]’ is closed to
new replies.

 * ![](https://ps.w.org/code-snippets/assets/icon.svg?rev=2148878)
 * [Code Snippets](https://wordpress.org/plugins/code-snippets/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/code-snippets/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/code-snippets/)
 * [Active Topics](https://wordpress.org/support/plugin/code-snippets/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/code-snippets/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/code-snippets/reviews/)

## Tags

 * [Database Error](https://wordpress.org/support/topic-tag/database-error/)

 * 5 replies
 * 2 participants
 * Last reply from: [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * Last activity: [11 years, 1 month ago](https://wordpress.org/support/topic/wordpress-database-error-multiple-primary-key-defined-3/#post-6113280)
 * Status: resolved