Wednesday, May 12, 2021
More

    Latest Posts


    10 Ways to Get More Web Design Clients, Fast!

    Don’t lose your visitors when your database is unavailable

    - Advertisement -backlink tools

    When your WordPress blog has trouble connecting with the database, it returns a nice “Error Establishing a database connection”.

    wordpress-database-error

    - Advertisement -

    Instead of losing visitors, db-error.php might be the useful solution.
    You should create and place it in the wp-content folder. After that paste this short code in it.

    <?php
    // db-error.php
    
    $host=$_SERVER['HTTP_HOST'];
    $uri=urlencode($_SERVER['REQUEST_URI']);
    header("Location: http://google.com/search?q=cache:$host$uri");
    exit();
    
    ?>
    
    - Advertisement -

    the visitor is automatically redirected to the Google cache of the requested page. This avoids losing a visitor.

    - Advertisement -

    Latest Posts




    Don't Miss


    300x250_trinka_tagline

    Stay in touch

    To be updated with all the latest news, offers and special announcements.