简体   繁体   English

Google Cloud上的每个WordPress实例都需要一个VM实例吗?

[英]Do I need a VM instance for each WordPress instance on Google Cloud?

I've been playing with Google Cloud, trying to figure out the most cost-effective way to host multiple low-traffic WordPress websites. 我一直在与Google Cloud交流,试图找出最经济高效的方式来托管多个流量较低的WordPress网站。

With Bitnami , it seems to me that for every new WordPress instance, I'm having to provision a new virtual machine. 使用Bitnami ,在我看来,对于每个新的WordPress实例,我都必须配置一个新的虚拟机。 I also tried Google click-to-deploy WordPress setup, and it forced me to provision a cluster with 3 VM's. 我还尝试了Google Click-to-deploy WordPress设置,它迫使我配置了3个VM的集群。

Each of the new VM's cost money, so I'm wondering if there's a way to do something similar to shared Linux hosting, where I could host multiple WordPress instances on a single Virtual Machine. 每个新VM的成本都很高,所以我想知道是否有一种方法可以执行类似于共享Linux托管的方法,在该虚拟机中我可以在一个虚拟机上托管多个WordPress实例。

您可以使用Bitnami Wordpress多站点堆栈,该堆栈允许多个站点在一台服务器上运行。

I found the following post which has explains how it might be done. 我找到了以下帖子,其中解释了如何完成此操作。

http://designhack.slashlab.net/en/how-to-setup-multiple-wordpress-without-multisite-ft-bitnami/ http://designhack.slashlab.net/en/how-to-setup-multiple-wordpress-without-multisite-ft-bitnami/

Make sure to back up important data before you start. 开始之前,请确保备份重要数据。

In you don't want to use the Bitnami Multisite solution, you can also install multiple WordPress apps in the same server without installing multiple database or web servers. 如果您不想使用Bitnami Multisite解决方案,则还可以在同一服务器上安装多个WordPress应用程序,而无需安装多个数据库或Web服务器。 Bitnami provides modules to install on top of an installed stack (normally LAMP stack) and the WordPress module allows you set the name of the blog you want to create. Bitnami提供了可安装在已安装堆栈(通常是LAMP堆栈)顶部的模块,而WordPress模块​​则允许您设置要创建的博客的名称。

The module can be downloaded from here but you will need to run the following commands in the instance (these commands will download the current version) 可以从此处下载该模块,但是您需要在实例中运行以下命令(这些命令将下载当前版本)

wget https://bitnami.com/redirect/to/269995/bitnami-wordpress-4.9.8-0-module-linux-x64-installer.run
chmod a+x bitnami-wordpress-4.9.8-0-module-linux-x64-installer.run
sudo ./bitnami-wordpress-VERSION-module-linux-x64-installer.run --wordpress_instance_name NEW_BLOG_NAME

Once you have the module installed, you will be able to access it through http://localhost/NEW_BLOG_NAME . 一旦安装了模块,就可以通过http:// localhost / NEW_BLOG_NAME对其进行访问。

More info in the Bitnami documentation Bitnami文档中的更多信息

https://docs.bitnami.com/installer/apps/wordpress/configuration/install-several-wordpress-modules/ https://docs.bitnami.com/installer/apps/wordpress/configuration/install-several-wordpress-modules/

There is the chance to set up multiple websites using bitnami, but i recommend to kept separate every site to avoid database confusion, and to extend the functionalities of every website. 有机会使用bitnami设置多个网站,但是我建议将每个站点分开放置,以避免数据库混乱,并扩展每个网站的功能。

https://bitnami.com/stack/wordpress-multisite https://bitnami.com/stack/wordpress-multisite

Im using a single VM per domain to avoid confusion with DNS. 我在每个域中使用单个VM,以避免与DNS混淆。

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

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