Title: Database Key Error &#8211; Woocommerce install loop
Last modified: October 29, 2025

---

# Database Key Error – Woocommerce install loop

 *  [GoDsGiMp](https://wordpress.org/support/users/godsgimp/)
 * (@godsgimp)
 * [7 months ago](https://wordpress.org/support/topic/database-key-error-woocommerce-install-loop/)
 *     ```wp-block-code
       Hi Thank you for this plugin and the help you've given me beforeI uploaded my metadata here: id wseE2z4UAll of my three sites that I have this plugin installed on - use WHPOS - however those two tables when I convert them, simply say to convert them again if I go back to the plugin. In addition one of my sites - https://mungo.us - is in relation to this error - see my debug-log below. Basically the site is stuck in a 'install woocommerce' loopand it is uploading the WooCommerce thumbnail to my media library every time. Both issue are casuing me some concern, but fortunately the install loop and accompanying woocommerce-placeholder addition - is only happening on mungo.us.[29-Oct-2025 12:16:02 UTC] WordPress database error Multiple primary key defined for query ALTER TABLE wp_23mungo23_woocommerce_order_itemmeta ADD PRIMARY KEY (meta_id) made by require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('init'), WP_Hook->do_action, WP_Hook->apply_filters, WC_Install::check_version, WC_Install::install, WC_Install::install_core, WC_Install::create_tables, dbDelta[29-Oct-2025 12:16:02 UTC] WordPress database error Duplicate key name 'meta_key' for query ALTER TABLE wp_23mungo23_woocommerce_order_itemmeta ADD KEY meta_key (meta_key(32)) made by require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('init'), WP_Hook->do_action, WP_Hook->apply_filters, WC_Install::check_version, WC_Install::install, WC_Install::install_core, WC_Install::create_tables, dbDelta[29-Oct-2025 12:16:02 UTC] WordPress database error Duplicate key name 'meta_key_value' for query ALTER TABLE wp_23mungo23_wc_orders_meta ADD KEY meta_key_value (meta_key(100),meta_value(82)) made by require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('init'), WP_Hook->do_action, WP_Hook->apply_filters, WC_Install::check_version, WC_Install::install, WC_Install::install_core, WC_Install::create_tables, dbDelta[29-Oct-2025 12:16:02 UTC] ===================================================== PLACEHOLDER ATTACHMENT CREATEDPost ID: #358560Title: woocommerce-placeholderFile: woocommerce-placeholder.webpMIME Type: image/webpDate: 2025-10-29 14:16:02URL: https://mungo.co.za/wp-content/uploads/woocommerce-placeholder.webpBACKTRACE:Array([0] => {closure:/usr/www/users/mungoppzwy/wp-content/mu-plugins/debug-placeholder-uploads.php:17}[1] => WP_Hook->apply_filters[2] => WP_Hook->do_action[3] => do_action('add_attachment')[4] => wp_insert_post[5] => wp_insert_attachment[6] => WC_Install::create_placeholder_image[7] => WC_Install::create_files[8] => WC_Install::install_core[9] => WC_Install::install[10] => WC_Install::check_version[11] => WP_Hook->apply_filters[12] => WP_Hook->do_action[13] => do_action('init')[14] => require_once('wp-settings.php')[15] => require_once('wp-config.php')[16] => require_once('wp-load.php'))=====================================================Any help or ideas on how to resolve the issues would be most appreciated. Thank you.
       ```
   
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fdatabase-key-error-woocommerce-install-loop%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [OllieJones](https://wordpress.org/support/users/olliejones/)
 * (@olliejones)
 * [7 months ago](https://wordpress.org/support/topic/database-key-error-woocommerce-install-loop/#post-18702964)
 * Thanks for the trouble report.
 * I don’t know why WooCommerce is stuck in an update loop. I have not seen anything
   like that before. What happens if you revert the high-performance keys? What 
   happens if you disable the plugin? Please let me know.
 * I don’t see any obvious signs of trouble in your metadata upload. Your innodb_buffer_pool_size
   might be overprovisioned for your site. It seems to be about 40% unused. See 
   Tools -> Index MySQL -> About for information. But that is not a reason for any
   failure, just a way to use some server RAM more completely.
 * About the tables repeatedly needing conversion:
 * When it runs its installation or upgrade, WooCommerce tries to reinstall its 
   tables. (I wish it did not do that.) That process runs incompletely when the 
   high-performance keys are in those tables, which generates the debug.log error
   you sent me. The tables each end up with an extra key, which causes no trouble
   except for the bit of extra hard-drive tablespace taken up.
 * I’m looking at a way to deal with that situation gracefully. Please stay tuned.
 *  Plugin Author [OllieJones](https://wordpress.org/support/users/olliejones/)
 * (@olliejones)
 * [6 months ago](https://wordpress.org/support/topic/database-key-error-woocommerce-install-loop/#post-18732630)
 * The most recent release corrects the WooCommerce table reversion issue.

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

The topic ‘Database Key Error – Woocommerce install loop’ is closed to new replies.

 * ![](https://ps.w.org/index-wp-mysql-for-speed/assets/icon-128x128.png?rev=2652667)
 * [Index WP MySQL For Speed](https://wordpress.org/plugins/index-wp-mysql-for-speed/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/index-wp-mysql-for-speed/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/index-wp-mysql-for-speed/)
 * [Active Topics](https://wordpress.org/support/plugin/index-wp-mysql-for-speed/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/index-wp-mysql-for-speed/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/index-wp-mysql-for-speed/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [OllieJones](https://wordpress.org/support/users/olliejones/)
 * Last activity: [6 months ago](https://wordpress.org/support/topic/database-key-error-woocommerce-install-loop/#post-18732630)
 * Status: not resolved