Some Info

I'm new to Google Cloud Platform. I deployed my Wordpress website using Google's Click to Deploy launcher.

I followed a tutorial to set up a load balancing for my VM instance and enabled Cloud CDN: Image

But I want to serve my website from other regions such as Asia and Europe, and enable Cloud CDN for them to improve users' browsing experience. Here is where I have no idea what to do. I read and followed Google's documentation on Creating Cross-Region Load Balancing, but it was not quite successful as all of my instances are unhealthy. (see pic)

My question

How do I set up a cross-regional load balancing (Cloud CDN enabled) with VM instances of different regions for my Wordpress website?

Do I have to create those VMs and install Wordpress separately on each of them and have to manually configure each site so that their contents are in sync with my main site (the VM deployed on us-west server)?

Kind regards.


For loadbalancing wordpress, you can set up managed-instance groups for separate regions, on which instances will be an exact copy of each other. To accomplish this you will need to create an instance template out a disk image of wordpress. At once the instance template is created, you can create two managed instance groups ( each for a region), with autoscaling on(autoscaler make it easy to adjust your application’s resources as demand requires). Then you can configure the backends to the loadbalancer

Secondly, you may want to use a separate database from the Wordpress if you are managing heavy traffic site. This can be achieved by Cloud SQL. Import the data to cloud sql from MySQL database on wordpress. And allow cloud sql to be connected from wordpress server. More is discussed here. A Cloud SQL can be deployed to a single zone and is replicated to other zones automatically. There is an internal feature request with an workaround for Multi regional replication of the SQL

  • Many thanks! I will try this sooner or later and will tell you how I do. An upvote for you (though I cannot with 1 reputation). – Assen Robin Jan 25 '18 at 23:25
  • Hi @Karthick N, I've created an image of my WP instance. But I don't quite follow how to create an instance template out of that image? I went to 'Create Instance Template', there is no option for me to choose a disk image as an instance template. Do I just manually configure it so everything matches the setting to the Wordpress one? – Assen Robin Jan 26 '18 at 0:28
  • Once you have created a custom image from the source disk you can able to create instance template from custom images (by selecting boot disk). I hope this helps – KarthickN Jan 26 '18 at 15:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.