Forums

wp-db.php customize (11 posts)

  1. bluehorse
    Member
    Posted 6 years ago #

    Does anyone know how to set the error communicating with database page(wp-db.php) to automatically re-direct to the index page to try again?

    So if there is a problem with the Database it keeps trying.

  2. whooami
    Member
    Posted 6 years ago #

    it tries every time the page is loaded, what more do you want?

    I mean, I know what you want, but why?

  3. bluehorse
    Member
    Posted 6 years ago #

    I've tried adding

    <head>
    <meta http-equiv="refresh" content="0;url=http://www.nameofsite.com/blog/index.php">
    </head>

    to wp-db.php, but it killed it. The regular page kept refreshing over and over.

  4. whooami
    Member
    Posted 6 years ago #

    it killed it because its a dumb idea. No offense but it is. In all sincerity, if you have that many issues with your host that you need to do that -- you need to worry about finding a new host, not writing something like that.

  5. bluehorse
    Member
    Posted 6 years ago #

    My database take a bit of a battering. with the number of sites I use it for so it's a bit hit and miss when my blog tries to connect. so a method of having the site reapetedly try would be great.

  6. whooami
    Member
    Posted 6 years ago #

    your box? spend some money on ram. problem solved! :)

  7. bluehorse
    Member
    Posted 6 years ago #

    not my box, my hosts. :(
    I wish it was mine.

  8. bluehorse
    Member
    Posted 6 years ago #

    What about a bit of Javascript or is that another dumb idea?

  9. Samuel B
    moderator
    Posted 6 years ago #

    If you're getting 404 or 401 or 500, etc. errors, you can redirect them to the index page with .htaccess rules.

  10. bluehorse
    Member
    Posted 6 years ago #

    I've decided I'm going to make a custom database error page with a refresh link. Thanks for all the help. Back to work I go. :)

  11. Samuel B
    moderator
    Posted 6 years ago #

    Check out my error page:
    http://www.comeuphither.com/blog/fred
    Of course "fred" doesn't exist.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.