Installing multiple WordPress apps on a single virtual machine

Keywords: WordPress - Google Cloud Platform - Technical issue - Other
Description:
I’ve been running four WordPress apps on a single GCP VM on a Bitnami stack for nearly two years now (with Varnish + SSL), and I am now building up a fresh VM that I will migrate my current sites to.

My current stack was built using self-contained Bitnami installations (Approach B) whereas your latest configuration uses system packages (Approach A) and I can see uses a slightly different directory structure than before.

When I added the additional apps to the base single-tier stack (back in 2019) I ran the following installer from the server root - https://bitnami.com/redirect/to/836350/bitnami-wordpress-5.3.1-0-module-linux-x64-installer.run

Could you confirm if this is still the protocol for adding further WordPress apps in Approach A?

And have you further documented the process since I last figured it out? I am specifically referring to all the modifications that I made to the configuration files (httpd-prefix.conf, httpd-vhost.conf , bitnami-apps-vhosts.conf…)

I previously spoke with @jota and @michiel when building my current multi-module WordPress installation within a single VM (and therefore a single public IP).

Guys, if any of you have a spare few minutes could you please confirm how the new system package (approach A) is supposed to be modified to achieve my multi-instance objective.

Previously, each website was contained within their own folder in /opt/bitnami/apps directory, each with their own ‘conf’ and ‘htdocs’ directory, while bitnami.conf was then contained in /opt/bitnami/apache2/conf/

But now I see that the app/website sits directly within /opt/bitnami, while I assume each WordPress website’s configuration files are now held in the /opt/bitnami/apache2/conf/vhosts directory.

The latest installer (https://bitnami.com/redirect/to/1492359/bitnami-wordpress-5.7.2-0-linux-x64-installer.run) now deploys a full Bitnami stack rather than just another WordPress instance, so I assume I’ll need to download the latest wordpress tar from wordpress.org and then make copies of the myapp-https-vhost.conf myapp-vhost.conf files for each WordPress instance that I create?

Is there any updated documentation for this, or is my hunch correct?

Hello @steve12,

I’m afraid there is no documentation on this process given the existence of our WordPress Multisite, which is fairly similar to what you are trying to achieve here.

With this new instance configuration structure, you will indeed need to use additional vhosts conf files for extra Wordpress modules, changing it DocumentRoot and Directory directives. You will probably need to also create extra wordpress-htaccess.conf files. Apart from that, don’t forget about the database configuration needed in the extra modules.

Regards,
Francisco de Paz

Francisco, thanks for responding.

WordPress Multisite is a very different solution - I have four websites, for four different organisations that are provided under a SaaS type arrangement. Using the same Wordpress instance and sharing the same database would be at odds with this purpose. And your Wordpress Multi-Tier wouldn’t fit either.

Ok, the documentation that I was looking for was a more comprehensive description of the way Bitnami have chosen to compile this new ‘system packages’ stack.

I have managed to find a few documents which provide some clue, and I’ve configured virtual hosts before when building our previous Bitnami stack, so I will transfer my virtual host declarations across but split httpd-vhosts.conf into the two separate files wordpress-vhost.conf, wordpress-https-vhost.conf and repeat this for each Wordpress instance.

https://docs.bitnami.com/aws/infrastructure/lamp/administration/create-custom-application-php/

https://docs.bitnami.com/aws/infrastructure/lamp/administration/redirect-custom-domains//

https://docs.bitnami.com/virtual-machine/infrastructure/lamp/configuration/configure-custom-application/

One further question. Do you have any idea why the default (single tier) stack has symbolic links in the main WordPress app folder?

When I list the folder, the list shows the following symbolic links - I’m wondering if I will need to add the same for each website app that I add (e.g. the other three WordPress instances).

$ls -l /opt/bitnami/wordpress

wp-config.php -> /bitnami/wordpress/wp-config.php

wp-content -> /bitnami/wordpress/wp-content**

Hello @steve12,

Indeed, the other solutions wouldn’t be valid in your case. Regarding the symlinks, I haven’t found any reference to the /bitnami/wordpress directory and you shouldn’t need to reproduce them for your other sites. If I recall correctly, these symlinks were a way to help users access the most common files easily.

Regards,
Francisco de Paz

1 Like