• Resolved eirkeirkeirk

    (@eirkeirkeirk)


    I’ve got WP 2.7 installed on a server (MediaTemple Grid server, if it matters) and am trying to get my local WP installation to share the remote database. It seems like this can be done, something just isn’t clicking.

    – I’m using MAMP to run the local install of WP
    – I simply copied everything from my remote WP install to the local WP install
    – I changed the following line in my local wp-config.php file:

    define('DB_HOST', $_ENV{DATABASE_SERVER});

    to:

    define('DB_HOST', 'external-db.s****.gridserver.com'); // **** added here because I'm paranoid :)

    The DB_NAME, DN_USER, and DB_PASSWORD should all remain the same since I’m still connecting to the same database, right?

    The error I get when I try to view the local WP index.php is:

    Safari can’t connect to the server.
    Safari can’t open the page “http://localhost:8888/wordpress/index.php” because Safari can’t connect to the server “localhost”.

    What am I missing? I was able to punch in the same database login info into Sequel Pro to connect to the remote database without any problem, so I’ve got the login info correct. Oh, and MAMP is also working correctly for other sites. Did I miss a step someplace?

    Thanks for any help!

    Erik

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter eirkeirkeirk

    (@eirkeirkeirk)

    Murphy’s Law. Beat my head against the desk for a couple hours, finally post a request for help, and then I immediately solve the problem 🙂

    I simply had the change the MAMP ports from their default settings (Apache:8888 and MySQL:8889) to the defaults for both (Apache:80 and MySQL:3306). Works like a charm now. Doh!

    Erik

    I am trying to do the same thing with MAMP (and a live site at MediaTemple). I’ve plugged the connection info into wp-config on my local machine and just changed the MAMP ports per your suggestion, but it still doesn’t work. Now Apache won’t start up.

    I realized as I am typing this that the Mac OS X installed Apache is probably running on port 80…hence the conflict.

    Ian

    Thanks eirkeirkeirk, that solved my problem too 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Local WP install / sharing remote database’ is closed to new replies.