• 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)
  • wp-includes/wp-db.php

    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 classes.

    Another way might be to use a real oldskool <meta
    http-equiv='refresh' content='1;URL=https://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

    (@cron)

    Thanks guys. I will try out your sugestions.

    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.