Title: Database Conection Page
Last modified: August 18, 2016

---

# Database Conection Page

 *  [cron](https://wordpress.org/support/users/cron/)
 * (@cron)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/database-conection-page/)
 * SHORT AND SWEET:
 * Can anyone please tell me where the “Error establishing a database connection”
   page is located? I would like to skin it myself.Thanks.
 * IN DETAIL:
 * Unfortinatly I am hosting my wordpress site on web server that is a little unreliable.
   Usually, about once or twice an hour, my SQL database goes down for 5-10 minutes.
   I do not think it is bad enough to switch to a better, more expensive, web host
   but I do dislike having the WordPress “Error establishing a database connection”
   page come up that often. Instead I would like to be able to edit that page myself
   so I can skin it in the same style as my blog or make it so people are automaticly
   redirected to another page when the database connection cannot be made. In order
   to do this I need to know where the code for that page can be found. Can somebody
   please tell me?
    Thanks everyone in advance, Cron
 * Thanks in advance.

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [oriecat](https://wordpress.org/support/users/oriecat/)
 * (@oriecat)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/database-conection-page/#post-179972)
 * wp-includes/wp-db.php
 *  [o-juice](https://wordpress.org/support/users/o-juice/)
 * (@o-juice)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/database-conection-page/#post-179975)
 * Since I don’t have a copy any WP versions prior to 1.5, the following information
   might only pertain to WP 1.5. Please use with caution.
 * Ok, look for this piece of code `$this->bail("` in your `../wp-includes/wp-db.
   php` file — should be present on lines 45 and 65 if you don’t turn word/line 
   wrapping on — and edit or style the information that’s in there with `IDs` or`
   class`es.
 * Another way might be to use a real oldskool `<meta
    http-equiv='refresh' content
   ='1;URL=http://the/page/you/want/to/redirect/to'>
    meta tag in place of the default
   error message if you’d like to use a custom error(s) page.
 * I hope you’re comfortable with editing PHP and be sure to make a back-up of `
   wp-db.php` in case something breaks with the one you’re going to edit.
 *  Thread Starter [cron](https://wordpress.org/support/users/cron/)
 * (@cron)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/database-conection-page/#post-179979)
 * Thanks guys. I will try out your sugestions.
 *  [thepete](https://wordpress.org/support/users/thepete/)
 * (@thepete)
 * [21 years ago](https://wordpress.org/support/topic/database-conection-page/#post-180376)
 * Thanks for posting about this, I was curious about where that code was located
   as well.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Database Conection Page’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 4 participants
 * Last reply from: [thepete](https://wordpress.org/support/users/thepete/)
 * Last activity: [21 years ago](https://wordpress.org/support/topic/database-conection-page/#post-180376)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
