Short explanation
The $wpdb->prepare()
method works similar to sprintf()/printf()
and therefore needs more than one argument (else it’s senseless to use it at all).
So if one of your plugins or the theme makes a DB call, which is prepared to protect you against cross script attacks and similar and doesn’t do it properly, WordPress throws a message to notify you update that.
Repeat each step and reload. If it worked, you’re done. If not, proceed to the next one.
- Update all your plugins
- Deactivate your theme and switch to Twenty*
- Deactivate all of your plugins – activate each one, reload.
If you found the error and it was your own code, go and fix it. If it was a plugin, head over to the forum/Issue tracker and tell the author.
The magic of search
A plain normal Google search for
Missing argument 2 for wpdb::prepare()
reveals hundreds of results …