0

My team and I are working on a Wordpress site together. We have one person doing data entry on a live server and the rest of us are working locally. What we would like to do is have our local solutions point to the live server database so that we can develop around the actual database content that has been entered.

I have added our IP address as an "Access Host" to the Remote MySQL section of our hosting account and confirmed that I am able to connect to the database remotely(using the live server's IP).

Since the home/site url are pointing to our live server domain in the database, it is my understanding that we will need to edit our hosts file in order to mask our local URL as the live URL.

The local URL I use is http://localhost:8888/wordpress so I added this line to my hosts file:

127.0.0.1 ourliveserver.com www.ourliveserver.com

But when I try to access http://ourliveserver.com/wordpress I am getting ERR_CONNECTION_REFUSED

Can anyone tell me where I went wrong?

user13286
  • 3,027
  • 9
  • 45
  • 100

2 Answers2

0

How are your ports configured? For example on localhost you have the application running on port 8888, but when you dont specify a port the default is 80 for http.

J Burk
  • 11
  • 3
0

So it turns out that you can override the home/site url directly in the wp-config.php file like this:

define( 'WP_HOME', 'http://localhost:8888/wordpress' );
define( 'WP_SITEURL', 'http://localhost:8888/wordpress' );

Everything is working correctly with those lines added.

user13286
  • 3,027
  • 9
  • 45
  • 100