Building a Reusable WordPress Image in GCP

Installing WordPress is fairly straight forward and there are a number of Blogs which describe the process.  For my host I decided to use the standard GCP Ubuntu 18.04LTS image as the base OS.

Ubuntu Image

I then followed the Digital Ocean Blog for installing a LAMP stack and WordPress on the server.   This was fairly straight forward.  The biggest issue I had was logging back into MySQL as root to create the WordPress database.  The commands shown just say to run MySQL…’ mysql -u root -p’, but you get an authentication error when you do this without sudo first.  Dumb issue but took me a while to figure it out.

Once the host was running and WordPress was working, I then created a snapshot of the disk and from the snapshot, created an image.  An alternative is just to create the image directly from the source disk, but for that you need to shutdown the host.  I tried both methods and in this case saw no difference.  The final result is a reusable fully functional WordPress image (see this post for why it is not really fully functional)…

WordPress Image


Comments are closed.