AGILE CMS WEBINAR Join us as we speak with Forrester about a new flavor of digital transformation. Register Now

Google App Engine WordPress

Setting up WordPress on Google App Engine

This is part 3 in our series on running WordPress on the cloud. In this page, we briefly review how to install WordPress on a Google App Engine machine instance. Also check out the previous parts of our series:

Source: Flickr, Sivaserver—Google data center

Google App Engine is Google’s Infrastructure as a Service (public cloud) offering, which allows you to “rent” computing power on demand from Google’s data centers and pay per use. Google App Engine is part of Google Cloud, a Platform as a Service that provides numerous value added services on the cloud, such as the Cloud Storage service, cloud virtual networking and load balancing, machine learning, etc.

Google Cloud offers a 60 day free trial in which you have an allowance of $300 to use Google’s services (credit card required), this will allow you to test out your WordPress instance in the cloud.

However, setting up WordPress on Google App Engine, making it production ready and scaling up requires technical expertise and can be prohibitively complex. In this page we'll discuss the complexities you can expect when taking your WordPress site to App Engine, and how Pantheon's cloud-based enterprise WordPress hosting can help you get many of the same benefits without the complexity.

Installing WordPress on a Google App Engine Machine Instance

Here are the general steps:

  1. Set up a local machine which can run a local server and Python.
  2. Install the Google App Engine SDK for PHP, MySQL, and a local installation of Python.
  3. Download and unpack the latest version of WordPress.
  4. Sign up to Google Cloud Platform and request a Cloud SQL instance.
  5. On your local machine, prepare an app.yaml file, which specifies how URL paths in your WordPress application correspond to request handlers and static files.
  6. Prepare a cron.yaml file, which schedules cron tasks every 2 hours.
  7. Make sure the following parameters are in your php.ini file:
    google_app_engine.enable_functions = "php_sapi_name, gc_enabled" allow_url_include = "1" upload_max_filesize = 8M
    See an example on Tuts Plus.
  8. Start MySQL using the command line and create a new database.
  9. Replace your_project_id with the Cloud SQL Instance ID name.
  10. Run the Google App Engine Launcher, and add your application using the app.yaml file.
  11. Launch your application engine in a browser via the Google App Engine Launcher, and go through the WordPress installation process.
  12. Deploy your application to Google App Engine—you will be prompted to define the WordPress email and password.
  13. To be able to upload files to your WordPress instance, you need to activate Cloud Integration—via App Engine Application Settings.
  14. Now on your local machine, install the Google App Engine plugin for WordPress and activate it. Under WordPress Settings you will now have App Engine settings. Fill in the required information and hit save.
  15. Deploy the app to Google App Engine again using the Google App Engine Launcher.

For full details see this Tuts Plus tutorial.

Important: You will not be able to change themes or install plugins directly on your Google App Engine WordPress instance. You need to make these changes in your local environment, and then re-deploy the app to Google App Engine.

Next Steps after Setting Up a WordPress Instance on Google App Engine

After you get your first WordPress instance up on Google App Engine, you will have to do the following:

Testing your instance for security vulnerabilities: Google App Engine provides a tool called Security Scanner which crawls your application, following links and attempting to exercise as many user inputs as possible, and within the scope of your starting URLs. Security Scanner attempts to exercise as many user inputs and event handlers as possible, and tries to detect vulnerabilities like XSS, flash injection, mixed content and insecure JavaScript libraries. If a vulnerability is discovered, you’ll need to verify its location with a browser that has XSS protection disabled, and then debug and fix the problems.

Set up caching: For optimal performance we recommend setting up Varnish as your reverse-proxy cache and Memcached or Redis as an object cache. Here is information from Google Cloud on using the built-in Memcached integration or launching Redis as a 3rd party package using the Cloud Launcher.

Set up autoscaling: To enable your Google App Engine application to scale automatically based on different conditions, you will first need to set up autoscaling. This involves creating multiple virtual machines on Google App Engine, creating a Managed Instance Group, setting up load balancing (there are a few methods, for example using HTTPS), and then setting up autoscaling, which involves defining an autoscaling policy and a target utilization (a threshold measured on the machine instance which, when exceeded, causes the app to scale to additional virtual machines).

These are the basic items, and there are more things you will need to take care of as you grow on the cloud, including automated provisioning of dev, test and production environments, site access strategy, setting up continuous integration, gaining visibility as to how your site is currently deployed and performing on Google App Engine, and more.

WordPress on the Cloud—How Pantheon Can Help

Pantheon is an enterprise-grade WordPress hosting service that runs on the public cloud. Using the power of the cloud, Pantheon can scale you from a tiny site with no traffic to “internet famous” in seconds. We do it with an automated container-based platform that runs on “bare metal” cloud infrastructure, and is an order of magnitude faster than the traditional virtualized cloud machine instances, like the ones you get on Google App Engine.

Instead of having to work hard to set up WordPress on a machine instance and set up security, caching, and autoscaling on Google App Engine as we described above, on Pantheon you can get all these built in. Pantheon provides security, automatic scaling, high performance and high availability—tested and working out of the box at the click of a button.

Also, you’ll get immediate access to advanced DevOps and workflow automation features, so you can develop like the pros, as if you were on your own local server. You can do all this on Google App Engine but you’re on your own—you need to build your infrastructure from the ground up.



Try Pantheon for free to experience the power of auto-scaling on the cloud, unmatched performance, security and other enterprise features, including a modern, collaborative development workflow.

Learn more about the fastest hosting platform on the planet: The Pantheon Web Hosting Platform.

Let’s get in touch