How to migrate WordPress between Compute Engine instances

I have recently created a very small Google Compute Engine instance, naively thinking it’s one of those easily scalable things Google people keep raving about.
I used the quick deployment feature of WordPress and it all installed itself nicely, so I started configuring and adding data etc.

However, I then found out that I can’t scale an existing instance (i.e. it won’t allow me to change the instance type to a bigger one. I don’t get why not, but there you go.), so it looks like I need to find a way to migrate my WordPress installation to a new instance.

Read More

Will I simply be able to create a new instance and point it at the persistent disk my small instance currently uses, et voila, Bob’s your uncle?

Or do I need to manually get the files and MySql data off the first instance and re-import into an empty new instance?
What’s the easiest way?

Any advise or helpful links would be appreciated.

Thanks.

P.S.: Btw, should I try to use the Google Cloud SQL store instead of a local MySql installation?

Related posts

Leave a Reply

2 comments

  1. In order to upgrade your VM:

    1. access the VM’s settings in the Developers Console (your project -> Compute -> Compute Engine -> VM instances -> click on the VM’s name)

    2. Scroll down to the “Disks” section, and un-check “Delete boot disk when instance is deleted”

    3. Delete the VM in question. Take note that the disk, named after the instance, will remain.

    4. Create a new VM, selecting “Existing disk” under Boot disk – Boot source. In the next box down, select the disk from point 3 above, as well as a bigger machine type.

    The resulting new instance will use the existing disk from the old one, with improved hardware / performance.

    As for using Cloud SQL in lieu of a VM-installed database, it’s perfectly feasible, and allows to adjust the Cloud SQL instance to match your actual use. A few consideration when setting up this kind of instance:

  2. Sammy’s answer covers the important stuff I just wanted to clarify how your files are arranged on the two disks that are attached to your instance:

    The data disk contains /var/www/ which is all of the wordpress files. It’s mounted on the instance at /wordpress

    The boot disk contains everything else, including the MySQL database that was created for the WordPress installation.