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?

4

2 回答 2

0

你的端口是如何配置的?例如,在 localhost 上,您的应用程序在端口 8888 上运行,但当您未指定端口时,http 的默认值为 80。

于 2019-01-14T17:37:59.213 回答
0

所以事实证明,你可以像这样在 wp-config.php 文件中直接覆盖home/ siteurl:

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

添加这些行后一切正常。

于 2019-01-14T17:42:58.520 回答