Connect local WordPress Site to remote database

I develop WordPress themes locally but have a demo of the same site on a remote server. What I’d like to do is develop locally but have the local site connect to the remote database instead of having to sync the databases frequently.

Is it possible to have a local WordPress site connected to a remote database instead of connecting through a local MAMP database? And, how might I go about doing this? My remote server is a VPS with GreenGeeks.

Read More

Thanks for the help.

Denis

Related posts

Leave a Reply

1 comment

  1. It’s possible, yes.

    1. Make sure your local IP is whitelisted on your database’s server to allow remote connections.
    2. Open wp-config.php and change the define('DB_HOST') bit so that it reads define('DB_HOST', 'your.domain.name');. You can also use the IP address.
    3. Test out the connection.