在单个域/网络服务器上运行多个 Wordpress 站点

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7941334/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-08 18:49:15  来源:igfitidea点击:

Running multiple Wordpress sites on a single domain/web server

wordpress

提问by Andreas Litis

I have a rather general but very important question. I have built a main website and an eShop for a client. The main website is in Wordpress and I have to find a platform for the eShop, but let's say it's also a Wordpress theme.

我有一个相当笼统但非常重要的问题。我为客户建立了一个主网站和一个 eShop。主要网站在 Wordpress 中,我必须为 eShop 找到一个平台,但假设它也是一个 Wordpress 主题。

Can I install 2 wordpress sites in my hosting server? So for example, the first one will be www.company.com/website and the other being www.company.com/shop.

我可以在我的托管服务器中安装 2 个 wordpress 站点吗?例如,第一个是 www.company.com/website,另一个是 www.company.com/shop。

回答by thewinchester

While all the previous answers are technically correcct - they will have you doing twice the work that is actually needed for your desired outcome (as in two installs, two upgrades, two sets of security checks, two databases, two admin panels... you get the idea - two times the work, all unnecessary).

虽然之前所有的答案在技术上都是正确的 - 他们会让你做两倍于你想要的结果实际需要的工作(比如在两次安装、两次升级、两组安全检查、两个数据库、两个管理面板......明白了 - 两倍的工作,都是不必要的)。

Since Wordpress 3.0, the WordpressMU features have been integrated into the core. This allows you to run multiple Wordprsss 'sites' from a single install.

从 Wordpress 3.0 开始,WordpressMU 功能已集成到核心中。这允许您从一次安装中运行多个 Wordprsss“站点”。

Sites can be served from their different domain, sub-domains, or in your case different sub-directories within the same domain and server.

站点可以从其不同的域、子域或同一域和服务器中的不同子目录提供服务。

Full information on how to achieve this is available from Wordpress Codex: Create A Network

可以从 Wordpress Codex 获得有关如何实现这一目标的完整信息: 创建网络

回答by HellFyr

Keep in mind that if you are routing around a port 80 blockade (aka using a different port to host your site) then Multi-site WILL NOT WORK. In such an instance multiple WP installations seem to be the ticket.

请记住,如果您要绕过端口 80 封锁(也就是使用不同的端口来托管您的站点),那么多站点将不起作用。在这种情况下,多个 WP 安装似乎是票证。

回答by Alejandro Ar

Just install one wordpress app in your root directory and create the other directory and install it there, there should be no problem.

只需在您的根目录中安装一个 wordpress 应用程序并创建另一个目录并将其安装在那里,应该没有问题。

回答by USB Hard Drives

You can choose a directory relative to your root domain when installing wordpress on your site.

在您的站点上安装 wordpress 时,您可以选择相对于您的根域的目录。