Title: Import fails, create table error
Last modified: September 26, 2019

---

# Import fails, create table error

 *  Resolved [Hans Schuijff](https://wordpress.org/support/users/hanswitteprins/)
 * (@hanswitteprins)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/import-fails-create-table-error/)
 * I’ve installed woocommerce admin on three websites. Two of which run fine. The
   import of users and orders worked and the stats are presented like supposed. 
   One had only about 20 orders in it and the second about 550.
 * The third website doesn’t build and show stats. This website has close to 1600
   orders of which some subscriptions and renewals.
 * The plugin seems to install fine and when I try to import previous users and 
   orders it seems to count up and seems to run fine until finalizing, but then 
   endlessly remains in that state.
 * Looking at the php log I find it reported some errors. The first and most important
   seems to be an error creating the stats table.
 * [25-Sep-2019 17:47:33 UTC] WordPress database error Index column size too large.
   The maximum column size is 767 bytes. in query
 *     ```
       		CREATE TABLE prefix_wc_order_stats (
       			order_id bigint(20) unsigned NOT NULL,
       			parent_id bigint(20) unsigned DEFAULT 0 NOT NULL,
       			date_created datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
       			date_created_gmt datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
       			num_items_sold int(11) DEFAULT 0 NOT NULL,
       			gross_total double DEFAULT 0 NOT NULL,
       			tax_total double DEFAULT 0 NOT NULL,
       			shipping_total double DEFAULT 0 NOT NULL,
       			net_total double DEFAULT 0 NOT NULL,
       			returning_customer boolean DEFAULT NULL,
       			status varchar(200) NOT NULL,
       			customer_id BIGINT UNSIGNED NOT NULL,
       			PRIMARY KEY (order_id),
       			KEY date_created (date_created),
       			KEY customer_id (customer_id),
       			KEY status (status)
       		) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci gemaakt door activate_plugin, do_action('activate_woocommerce-admin/woocommerce-admin.php'), WP_Hook->do_action, WP_Hook->apply_filters, Automattic\WooCommerce\Admin\FeaturePlugin->on_activation, Automattic\WooCommerce\Admin\Install::create_tables, dbDelta
       ```
   
 * Is it a bug, or do you have problem solving suggestions? Until now I haven’t 
   been able to use the plugin successfully.
 * I run the latest versions of wordpress and all plugins. Server is nginx/1.15.12
   Php version 7.2.17, MySQL-versie: 5.5.5-10.1.38-MariaDB, cURL Versie: 7.29.0,
   NSS/3.36
 * Hans

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

 *  [Ron Rennick](https://wordpress.org/support/users/wpmuguru/)
 * (@wpmuguru)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/import-fails-create-table-error/#post-11976122)
 * [@hanswitteprins](https://wordpress.org/support/users/hanswitteprins/) Thanks
   for reporting this. I have created [https://github.com/woocommerce/woocommerce-admin/issues/2969](https://github.com/woocommerce/woocommerce-admin/issues/2969)
   for reducing the length of the index.
 *  Plugin Support [Nicola Mustone](https://wordpress.org/support/users/nicolamustone/)
 * (@nicolamustone)
 * Automattic Happiness Engineer
 * [6 years, 8 months ago](https://wordpress.org/support/topic/import-fails-create-table-error/#post-12007336)
 * I’m going to mark this as resolved since we moved the issue to GitHub – if you
   have any further questions, you can start a new thread.

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

The topic ‘Import fails, create table error’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/woocommerce-admin_b298d1.svg)
 * [WooCommerce Admin](https://wordpress.org/plugins/woocommerce-admin/)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-admin/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-admin/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-admin/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-admin/reviews/)

## Tags

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

 * 2 replies
 * 3 participants
 * Last reply from: [Nicola Mustone](https://wordpress.org/support/users/nicolamustone/)
 * Last activity: [6 years, 8 months ago](https://wordpress.org/support/topic/import-fails-create-table-error/#post-12007336)
 * Status: resolved