Fix Error: WordPress database error Key ‘PRIMARY’ doesn’t exist in table

If you encounter an error in your cpanel below  please  execute the fix below the  error your phpmyadmin.

Error:

[15-Oct-2024 04:25:03 UTC] WordPress database error Key ‘PRIMARY’ doesn’t exist in table ‘wp_wpcargo_custom_fields’ for query SELECT COUNT(*) FROM odwwA3Nx_wpcargo_custom_fields USE INDEX (PRIMARY) made by do_action(‘wp_ajax_updraft_ajaxrestore’), WP_Hook->do_action, WP_Hook->apply_filters, UpdraftPlus_Admin->updraft_ajaxrestore, UpdraftPlus_Admin->prepare_restore, UpdraftPlus_Admin->restore_backup, Updraft_Restorer->perform_restore, Updraft_Restorer->restore_backup, Updraft_Restorer->restore_backup_db, Updraft_Restorer->prepare_create_table, Updraft_Restorer->restored_table, do_action(‘updraftplus_restored_db_table’), WP_Hook->do_action, WP_Hook->apply_filters, UpdraftPlus_Migrator_Lite->updraftplus_restored_db_table, UpdraftPlus_Search_Replace->icit_srdb_replacer

FixALTER TABLE `wp_wpcargo_custom_fields` ADD PRIMARY KEY(`id`);

or you can go to the table and click the Structure   and  set id as PRIMARY KEY.

 

Error:

[15-Oct-2024 04:25:03 UTC] WordPress database error Key ‘PRIMARY’ doesn’t exist in table ‘wp_wpcfe_reports’ for query SELECT COUNT(*) FROM odwwA3Nx_wpcfe_reports USE INDEX (PRIMARY) made by do_action(‘wp_ajax_updraft_ajaxrestore’), WP_Hook->do_action, WP_Hook->apply_filters, UpdraftPlus_Admin->updraft_ajaxrestore, UpdraftPlus_Admin->prepare_restore, UpdraftPlus_Admin->restore_backup, Updraft_Restorer->perform_restore, Updraft_Restorer->restore_backup, Updraft_Restorer->restore_backup_db, Updraft_Restorer->prepare_create_table, Updraft_Restorer->restored_table, do_action(‘updraftplus_restored_db_table’), WP_Hook->do_action, WP_Hook->apply_filters, UpdraftPlus_Migrator_Lite->updraftplus_restored_db_table, UpdraftPlus_Search_Replace->icit_srdb_replacer

FixALTER TABLE `wp_wpcfe_reports` ADD PRIMARY KEY(`id`);

or you can go to the table and click the Structure   and  set id as PRIMARY KEY.

 

Error:

[15-Oct-2024 04:25:03 UTC] WordPress database error Key ‘PRIMARY’ doesn’t exist in table ‘wp_wpcsr_user_group’ for query SELECT COUNT(*) FROM odwwA3Nx_wpcsr_user_group USE INDEX (PRIMARY) made by do_action(‘wp_ajax_updraft_ajaxrestore’), WP_Hook->do_action, WP_Hook->apply_filters, UpdraftPlus_Admin->updraft_ajaxrestore, UpdraftPlus_Admin->prepare_restore, UpdraftPlus_Admin->restore_backup, Updraft_Restorer->perform_restore, Updraft_Restorer->restore_backup, Updraft_Restorer->restore_backup_db, Updraft_Restorer->restored_table, do_action(‘updraftplus_restored_db_table’), WP_Hook->do_action, WP_Hook->apply_filters, UpdraftPlus_Migrator_Lite->updraftplus_restored_db_table, UpdraftPlus_Search_Replace->icit_srdb_replacer

Fix: ALTER TABLE `wp_wpcsr_user_group` ADD PRIMARY KEY(`user_group_id`);

or you can go to the table and click the Structure   and  set user_group_id  as PRIMARY KEY.

 

0
    0
    Your Cart
    Your cart is emptyReturn to Shop