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:
- Part 1: What it Means to Move WordPress to the Public Cloud
- Part 2: Setting Up WordPress on Amazon EC2
- Part 3: Setting Up WordPress on Microsoft Azure
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:
- Set up a local machine which can run a local server and Python.
- Install the Google App Engine SDK for PHP, MySQL, and a local installation of Python.
- Download and unpack the latest version of WordPress.
- Sign up to Google Cloud Platform and request a Cloud SQL instance.
- 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.
- Prepare a cron.yaml file, which schedules cron tasks every 2 hours.
- 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.
- Start MySQL using the command line and create a new database.
- Replace your_project_id with the Cloud SQL Instance ID name.
- Run the Google App Engine Launcher, and add your application using the app.yaml file.
- Launch your application engine in a browser via the Google App Engine Launcher, and go through the WordPress installation process.
- Deploy your application to Google App Engine—you will be prompted to define the WordPress email and password.
- To be able to upload files to your WordPress instance, you need to activate Cloud Integration—via App Engine Application Settings.
- 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.
- 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:
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.
GET WORDPRESS ON THE CLOUD WITH NONE OF THE COMPLEXITY
GET WORDPRESS ON THE CLOUD WITH NONE OF THE COMPLEXITY
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.