gpt4 book ai didi

wordpress - 是否可以从其他服务器托管 WordPress 数据库

转载 作者:行者123 更新时间:2023-12-03 06:55:09 25 4
gpt4 key购买 nike

我有一个问题是,我必须从其他服务器托管 WordPress 数据库,并从我的域链接的另一台服务器托管 WordPress 目录,因此是否可以从不在同一服务器上的其他数据库连接 WordPress 目录,请解决如果知道答案我的问题。提前致谢。

最佳答案

可以,只要MySQL服务器允许外部服务器访问数据库即可。当您设置 WP 时,您将输入 SQL 服务器,而不是“localhost”。

您可以导出当前数据库,然后您将在另一台服务器上创建数据库,

然后,您将输入服务器的 IP 地址,而不是“localhost”(在 config.php 中),然后 config.php 将连接

// wp-config.php

define ( 'DB_NAME', 'yourdbname' );
define ( 'DB_USER', 'yourusername' );
define ( 'DB_PASSWORD', 'yourpassword' );
define ( 'DB_HOST', '111.222.0.1' ); // IP address of the server where MySQL is running

// make sure MySQL server will listen to the request from your WP server IP !

https://forums.digitalpoint.com/threads/can-i-host-wordpress-database-in-an-other-server.2702115/

关于wordpress - 是否可以从其他服务器托管 WordPress 数据库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39569889/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com