简体   繁体   English

一个带有2个wordpress网站的不同选项表的数据库

[英]one database with different options tables for 2 wordpress sites

I have 2 WordPress websites (or, actually one server with 2 domains) first.com and second.com , and I want them to share the same database, except some tables that I want to be different for each site. 我有2个WordPress网站(或者实际上是一个具有2个域的服务器) first.comsecond.com ,我希望它们共享相同的数据库,除了一些我希望每个站点不同的表。

Let's say I want the "options" table, to be different for first.com . 假设我希望“ options”表与first.com不同。

I tried to edit in wp-includes/wp-db.php:270 and renamed the table accordingly, but I got an error. 我尝试在wp-includes/wp-db.php:270进行编辑,并相应地重命名了表,但出现错误。 So, I guess this is not the right solution. 因此,我认为这不是正确的解决方案。

Could anybody please try to help me with this. 任何人都可以尝试帮助我。

Thanks in advance 提前致谢

Edit 1: 编辑1:

I don't want them to share the same files, I only want them to share most of the tables in the database (but not all of them). 我不希望它们共享相同的文件,我只希望它们共享数据库中的大多数表(但不是全部)。 is it possible? 可能吗?

Is it the same site but with a two different domain? 它是同一站点,但具有两个不同的域吗? You might want to use multiple domain point to a single host and use a multiple domain plugin https://wordpress.org/plugins/multiple-domain/ . 您可能要使用指向单个主机的多个域指向,并使用多个域插件https://wordpress.org/plugins/multiple-domain/

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

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