function dead_db() {}

Load custom DB error or display WordPress DB error.
If a file exists in the wp-content directory named db-error.php, then it will be loaded instead of displaying the WordPress DB error. If it is not found, then the WordPress DB error will be displayed instead.

Source code

function dead_db() {

	global $wpdb;

	// Load custom DB error template, if present.

	if ( file_exists( WP_CONTENT_DIR . '/db-error.php' ) ) {

		require_once( WP_CONTENT_DIR . '/db-error.php' );



	// If installing or in the admin, provide the verbose message.

	if ( defined('WP_INSTALLING') || defined('WP_ADMIN') )


	// Otherwise, be terse.

	status_header( 500 );


	header( 'Content-Type: text/html; charset=utf-8' );


<!DOCTYPE html>

<html xmlns="" <?php if ( function_exists( 'language_attributes' ) ) language_attributes(); ?>>


<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

	<title><?php echo /*WP_I18N_DB_ERROR*/'Database Error'/*/WP_I18N_DB_ERROR*/; ?></title>



	<h1><?php echo /*WP_I18N_DB_CONNECTION_ERROR*/'Error establishing a database connection'/*/WP_I18N_DB_CONNECTION_ERROR*/; ?></h1>







No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: