How do I access a remote database with a local MAMP development install?

Okay so I have a wordpress website that I've been developing locally on my netbook. I want to be able to develop it both on my netbook and on my desktop so in order to ease the process and not have to reconfigure stuff each time I switch between the two, I decided to host my database remotely on my website, and then just configure the code for the local install to refer to the same database etc.

I've followed this guide:

https://coderwall.com/p/ck8v4a/remote-database-with-local-wordpress-instance

and it does not seem to be working for me. I have gone on my host's control panel (Dreamhost) and put my local IP as an allowable host, and I've set my wp-config files to map to my domain. And yet it still will not go through.

Any clues on what I'm doing wrong?

The only step in that link I didn't follow was: --Replace each instance of 'localhost' with your 'Server Name' in MAMP. (localhost is default)

Because I don't actually know what that means exactly? I don't know what it means to replace localhost with Server Name in MAMP...

Topic localhost local-installation Wordpress

Category Web


What you are trying to do will not work as you local PCs will most likely get different IP addresses from time to time which will mean that you will have to reconfigure your server.

Your solution is much simpler.... just host the development site on your server, use the hosts file of your PCs to map whatever domain name you use for development to the IP of the server. You will also need some server side configuration to support that domain name, but since you use relatively respectable company, I assume it is something that you can do without having actual control of the domain, or use a subdomain of your site

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.