Support » Fixing WordPress » Error Establishing a Database Connection

  • Resolved royromviel

    (@royromviel)


    I have a really annoying problem and I cant fix it.

    Here is my case:

    When I have my Permalinks on (like postname only for example) the frontend gives the error: ‘Error Establishing a Database Connection’
    When I set permalinks to standard (?p=123 for example), it all works fine.

    I have always access to my admin and I can always access my posts in the admin screens.

    I think the problem started after I deleted my standard admin account for security reasons. After that the problem started…

    I already repaired my database, resetted .htaccess and switching permalinks on and off…

    Who can help me?

    kind regards Roy

Viewing 8 replies - 1 through 8 (of 8 total)
  • Check your wp-config file and see if you have filled your DB_NAME, DB_USER, DB_PASSWORD and DB_HOST correctly.

    I have. It has not changed.

    And I have still access to my admin interface

    Can you post your site URL?

    I think the site can be infected with malware:
    1. Google lists as suspicious: See HERE.
    2. Here is another report: http://sitecheck.sucuri.net/results/www.trustpayrolling.nl

    These could be the reason for the abnormal behavior.

    Oh, yeah. I solved it already 🙂 That was the whole reason why I deleted the admin account 🙂

    You get this malware report because the site is still on the blacklist. But there is no malware in the site anymore

    The site worked fine after I cleaned up the files. But now… it wont work with permalinks on and I dont know how…

    Ok… I know what is wrong!

    It was my first wp site, so I am really ashamed right now… But the problem was this:

    I started the site in a subdirectory. Then when the site was complete I moved it to the root. But that seems to went a little bit wrong. Now the backend is using the current config.php in the root while the frontend is using the config.php in the old directory. So when I changed the sql password in the root config file I forgot to change the new password in the old config file…

    The whole problem was unknown to me till now. So I am going to fix this.

    Thanks anyway for ur time and help!

    kind regards Roy

    You are welcome!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Error Establishing a Database Connection’ is closed to new replies.