• I’m working on a network that is already in production to fix some bugs in its theme.

    I’ve got a working lamp stack locally. I’ve moved all the code from the production site without any problem & I’ve got a dump of the production database; however, I can’t seem to get it working on localhost.

    I keep getting “Error establishing database connection” even though I’ve updated the credentials in wp-config.php and confirmed that they are correct.

    Can someone suggest a fix or, perhaps a better way of doing this?

Viewing 5 replies - 1 through 5 (of 5 total)
  • When you did the db dump, did you change the URL to match your local one?

    Thread Starter fhsm

    (@fhsm)

    Yes and no. No I didn’t do it from the web UI before dumping (i don’t want to go messing around with a site that is in active use). Yes did a find and replace on the dump before pushing to the local server.

    Well, no I wouldn’t expect you to do it to the live site… ??

    If you keep getting the db connect error, you’ll just have to keep looking. If you have a fresh install, does it give the error?

    Thread Starter fhsm

    (@fhsm)

    No problem with a clean install on this stack.

    I can even import wp-config and use the defined variables to establish a connection with the database manually.

    The error is clearly miss-information.

    How do you migrate a multisite network from production to dev and back?

    Pretty much what you did.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Moving from production to dev server?’ is closed to new replies.