• Hi!
    I haven’t had time to look into fixing my website’s “Error establishing a database connection” until now.
    I was without a computer for a week and only noticed this problem a few days ago.
    I’m wondering if I should just return to the previous WordPress version and how to do that from cPanel.

    I’d appreciate a walk through very much please (which I of course will google,) but I’m posting here first, before things become further messed up, in case it’s not such a good idea. I also can’t log into wp-admin, it throws the same error.

    I’m not a developer or tech savvy, I just have a small webpage hosted by a friend.

    Edited to add: The last version I installed was WordPress 5.0.1 I’m looking for the 4.9.9 version.

    • This topic was modified 5 years, 4 months ago by rasamalai.
    • This topic was modified 5 years, 4 months ago by rasamalai.

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 15 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    The DB down message means either one of the DB_ defines in your wp-config.php file is incorrect or your host’s database server is down. Please check with your host.

    Thread Starter rasamalai

    (@rasamalai)

    Hi Steven! Thank you for your reply!

    I don’t know how to fix it, would you please walk me through it?
    I’ve been googling how to do it, but I’m getting too old to understand it clearly.
    My friend is hosting me, but I have access to cPanel

    I tried editing the wp-config.php on the lines for DB_USER and DB_PASSWORD to my username and pwd because the ones that are there don’t match what I used, but that didn’t fix the problem, I don’t see the login page to log into wp-admin.
    DB_USER and DB_NAME have the same info between the ‘_’ I don’t know if that’s right or not, it doesn’t seem to be.

    • This reply was modified 5 years, 4 months ago by rasamalai.
    • This reply was modified 5 years, 4 months ago by rasamalai.
    • This reply was modified 5 years, 4 months ago by rasamalai.
    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    >> I tried editing the wp-config.php on the lines for DB_USER and DB_PASSWORD to my username and pwd because the ones that are there don’t match what I used, <<

    They are NOT the same as your site’s login id and password. Contact your friend/host to find out the correct settings for each of the DB_ defines.

    Thread Starter rasamalai

    (@rasamalai)

    Hi, By now I know that they aren’t the same. I’ve tried replacing the WordPress version with 4.9.9 manually, that also didn’t fix it, I tried repairing the tables for the DB.

    The thing is that my friend hosts me on his server, but I’m not a client of the service that puts his server online and he doesn’t do maintenance on my website, I have to do this myself (that’s why I’m posting here.)

    I’d really appreciate some help and pointers to fix it. I’ve already told him my website is down, if he could help, he would.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    I’ve explained it… one or more of the DB defines is incorrect or the MySQL server is down.

    if you have command line access, validate them like this

    mysql -u DB_USER -pDB_PASSWORD -h DB_HOST DB_NAME

    making the appropriate substitutions, and note that there’s a space after each parameter *except* -p.

    Thread Starter rasamalai

    (@rasamalai)

    Thank you!

    I do have command line access (I saw a little console under the MySQL menu)
    Could I still access that menu and cPanel if the MySQL server is down?

    I need to google how to do what you say.
    Thank you again Steven! πŸ™‚

    Edited to add: I can see from phpMyAdmin that MySQL server has been working for 6 days, since that’s not down, can you (or whomever feels inclined to help me) please tell me how to troubleshoot the connection?

    Please keep in mind I don’t even know the proper terms to google for whatever needs to be done.

    • This reply was modified 5 years, 4 months ago by rasamalai.
    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    So it sounds like the MySQL server is up if you can get to it via phpmyadmin.

    Check your site’s error logs and ask your host to check their server and mysql error logs. Something’s not quite right; it should be logged.

    Thread Starter rasamalai

    (@rasamalai)

    The only error logs I can find show one missing plugin and 2 missing themes (File does not exist) and they’re logs from today, nothing prior to that πŸ™

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Once again, CONTACT YOUR HOST.

    I found a possible reason – in your website can be a custom php .config file, which forces your site to use a different php version than your server’s php version.

    Check your WordPress site’s php version

    Thread Starter rasamalai

    (@rasamalai)

    Thank you! I hope that fixes it!

    Edit:
    Well, it was worth the try, but there isn’t such a file.
    I was also wondering what to do afterwards if it was there, since the post doesn’t explain much further.

    • This reply was modified 5 years, 3 months ago by rasamalai.
    Thread Starter rasamalai

    (@rasamalai)

    So, I’ve been trying again following this post:
    https://www.wpkube.com/how-to-fix-error-establishing-database-connection-in-wordpress/

    After creating the check.php file I got:
    Could not connect: Server is running in –secure-auth mode, but ‘user’@’localhost’ has a password in the old format; please change the password to the new format

    So I’m in the process of creating a new user, as the post says.
    It seems that while I require much more knowledge of what I’m doing, it is something I could be able to fix by myself -with some guidance, which is why I came here- and not further trouble the friend who has been hosting me for free for over 6 years now (single mom, very low income, don’t judge.)

    Update:
    After creating the new user, when I check I get the message “Connected Successfully” but the site still doesn’t load, there is no error message, wp-admin remains blank after entering the login credentials while the website itself is gray.

    I also got an email from WordPress stating that my website was automatically updated to version 5.0.2

    • This reply was modified 5 years, 3 months ago by rasamalai.
    • This reply was modified 5 years, 3 months ago by rasamalai.
    • This reply was modified 5 years, 3 months ago by rasamalai.
    • This reply was modified 5 years, 3 months ago by rasamalai.

    I would compare .htaccess php version with phpinfo.php information. If they are different or too old, it can cause a database error.

    How do I create a phpinfo.php file?

    Switching to PHP5

    How to change your PHP version and upgrading to PHP 7

    PS. I swithed from 5.4 to 7.0 and now my site is working better.

    • This reply was modified 5 years, 3 months ago by wp-muhkiainen.

    Your site is working, but obviously you have some theme problem, because site looks grey. Try login adding wp-login.php after site address and if you can login, change a basic twenty-something theme.

    It seems that your theme has not updated since June 1, 2013

    https://wordpress.org/themes/wpfolio/

    WPFolio

    WPFolio
    … is no longer maintained
    WPFolio was a free and open source theme for WordPress designed by artists specifically for visual artists. 8 years and 1000+ installs later, there are tons of great portfolio themes available for artists and WPFolio is no longer maintained.

    • This reply was modified 5 years, 3 months ago by wp-muhkiainen.
Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘After WordPress (and plugins) update my website is down.’ is closed to new replies.