WordPress.org

Ready to get started?Download WordPress

Forums

Can a local install share a remote install's database? (5 posts)

  1. spiritbased
    Member
    Posted 5 years ago #

    I use MAMP Pro locally to mirror my remote site's core and theme files, but I'd like the local install to be using the database of the remote one so I'm always seeing the latest version.

    Is this possible? Is it just the wp-config file that needs to change, or is there more to it?

  2. RoseCitySister
    Member
    Posted 5 years ago #

    I think it is - you'll have to be added as a remote user to the remote db, at least if it's like my cPanel setup.

  3. IanSchaefer
    Member
    Posted 4 years ago #

    I am trying to do the same thing with MAMP. My live site is hosted at MediaTemple; there you simply have to specify an IP to allow access to the remote DB. I've plugged in the connection info into wp-config on my local machine, but it still doesn't work.

    When I browse to /wp-admin on the local machine the login screen comes up as expected. I login, but then I am redirected to the live site, where I am now logged in. Seems weird, but I guess the DB itself contains the site URL.

    Anyone out there have advice?

  4. ahimsauzi
    Member
    Posted 4 years ago #

    Ian, I followed what you did but I added one step that did the trick! Log into your live site and under settings change the wordpress address(URL) and the blog address(URL) to my localhost address save and log back in. You will be in your local install dashboard and connected to your online database.

    I guess that if the wordpress URL is localhost and the blog URL is the online installation it will work as well and you can maintain both location in sync. I did not try that since I am only developing my theme right now.

    Hope this help.

  5. ahimsauzi
    Member
    Posted 4 years ago #

    Somewhere in the past few updates of WordPress, the above solution is no longer working. I was able to log into the remote database with MAMP but any new pages I created simply could not be found. I guess it is best to work locally and do a backup an upload.

    If anyone has any solution please chime in!

Topic Closed

This topic has been closed to new replies.

About this Topic