Title: Local WP install / sharing remote database
Last modified: August 19, 2016

---

# Local WP install / sharing remote database

 *  Resolved [eirkeirkeirk](https://wordpress.org/support/users/eirkeirkeirk/)
 * (@eirkeirkeirk)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/local-wp-install-sharing-remote-database/)
 * 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](https://wordpress.org/support/users/eirkeirkeirk/)
 * (@eirkeirkeirk)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/local-wp-install-sharing-remote-database/#post-1072882)
 * 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
 *  [ianschaefer](https://wordpress.org/support/users/ianschaefer/)
 * (@ianschaefer)
 * [17 years ago](https://wordpress.org/support/topic/local-wp-install-sharing-remote-database/#post-1073258)
 * 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
 *  [LJK](https://wordpress.org/support/users/ljk/)
 * (@ljk)
 * [16 years, 6 months ago](https://wordpress.org/support/topic/local-wp-install-sharing-remote-database/#post-1073316)
 * 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.

## Tags

 * [MAMP](https://wordpress.org/support/topic-tag/mamp/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [LJK](https://wordpress.org/support/users/ljk/)
 * Last activity: [16 years, 6 months ago](https://wordpress.org/support/topic/local-wp-install-sharing-remote-database/#post-1073316)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
