• I am setting up a new site using the cPanel on GoDaddy.

    I keep getting an error: Error establishing a database connection

    This is usually a problem with wp_config.php

    I’ve made changes and it looks right to me. Maybe I missed something.

    What else should I check?

    Thanks

Viewing 15 replies - 1 through 15 (of 15 total)
  • Thread Starter Engine44

    (@engine44)

    Thanks for your response. I went through all the suggested option but they didn’t work.

    If you have any other ideas, please let me know.

    Perhaps the best option is to clear out GoDaddy and start over.

    Thread Starter Engine44

    (@engine44)

    I just talked to GoDaddy again. They didn’t think starting over with a new upload would work. They are opposed to the idea of building a site on localhost and then uploading it. They say there are so many references in the files back to localhost that it doesn’t work.

    What do you think?

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    They would be opposed to the idea because it means they have to spend more time supporting you. If you want to have a local site and then upload it afterwards you should do that. That is best practice.

    Thread Starter Engine44

    (@engine44)

    I wish I could upload it, lol.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Yes, and it is always more work doing things the right way. If it were GoDaddy they’d have you developing and editing live on the server (bad, bad, bad).

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Can you clarify the step that you’re stuck on?

    Thread Starter Engine44

    (@engine44)

    I uploaded all files and changed wp_config.php to match GoDaddy settings. If I try to load site I get error: Error establishing database connection.

    If I try to load admin of site I get error: One or more database tables are unavailable.

    As I mentioned above, I tried all suggested fixes.

    Here’s a point that might be relevant. Yesterday, MAMP crashed on my computer. Not fixed yet. I uploaded the files to GoDaddy when MAMP was down. Does that matter?

    GoDaddy says they can fix the site problems for $80, lol

    Thanks

    • This reply was modified 8 years, 8 months ago by Engine44.
    • This reply was modified 8 years, 8 months ago by Engine44.
    • This reply was modified 8 years, 8 months ago by Engine44.
    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    MAMP acts as a wrapper so it won’t touch your files. Whether MAMP works isn’t relevant to the files you’ve uploaded to the server.

    Thread Starter Engine44

    (@engine44)

    Well that’s some good news. However, since MAMP went down, I can’t get to my localhost site.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    I don’t think getting MAMP working will help you for this issue, maybe we can tackle that at a later date.

    Can GoDaddy help with the database connection bit? You need someone who can see your database names and to triple-check everything is set up correctly. I understand GoDaddy are against the approach, but they should be able to help you with this bit.

    Thread Starter Engine44

    (@engine44)

    Only one tech was against the local development of sites.

    GoDaddy will look for errors if they get paid. They say it’s a content issue that they are not responsible for. Some techs are more helpful than others.

    I think I will wipe GoDaddy clean and reupload and hope for the best.

    I was hoping fixing MAMP would fix my local site because they both went down at the same time.

    Thanks

    Hi @engine44,

    GoDaddy engineer here. Just to be sure, you have referenced a file wp_config.php but the file name should be wp-config.php (notice the dash vs underscore).

    If you are, in fact, using wp_config.php (with the underscore) then WordPress won’t pick up and reference the file properly, ultimately causing all of your constants to be undefined.

    Can you confirm?

    Thread Starter Engine44

    (@engine44)

    Yes, a typo. wp-config.php is way it’s listed. Thanks.

    Thread Starter Engine44

    (@engine44)

    I was able to get MAMP running on my computer

    I checked the database. Every section of it is full of errors:

    Illegal String Offset

    What does that mean?

    Thanks

    UPDATE: A message in MAMP says no database tables exist. Where did they go, lol?

    • This reply was modified 8 years, 8 months ago by Engine44.
Viewing 15 replies - 1 through 15 (of 15 total)

The topic ‘Database error’ is closed to new replies.