Search code examples
wordpressgoogle-cloud-platformgoogle-compute-enginemanagedstateless

How to update Wordpress website running on the Managed Instance Group on GCP


I'm working Wordpress site running on the MIG, so, this means that it is stateless, and I can't modify the template.

My questions are:

  • How can I update Wordpress version without destroy the website?
  • How can I install some plugin?

Thank you so much.


Solution

  • I assume that you have a Managed Instance Group (MIG) that is running on Google Cloud Platform and you want to update your MIG to get updated Wordpress and add some plugin.

    Please have a look at the documentation Updating instances in a MIG: > You might want to update a MIG's instance template for the following reasons:

    • To update your application or the operating system on each instance.

    and

    Apply a new version of an instance template by using one of the following methods:

    • Automated rolling update. The MIG automatically rolls out a new version of an instance template to all or to a random subset of managed instances in the MIG. The scope of the update and the level of disruption depends on the update policy that you configure.

    To update your MIG follow the steps below:

    1. You should start from creating an updated image. To manage your images you should follow the documentation Creating, deleting, and deprecating custom images.
    2. After that, you can create a new instance template by following the documentation Creating instance templates. Keep in mind, that you're not able to update instance templates.
    3. To apply changes to your MIG follow the instructions at the documentation Automatically rolling out updates to instances in a MIG.

    If something went wrong, you can rollback an update.