Setup load balancing WP server with multiple virtualhosts/server blocks

I am looking at a lot of docs and tutorials, but I am not sure yet how this exactly works. Lets say I do want to setup a:

  • Load Balancer
  • Wordpress1 VPS
  • Wordpress2 VPS

Where Wordpress1 is a server with like 15 Wordpress websites on it.

  1. When load balanced, and client gets on WP2 server, how does it get the site information available on WP1? Do I somehow need to create symlinks?
  2. Do I need to setup something extra for when I have multiple Wordpress websites on a server, instead of one, which will be load balanced?

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
August 23, 2022

Hi there,

In order for this setup to work, I could suggest a few things:

  • Make sure that your database is hosted separately, that way both of your webservers will connect to the same database and no information will be lost:

  • Use an object storage to store your upload files, that way both webservers will have access to the same files, and you would not need to synchronize the files using lsync for example

  • The two webservers need to be identical in order for that setup to work. The best thing to do is to first setup 1 server, then take a backup of that server and create the second server from that backup.

For more information on how to get started with load balancing in general, I would recommend the following tutorial:

Hope that this helps.



Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up