Title: Debug log showing database error
Last modified: July 30, 2020

---

# Debug log showing database error

 *  Resolved [Matija](https://wordpress.org/support/users/kasareviews/)
 * (@kasareviews)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/debug-log-showing-database-error/)
 * Hi,
 * I keep seeing in my debug.log below mentioned 2 WordPress database errors:
 * WordPress database error Duplicate entry ‘7083-6’ for key ‘PRIMARY’ for query
   INSERT INTO `klt3_yoast_indexable_hierarchy` (`indexable_id`, `ancestor_id`, `
   depth`, `blog_id`) VALUES (‘7083’, ‘6’, ‘2’, ‘1’) made by do_action(‘wp_ajax_save-
   attachment’), WP_Hook->do_action, WP_Hook->apply_filters, wp_ajax_save_attachment,
   wp_update_post, wp_insert_attachment, wp_insert_post, do_action(‘edit_attachment’),
   WP_Hook->do_action, WP_Hook->apply_filters, Yoast\WP\SEO\Integrations\Watchers\
   Indexable_Post_Watcher->build_indexable, Yoast\WP\SEO\Builders\Indexable_Builder-
   >build_for_id_and_type, Yoast\WP\SEO\Builders\Indexable_Hierarchy_Builder->build,
   Yoast\WP\SEO\Builders\Indexable_Hierarchy_Builder->save_ancestors, Yoast\WP\SEO\
   Repositories\Indexable_Hierarchy_Repository->add_ancestor, Yoast\WP\Lib\Model-
   >save, Yoast\WP\Lib\ORM->save, Yoast\WP\Lib\ORM::_execute
 * and also:
 * WordPress database error Duplicate entry ‘7083-6838’ for key ‘PRIMARY’ for query
   INSERT INTO `klt3_yoast_indexable_hierarchy` (`indexable_id`, `ancestor_id`, `
   depth`, `blog_id`) VALUES (‘7083’, ‘6838’, ‘1’, ‘1’) made by do_action(‘wp_ajax_save-
   attachment’), WP_Hook->do_action, WP_Hook->apply_filters, wp_ajax_save_attachment,
   wp_update_post, wp_insert_attachment, wp_insert_post, do_action(‘edit_attachment’),
   WP_Hook->do_action, WP_Hook->apply_filters, Yoast\WP\SEO\Integrations\Watchers\
   Indexable_Post_Watcher->build_indexable, Yoast\WP\SEO\Builders\Indexable_Builder-
   >build_for_id_and_type, Yoast\WP\SEO\Builders\Indexable_Hierarchy_Builder->build,
   Yoast\WP\SEO\Builders\Indexable_Hierarchy_Builder->save_ancestors, Yoast\WP\SEO\
   Repositories\Indexable_Hierarchy_Repository->add_ancestor, Yoast\WP\Lib\Model-
   >save, Yoast\WP\Lib\ORM->save, Yoast\WP\Lib\ORM::_execute
 * Could you tell me why this occurs and how to fix?

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

 *  [Md Mazedul Islam Khan](https://wordpress.org/support/users/mazedulislamkhan/)
 * (@mazedulislamkhan)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/debug-log-showing-database-error/#post-13191760)
 * We are sorry to hear that you’re having trouble. Can you please try resetting
   the indexables tables & migrations by using the [Yoast Test Helper](https://wordpress.org/plugins/yoast-test-helper/)
   plugin to check whether this resolves the issue for you?
    - Go to Tools → Yoast Test → Yoast SEO → Reset indexables tables & migrations
      options to reset it.
    - Rerun the indexables analysis from the Yoast SEO → Tools → SEO Data → Start
      processing and speed up your site now option.
 *  Thread Starter [Matija](https://wordpress.org/support/users/kasareviews/)
 * (@kasareviews)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/debug-log-showing-database-error/#post-13205775)
 * Hi,
 * Thanks for your answer. It seems that fixed mentioned error.

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

The topic ‘Debug log showing database error’ is closed to new replies.

 * ![](https://ps.w.org/wordpress-seo/assets/icon-256x256.gif?rev=3419908)
 * [Yoast SEO - Advanced SEO with real-time guidance and built-in AI](https://wordpress.org/plugins/wordpress-seo/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-seo/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-seo/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-seo/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-seo/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-seo/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Matija](https://wordpress.org/support/users/kasareviews/)
 * Last activity: [5 years, 10 months ago](https://wordpress.org/support/topic/debug-log-showing-database-error/#post-13205775)
 * Status: resolved