WordPress at a glance
function is not described

wpdb::show_errors() public WP 0.71

Enables showing of database errors.

This function should be used only to enable showing of errors. wpdb::hide_errors() should be used instead for hiding errors.

It's a method of the class: wpdb{}

No Hooks.


true/false. Whether showing of errors was previously active.


$wpdb = new wpdb();
$wpdb->show_errors( $show );
Whether to show errors.
Default: true


  • See: wpdb::hide_errors()


Since 0.71 Introduced.

Code of wpdb::show_errors() WP 5.5.1

public function show_errors( $show = true ) {
	$errors            = $this->show_errors;
	$this->show_errors = $show;
	return $errors;