WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What is the difference between the suppress_errors() function and the hide_errors() functionin wpdb class?

What is the use of each function?

share|improve this question
up vote 0 down vote accepted
  • suppress_errors() hides errors during the database bootstrapping
  • hide_errors() hides SQL errors
share|improve this answer
So, the setting to hide errors is set by default right? We use hide_errors(false) only when we need to show errors? – rsman Sep 7 '10 at 11:21
Yes, hide errors is set by default. We use $wpdb->show_errors(); when we need to show them. For reference: codex.wordpress.org/Function_Reference/wpdb_Class – sorich87 Sep 7 '10 at 12:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.