• Resolved actionmedia

    (@actionmedia)


    Hello,

    I have developed a site under domain.com/site. I now want to move it to it’s own cpanel account, which is site.com/~NL

    I have copied all files over to site.com/~NL. I also exported and imported the db.

    For some reason, it keeps saying “error connecting to db”. I have tried everything possible to fix this, and can’t. I even deleted account ~NL from WHM, and recreated it. I know the db connection works fine. The db username/password are correct. I even tried importing the db via command line (mysql command) and it imports fine, but won’t connect when trying to acccess the site via the new site.com/~NL url. Is it possible the site won’t work until I update the DNS of the domain name? That shouldn’t matter…

    Any help is greatly appreciated.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator t-p

    (@t-p)

    “Error establishing a database connection” means that there is a problem with the connection to your database and there could be a number of reasons for this. Try reviewing the following codex for possible reasons and solutions: http://codex.wordpress.org/Common_WordPress_Errors#Error_Establishing_Database_Connection

    Thread Starter actionmedia

    (@actionmedia)

    Something really strange is going on.

    I did a fresh install of WP, and everything works fine. I used db name site_test.

    I then imported my db from the other site to site_import. I then modified the wp-config file to point to the new db and db username, and I get a HTTP 500 error.

    I went back into wp-config, and put back in the original site_test info, and I still get a HTTP 500 error. I don’t understand what’s going on.

    Is there an easier way to migrate WP?

    Thread Starter actionmedia

    (@actionmedia)

    I used updraft backup/restore and it’s working fine. Really odd.

    Moderator t-p

    (@t-p)

    Glad to know its working fine 🙂

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Error establishing database connection after move’ is closed to new replies.