简体   繁体   English

如何将其他(外部)wordpress数据库服务器连接到另一台wordpress服务器?

[英]How to connect a different (external) wordpress database server to another wordpress server?

I am new to wordpress. 我是Wordpress的新手。 This is what I want to setup. 这就是我要设置的。

There are 2 wordpress servers. 有2个wordpress服务器。 One is the database server and the other is application. 一个是数据库服务器,另一个是应用程序。 Only the database server will be used to update the site. 仅数据库服务器将用于更新站点。 The other wp-site will look at the DB site and show it's content. 另一个wp站点将查看数据库站点并显示其内容。 How is this configuration possible? 这种配置怎么可能?

I have tried the following config but it is not working. 我尝试了以下配置,但无法正常工作。 Pls help! 请帮助!

define(‘DB_NAME’, ‘myserver’);

/** MySQL database username */

define(‘DB_USER’, ‘user’);

/** MySQL database password */

define(‘DB_PASSWORD’, ‘password’);

/** MySQL hostname */
define(‘DB_HOST’, ‘IP’);

It's easy: 这很容易:

In your config.php file on your application server: 在应用程序服务器上的config.php文件中:

define(‘DB_NAME’, ‘your-database-name’);
define(‘DB_USER’, ‘your-database-user-name’);
define(‘DB_PASSWORD’, ‘your-database-user-password’);
define(‘DB_HOST’, ‘the-ip-address-of-your-database-server’);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM