Title: WordPress database error Duplicate entry
Last modified: August 30, 2016

---

# WordPress database error Duplicate entry

 *  Resolved [dominic_ks](https://wordpress.org/support/users/dominic_ks/)
 * (@dominic_ks)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/wordpress-database-error-duplicate-entry-5/)
 * Hi,
 * I’ve seen that this error has been asked about many times, but I’m struggling
   to find a thread with a solution. I’m getting the following error lots in my 
   logs and the mentioned table does indeed contain a large number of duplicated
   rows. As far as I can see this isn’t producing any adverse affects for my users,
   but would appreciate if anyone knows how to resolve:
 * `WordPress database error Duplicate entry '92aa1b8fc02ceb3d76d5f19798d36708' 
   for key 'PRIMARY' for query INSERT INTO wp_domain_mapping_logins (`id`,`user_id`,`
   blog_id`,`t`) VALUES( '92aa1b8fc02ceb3d76d5f19798d36708', 0, 3, NOW() ) made 
   by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('
   wp-config.php'), require_once('wp-settings.php'), do_action('init'), call_user_func_array,
   ITSEC_Lockout->check_lockout, ITSEC_Lockout->execute_lock, wp_logout, do_action('
   wp_logout'), call_user_func_array, remote_logout_loader`
 * [https://wordpress.org/plugins/wordpress-mu-domain-mapping/](https://wordpress.org/plugins/wordpress-mu-domain-mapping/)

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

 *  Plugin Author [Ron Rennick](https://wordpress.org/support/users/wpmuguru/)
 * (@wpmuguru)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/wordpress-database-error-duplicate-entry-5/#post-6510982)
 * I think there is a conflict between iThemes Security & domain mapping (possibly
   the security plugin is re-logging the user in which is triggering a second insert).
 *  [George wp-website-mastery](https://wordpress.org/support/users/lernerconsult/)
 * (@lernerconsult)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/wordpress-database-error-duplicate-entry-5/#post-6511116)
 * Simply using INSERT instead of INSERT … ON DUPLICATE KEY UPDATE syntax. Very 
   likely no affect on the plugin working. Minor programming sloppiness.
 * “table does indeed contain a large number of duplicated rows” — Check again, 
   the Primary Key can never be duplicate, MySQL blocks duplicates; the error message
   you got is MySQL reporting it is preventing inserting a record that would cause
   a duplicate primary key.
 *  [George wp-website-mastery](https://wordpress.org/support/users/lernerconsult/)
 * (@lernerconsult)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/wordpress-database-error-duplicate-entry-5/#post-6511117)
 * iThemes Security isn’t “re-logging the user” but rather tracking incorrect login
   attempts, and 404 File Not Found errors, and other “bad behavior by a visitor”
   to block hackers.
 * This has nothing to do with the Domain Mapping plugin, and should be marked resolved.(
   I and others have reported this in the iThemes Security plugin support area.)
 *  Thread Starter [dominic_ks](https://wordpress.org/support/users/dominic_ks/)
 * (@dominic_ks)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/wordpress-database-error-duplicate-entry-5/#post-6511118)
 * Ok will check out the threads in iThemes Security.
 * Thanks all.

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

The topic ‘WordPress database error Duplicate entry’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wordpress-mu-domain-mapping.svg)
 * [WordPress MU Domain Mapping](https://wordpress.org/plugins/wordpress-mu-domain-mapping/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-mu-domain-mapping/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-mu-domain-mapping/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-mu-domain-mapping/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-mu-domain-mapping/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-mu-domain-mapping/reviews/)

## Tags

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

 * 4 replies
 * 3 participants
 * Last reply from: [dominic_ks](https://wordpress.org/support/users/dominic_ks/)
 * Last activity: [10 years, 7 months ago](https://wordpress.org/support/topic/wordpress-database-error-duplicate-entry-5/#post-6511118)
 * Status: resolved