Wordpress Discussion

Out of context: Reply #81

  • Started
  • Last post
  • 174 Responses
  • hotroddy0

    Is there an easy way to 'switch' out a database in wordpress.

    I set up a new wp locally using MAMP (new database) but now I want to switch out the database with the one I downloaded from my host.

    Is there a way to do this?

    • https://github.com/w…

      +

      https://github.com/w…

      ; )
      ideaist
    • So install on both Wordpress installs; and "push" from one OR "pull" from the other...

      ...Let me know if you get it hotroddy!

      Godspeed!
      ideaist
    • Import .SQL file from host into your local mySQL, then edit local wp-config.php to point to the new database, and database user/pass as needed.monNom
    • thanks ideaist.. I will try that.hotroddy
    • monNom.. i've tried that and it says 'error connecting to DB'. should user/pass be 'root' in order for it to work on MAMP?hotroddy
    • @ideaist - I'm stuck with github. how do I install the plugin once I've downloaded?hotroddy
    • MAMP u/p is rootArmandoEstrada
    • I tried 'root' but that doesn't work either.hotroddy
    • username/password should be whatever your credentials are for the database (note that they may be different from WP credentials)monNom
    • Can you log into phpMyAdmin with root/root? if not, try the user/pass you used when downloading the SQL file. I think DB users travel with the database.monNom
    • Best practice is to not connect to mySQL as root, but rather as a DB user, so likely there was a user/pass configured for the original DB that should work localmonNom
    • you would find that in WP-config file on the server:define('DB_NA...
      define('DB-USER'... define('DB_PASSWORD...
      monNom
    • thanks, I copied the values from server wp-config.php to local wp-config.php.. but still giving me connection error to DBhotroddy
    • table prefixes are the same 'wp_'hotroddy
    • on localhost username is root and password should be emptyfadein11

View thread