Support » Fixing WordPress » [Plugin: The Events Calendar] Error establing a database connection

  • Resolved namword


    This morning I uploaded, installed and enabled the Events Calendar on my clients WordPress site. A minute later my site stopped working with the above “Error establing a database connection” error (something I rarely see). I checked all my other WordPress sites and they were ALL showing the same error. I contacted my hosting company and asked them to repair the database, which they did. I went back onto my clients site which now looked fine, but again after pressing the ‘Calendar’ button on the site it stopped working with the above error.
    I AGAIN asked my hosting company to repair the database but this time I logged onto the site I’m working on, went to the admin and DEACTIVATED the Events Calendar plugin. Bingo! Everything now works fine and all my sites are back up and running!
    I’m confused as to how a simple plugin could cause such a massive database connection error and effect all my other WordPress sites as well.
    Is this a bug in the plugin?


Viewing 9 replies - 1 through 9 (of 9 total)
  • Check if you have entered the correct DB name, DB username, DB password and DB hostname in your wp-config.php file.

    The information for the database login must be correct because the site was working properly before I installed the plugin. It only displayed the database connection error when I installed and activated the Events Calendar plugin.

    Still, it’s not a bad idea to check wp-config.php file. However, you may try deleting/ deactivating the Events Calendar plugin too.

    If you read my original post I’ve mentioned that I did DEACTIVATE the plugin, and everything worked after that.
    Therefore, the problem must be with the plugin and not anything else

    the problem must be with the plugin and not anything else

    Delete it.

    Yes I did. But I wondered why it was causing a problem. If there was some coding that was interfering with the database connection then someone needs to take a look at that and try to correct the coding for future use.

    Can be conflicts with other plugins, theme, WP, or even server settings. See the documentation for the plugin. It starts with a warning!

    I’ll use some other Calendar plugin

    Thanks for your help



    Hi namword, Barry from Modern Tribe’s community team here.

    I’m sorry to hear you’ve experienced such a massive problem – all I can say is that this is unusual in the extreme, in fact I don’t think I’ve ever heard of this happening before with such a direct (apparent) connection to The Events Calendar.

    I can also tell you that The Events Calendar doesn’t change or adapt the database connection data in any way, shape or form – it doesn’t do anything unusual in this regard whatsoever.

    Last but not least, if a connection to the database cannot be established I would expect this to happen pretty early on during the require_wp_db() call in wp-settings.php – which happens way before The Events Calendar even loads.

    I appreciate there seems on the face of it to be some kind of connection to The Events Calendar, but I can’t help but think the problem lies elsewhere.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Plugin: The Events Calendar] Error establing a database connection’ is closed to new replies.