Title: DB version mismatch
Last modified: March 20, 2020

---

# DB version mismatch

 *  Resolved [ormo82](https://wordpress.org/support/users/ormo82/)
 * (@ormo82)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/db-version-mismatch/)
 * Hi,
    I have recently been trying out defender and it seems pretty good. However,
   I have noticed a mismatch that seems to be causing it to update the DB a lot,
   maybe on every page load.
 * In [main-activator.php:20](https://plugins.trac.wordpress.org/browser/defender-security/trunk/main-activator.php?rev=2230724#L20)
   it checks the db version to see if it is < **2.2.1**
    In [wp-defender.php:68](https://plugins.trac.wordpress.org/browser/defender-security/trunk/wp-defender.php#L68)
   it sets the db_version constant to be **2.1.1**
 * This means that the current DB version for the plugin gets set to 2.1.1, but 
   it updates if it is less than 2.2.1, which it always is, no matter how often 
   it updates the DB.
 * This caused a significant problem for me as the update statements generated are
   quite large (several hundred kbs) and are logged in the DB log. To be generated
   on every pageview quickly multiplies this to create many GBs worth of DB logs
   overnight!
 * It seems like it is a simple fix to determine which DB version is correct and
   change.
    If there is somewhere else to log such a bug report, please let me know
   🙂

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

 *  Plugin Support [Amin – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support2/)
 * (@wpmudev-support2)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/db-version-mismatch/#post-12570186)
 * Hello [@ormo82](https://wordpress.org/support/users/ormo82/) ,
 * Thanks for reporting this.
 * I have pinged our developers to check this. We will keep you updated.
 * kind regards,
    Kasia
 *  Plugin Support [Amin – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support2/)
 * (@wpmudev-support2)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/db-version-mismatch/#post-12638330)
 * Hello [@ormo82](https://wordpress.org/support/users/ormo82/) ,
 * I spoke with our developer and this should be updated in the 2.2.7 version of
   the Defender, please update plugin and let us know if you are still facing this
   issue.
 * kind regards,
    Kasia
 *  Thread Starter [ormo82](https://wordpress.org/support/users/ormo82/)
 * (@ormo82)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/db-version-mismatch/#post-12640535)
 * Brilliant! Thanks!

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

The topic ‘DB version mismatch’ is closed to new replies.

 * ![](https://ps.w.org/defender-security/assets/icon-256x256.gif?rev=3435930)
 * [Defender Security - Malware Scanner, Login Security & Firewall](https://wordpress.org/plugins/defender-security/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/defender-security/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/defender-security/)
 * [Active Topics](https://wordpress.org/support/plugin/defender-security/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/defender-security/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/defender-security/reviews/)

## Tags

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

 * 3 replies
 * 2 participants
 * Last reply from: [ormo82](https://wordpress.org/support/users/ormo82/)
 * Last activity: [6 years, 1 month ago](https://wordpress.org/support/topic/db-version-mismatch/#post-12640535)
 * Status: resolved