WordPress.org

Ready to get started?Download WordPress

Forums

Error establishing a database connection (6 posts)

  1. venomshot629
    Member
    Posted 2 years ago #

    I recently switched hosts from Topcities/Serverpro to HostGator.

    Before I switched, I backed up all of my files from the root of my website hosted by Topcities at http://www.verysmartdesign.com, onto my computer.

    I am now with HostGator and went to copy and paste all of my files within the public_html folder (including my wordpress folder/files), and my site is not working, and I am not able to log in.

    I did go into my wp-config file, and even quick-installed a copy of wordpress and copied the database info from that wp-config file, however I did not see any of my posts/pages from when my website was hosted at topcities. I am now getting the "Error establishing a database connection" message.

    My wordpress installation is located within http://www.verysmartdesign.com/w ... Do I need to delete all of the files in the root of my HostGator, and copy over all of my backed up folders from the root of my Topcities backup (.cpaddons, .cpanel, .htpasswords, access-logs, etc, mail, public_ftp, public_html, tmp, www) for my files to show up and to be able to login correctly?

    Thanks.

  2. techbrij
    Member
    Posted 2 years ago #

    No, you need not to copy all folders, As you have done is correct(only public_html). See step by step guide to fix Error establishing a database connection . It might help you.

  3. Samuel B
    moderator
    Posted 2 years ago #

    did you export the database from the old site?

  4. govpatel
    Member
    Posted 2 years ago #

    All you need is your public_html folder the others are created by hostgator so do not change any of them as they are your setting for account.

    You will need backup of your database that you import in hostgator.

  5. venomshot629
    Member
    Posted 2 years ago #

    Thanks for the responses.

    I did not export the database at the time of the first post I made here, but now I did. I imported it on the new system and created a new database, changed my wpconfig file to match it, and now the site works and let me login, but...

    Now none of my pages are working. I see all of my pages and posts in the WP Admin section, and all of the content and plugins are there, none of my links are working on my site when I click them from the initial page at verysmartdesign.com

  6. venomshot629
    Member
    Posted 2 years ago #

    Nevermind, HostGator fixed it, they said they had to reset my .htaccess file back to default, and all pages showed up immediately.

    Thanks again everyone.

Topic Closed

This topic has been closed to new replies.

About this Topic