是否可以从其他服务器托管Wordpress数据库 [英] Is it possible to host wordpress database from other server

查看:172
本文介绍了是否可以从其他服务器托管Wordpress数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题是,我必须托管其他服务器上的wordpress数据库,而我的域链接到另一台服务器上的目录,因此可以将wordpress目录与不在同一服务器上的其他数据库连接起来,请解决我的问题,如果知道答案. 预先感谢.

I've a problem is that I've to host wordpress database from other server and directory from another server where my domain links, so is it possible to connect wordpress directory from other database which is not on same server, kindly resolve my issue if know the answer. Thanks in advance.

推荐答案

是的,只要MySQL服务器允许外部服务器访问该数据库即可. 设置WP时,您将放置在SQL Server中,而不是"localhost".

Yes, as long as the MySQL server allows the database to be accessed by external servers. When you set up WP, instead of "localhost", you'll put in the SQL server.

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

you can export the current database, then you will create a database on another server,

然后,您将放置服务器的IP地址,而不是"localhost"(在config.php中),然后config.php将连接

then instead of "localhost" (in the config.php ) you will put the IP address of the server and then the config.php will connect

// 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数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆