WordPress is definitely the world’s most popular CMS today. According to W3Techs’ CMS usage statistics, it powers over 24% of the entire web, which is a CMS market share of 60.2%. Started off as a personal project, WordPress now is not limited to just blogging and therefore is being used to run almost all kind of websites including eCommerce, corporate and community.
Luckily, there are a number of options available to host and running a WordPress-powered site. If you’re a beginner, you may consider hosting your website on a shared server. For a high-traffic site, you may take advantage of a high-performing virtual dedicated server. But when it comes to handle a temporary massive influx in traffic, a virtual dedicated server seems to have failed. That’s where the Google App Engine shows its real magic!
Google App Engine: What is it?
Google App Engine, commonly referred to as GAE, is an extremely flexible PaaS (platform-as-a-service) cloud platform that allows you to build and host web applications in data centers managed by Google. It offers “auto scaling” to automatically increase or decrease the number of resources according to the demand in a user’s cloud. Means, you pay only for the resources that you actually use. With GAE, you also don’t require to maintain any servers. Just upload your application and you’re good to go.
Currently, App Engine supports applications written in various programming languages including PHP, Python, Java and Go. It runs applications in a secure, reliable and sandboxed environment that is totally independent of the OS, hardware and server’s geographical location. This way, to handle the additional traffic demands, it distributes incoming client requests efficiently across multiple database servers. For all supported languages, Google provides SDKs (Software Development Kits) which allow you to manage your application on a local computer, and the Administration Console to let you manage it online via a web-based interface.
Why Should You Choose Google App Engine?
Built on Google’s Infrastructure:
App Engine applications run on the same “extremely scalable and reliable infrastructure” that Google uses for its own services. Not only the Google infrastructure is different from regular hosting platforms but also is second only to Amazon. Sharing their technology, Google assures you the most convenient cloud service possible.
A Better Global Network:
Google has built the world’s largest and most advanced network of data centers, which doesn’t depend on the public internet to transfer data from one data center to another. That means, data will be moved within the private global fiber network used by Google to manage all its services including YouTube and Gmail.
If you use Google App Engine, you’ll have the complete control over what you want to do with your application. Every time when you wish to make any sort of customizations – like changing the PHP parameters or tweaking the file system paths – you don’t need to contact your hosting provider. Do it yourself and get every last drop of performance.
To help you deliver fast and consistent performance to your users across the world, Google’s compute infrastructure offers you high-performance virtual machines that are highly secure, scalable and reliable. Thus, you not only enjoy a low latency network but also get rid of “noisy neighbor” issues that could affect your application’s overall performance.
Easy Scale-up and Scale-down:
With GAE, you also need not to worry about scaling. As I already mentioned above, it offers auto scaling that enables your website scale up to cope with a huge traffic spike and scale back down if the traffic drops suddenly. Leveraging global load-balancing technology, App Engine has the capability to handle 1 million requests per second without any pre-warming.
GAE is designed in such a way that it has the ability to withstand multiple datacenter outages without any planned or unplanned downtime. If a data center requires maintenance, App Engine automatically migrate the VMs to other host in order to deliver continuous uptime to your website. According to the App Engine SLA, App Engine has a remarkable 99.95 percent uptime.
Professional Grade Security:
If we speak of security, App Engine uses the same security model that Google is using to keep its users safe on applications like Google Apps and Gmail. With a team of 500+ security experts, Google is committed to provide you the best-in-class security. Besides, Google’s cloud platform is certified with PCI DSS 3.0, SOC 2/3 and ISO 27001.
App Engine offers you various levels of support options including free community based support and 24/7 phone support. While free community based support lets users access documentation, resources and training content, on the other hand, 24/7 phone support provides access to trained experts over the phone in two languages- Japanese and English.
How to Set up and Run WordPress on Google App Engine
To get up and running a WordPress site on Google App Engine, you’ll need to set up a local server on your computer. Prepare your WordPress installation by downloading four programs mentioned below from the internet:
- Google App Engine SDK for PHP
- MySQL Community Server
- The Latest Version of Python
- WordPress on App Engine Starter Project
Once you’ve downloaded above software, install each of them one by one on your machine, extract “WordPress Starter Project” folder onto your hard drive and follow the steps given below:
Step 1: Sign up with Google Cloud Platform
Sign up for Google Cloud Platform as you’ll need to set up a Google Cloud SQL instance. Setting up a Cloud SQL instance is as easy as one, two and three. Just go to the Google Developers Console and create a new project.
After creating the project, go to Storage >> Cloud SQL in the sidebar on the left. Then, click New Instance, enter a unique name (project ID) for the instance and click Save.
Step 2: Edit Configuration Files
In order to run WordPress on App Engine, you’ll have to set up a local server. For that you need to edit app.yaml file (given in WordPress Starter Project folder) and wp-config.php file (presented in WordPress folder). Open up both files one by one and change your-project-id to the one that you had entered while creating your project and save them. In my case, the Project ID is wp-tutorial.
Step 3: Set up Local Database
Run the MySQL Command Line Client and you’ll be asked to enter the password. Simply type the password which you had set up while installing the MySQL server locally and hit Enter. After that, run the following command to create a database:
create database wp_database;
Remark: wp_database is the name of the database.
Step 4: Run WordPress Locally
Now, execute the App Engine Launcher and go to File à Add Existing Application. Browse to the “WordPress Starter Project” folder, hit OK and click Run.
Wait for a few moments and then click Browse.
You will be presented with the WordPress install page where you can log in with your credentials. Complete the WordPress setup!
Step 5: Deploy
If everything is fine, go back to the Launcher, select your project and click Deploy. You will be prompted for your Google email address and password. Input your Google login details and within seconds, you would be able to access your website at http://<PROJECT_ID>.appspot.com. For my setup, it’s wp-tutorial.appspot.com.
Step 6: Activate Cloud Integration
Log into the App Engine Admin Console and click your recently deployed WordPress project. In the left sidebar, Click Application Settings, scroll to the bottom and click the Create button. You will get a message saying “Cloud integration tasks have started”.
Step 7: Install Google App Engine Plug-in
The last thing you need to do is to locally install and activate the Google App Engine for WordPress plug-in. Once you’ve successfully activated the plug-in, navigate to Settings à App Engine and confirm your default bucket name, <PROJECT_ID>.appspot.com, shows up. If everything looks good, hit the Save button.
Congratulations! Your site is now ready to rock!
Hopefully, now you would have completely understood what Google App Engine is and how to host and run a WordPress site on it. Since App Engine doesn’t allow you to write to the file system (it’s static) right from the WP Admin, you would need to continuously maintain a local copy of your WordPress site. So, if you wish to install a theme and plug-in, log into your local WordPress instance, perform an install or update, and redeploy via the Launcher.