Google App Engine seems like a great choice for setting up a WordPress blog, and because I wanted more experience with Google Cloud Platform (GCP) I gave it a try. My overall assessment, however, is that App Engine isn’t the right choice right now and you’re better of using Compute Engine (or Container Engine) for a much faster install.
The main problem with deploying on App Engine is that it only supports PHP 5.6, so if you’re upgrading to the latest version of WordPress, you’re going to have a problem since it requires PHP 7. You can use App Engine Flexible Environment, but that requires additional setup, is still in Beta (as of right now), and isn’t so straight forward. If you plan to go this route, then follow Google’s Hosting WordPress in App Engine Flexible Environment guide. The bottom line is, if you want to keep WordPress updated, you can’t use the standard PHP App Engine environment.
If you still want to proceed with a standard App Engine instance, there is a helpful Quick Start WordPress for Google App Engine guide that’ll walk you through everything. Note that you’ll be using a pretty old version of WordPress (since the latest requires PHP 7). Also note that the guide is a little outdated, so you’ll have to work out some of the steps since Google changed their SDK significantly.
The big elephant in the room when dealing with App Engine is that your application does not have access to a file system. What does this mean? Well, you can’t autoupdate WordPress, you can’t install plugins, you can’t install themes, etc. If you’re used to being able to do these things via the WordPress admin, you’re going to be disappointed. Like all things, however, there is a workaround!
I first attempted to just run the local Google App Engine SDK and start up my App Engine application that way. Turns out, however, that locally you still don’t have file system access—yeah, even on localhost! So you’ll need to run a local FTP server and then have WordPress make changes via FTP instead of directly on the filesystem. When you’re done with your local changes, you can use Google’s SDK to deploy a new version of your app up to your production instance.
Your workflow will follow the best practices of any production ready application, but for many that just use WordPress as a hobby, it’ll be a change that requires additional steps and expertise. He’s what you’ll want to do:
- Run your App Engine application locally
- Install any new updates, plugins, or themes
- Increment your app version
- Deploy your app to production
For media files or anything related to the database, you won’t need to do a deployment, you simply can make those changes via the WordPress admin on your production system. That part will stay the same.
I ended up abandoning App Engine for setting up this blog and went straight for Compute Engine. I spent too many hours only to realize that all my work with trying to get App Engine to work was in vain, and rather than setting up the Flexible Environment, it would be faster to just have my own instance of Compute.
If you do end up using the Flexible Environment, please write up a post and link it in the comments. I’d like to hear of some success stories!
Now that I’m done with the tech part, I can get back to writing some posts again!
Enjoyed this post? Don't miss out next time I post. Simply signup and you'll get one email each time there's new content that you'll enjoy. No strings attached, just something I do that I hope will help you.