Search code examples
wordpressgoogle-cloud-platformgoogle-compute-engineweb-hostingbitnami

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.

With Bitnami, it seems to me that for every new WordPress instance, I'm having to provision a new virtual machine. I also tried Google click-to-deploy WordPress setup, and it forced me to provision a cluster with 3 VM's.

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.


Solution

  • 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 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.

    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.

    More info in the Bitnami documentation

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