Support » Fixing WordPress » wpdb::prepare was called incorrectly

  • After the auto update I saw this error pop into my debug logs.

    PHP Notice: wpdb::prepare was called incorrectly. The query does not contain the correct number of placeholders (2) for the number of arguments passed (3). Please see Debugging in WordPress for more information. (This message was added in version 4.8.3.) in /home/XYZ/public_html/wp-includes/functions.php on line 4139

    I did follow the steps here:

    But that didn’t fix the bug. Seems like there’s a lot of sites out there that now gets crawled with those issues > Search for it.

    Would somebody know why I am getting those errors and where they could come from? I suspect a plugin being the culprit.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Steve Stern


    Support Team Volunteer

    This may be a plugin or theme conflict. Please attempt to disable all plugins, and use one of the default (Twenty*) themes. If the problem goes away, enable them one by one to identify the source of your troubles.

    The change to wpdb->prepare was an important security update. See

    Once you’ve found the plugin or theme, let us (and its developer) know!

    Hi Steven,
    after updating all my plugins one by one I’ve found that the culprit was WPML. I had version 3.7.1.



    I had the same problem and the solution came when updating WPML.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘wpdb::prepare was called incorrectly’ is closed to new replies.