Group Admins

  • Profile picture of Steve

Group Mods

No Mods

WordPress Troubleshooting and Support

Public Group active 22 hours, 50 minutes ago ago

WordPress support from our community

Database Connection Error

This topic contains 1 reply, has 1 voice, and was last updated by Profile photo of Patrick Ingle Patrick Ingle 1 month, 3 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #3325
    Profile photo of Patrick Ingle
    Patrick Ingle
    Participant

    A tip:

    If your site is constantly getting the dreaded database connection error and would like to show a better message, create a new file name db-error.php in the wp-content directory. Keep in mind, you do not have access to WP functions or core API and this file contents should be straight PHP and HTML code. You can have an entertaining image shown and get the current path from the $_SERVER parameter.

    Additionally, using textbelt.com/text you can send yourself a mobile text message every time your database goes down. You should have unlimited text on your phone and curl support on your server. Keep these text messages short. I also included the remote_addr, request_uri and the jsonized request parameter.

    Then I noticed the WP heartbeat was taking down my website, and disabled the heartbeat. More information about the WP heartbeat can be found at http://www.inmotionhosting.com/support/website/wordpress/heartbeat-ajax-php-usage

    #3326
    Profile photo of Patrick Ingle
    Patrick Ingle
    Participant

    Adding the db-error.php file to my site and sending a text message that includes the remote_addr, query and request, identified an hack attempt trying to login, showing the userid/password combinatoion the hacker was using. The hack originated from the netherlands.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.