Skip to main content

Detailed WordPress installation to Google App Engine

I am moving my website(s) from VPS Server to Google App Engine (Google Cloud). It's too early to list the benefits of using Google Cloud while still building my infrastructure and making it work the way it suppose to.

A little background of the existing hosting environment.
I'm using a dedicated VPS Server with Solid State and 6.5GB Memory to host a multisites using WordPress for Content Management Systems (CMS).

The VPS Server is only hosting the WordPress files e.g. CMS core files, themes, plugins, etc.
I am using Amazon RDS for database so I don't have to worry about managing database server.
And I'm using Amazon CloudFront for images storage.

Current issues.
  1. When it gets busy, the website(s) response time spike from an average of 1.5msecs to 8-10msecs.
  2. My current hosting provider can't see what's going on.
I will use the Quick Start WordPress for Google App Engine simple tutorial. Here's the link if you're interested or continue to read my adventure.

My own step by step procedure to complete my installation. 
I downloaded the following programs to prepare my installation.
  • Google App Engine SDK for PHP
  • MySQL Community Server
  • Python 2.7 (check the latest release at website)
Steps to install.
  1. Install python and use the default installation.
  2. Install the Google App Engine SDK
  3. Install MySQL Community Server. Use the windows installer to simplify the installation of MySQL. Select the "Developer Default" to continue the install. If the supporting requirements are not installed, select "put check on it", then click Execute. Repeat the process till you complete all requirements for MySQL.
  4. Sign up for Google Cloud Platform, and setup Cloud SQL instance named it as "wordpress" to match the config file. Assign IP Address, and add your home/work IP Address to the list of Authorized IP Address so you can connect to you Cloud SQL instance.
  5. Edit app.yaml and wp-config.php replacing any instance of your project-id to match the Project ID you entered in the Cloud Console when you signed up for a Google Cloud Platform project.
  6. In MySQL Workbench, create database wordpress_db, add this information e.g. root and db password to our wp-config.php file.
  7. To launch WordPress locally on Windows, you can use the Google App Engine launcher by going to File > Add Existing Application. In Application Path, browse to the location of your wp-appengine folder. For my setup, I have my wp-appengine folder in d:\wp-appengine. Click on Add to continue.
  8. Click Run. Now, with App Engine running locally visit http://localhost:8080/wp-admin/install in your browser and run the setup process. If you're having issue, check the troubleshooting issues below.
  9. Continue the wordpress setup, e.g. Site Title, Username, Password, Email Address, etc. Click Install WordPress. Wait to complete the setup, you will see SUCCESS.
  10. Browse to your WordPress (http://localhost:8080/) and check all if everything are working OK
  11. Update your WordPress, Plugins and Themes. If all looks good, you can upload your application, select the project and click Deploy (or by using this command $ update APPLICATION_DIRECTORY).
  12. If all looks good, upload your application using Google App Engine launcher. Click Deploy, it will prompt you to enter your Google email address and password, check the Project name just to make sure. Click OK to continue.
  13. Just like you had to do with the local database, you will need to setup the Cloud SQL instance. Start MySQL client to connect to Cloud SQL using assigned static IP, root, and password. If you haven't update the password, go to Control Access to update the root password.
  14. You need to run the install script again for the live site, replace the <PROJECT_ID> with your project ID. visit http://<PROJECT_ID> to complete the setup.
  15. Activate the plugins e.g. Google App Engine for WordPress and Batcache Manager.
  16. In Google App Engine for WordPress, go to Settings to check the default bucket name using your project id .e.g < Click Save to finish.
  17. You should be able to see your website dashboard. Visit your website, and finish up using your own theme and plugins.
  18. Done. I hope this help you install your WordPress using Google App Engine.
Let me know if using Google App Engine improves the response time of your website, secure and economical to use Google for hosting. Share your thoughts.

When I first click Run, it does not work. I checked the logs and got this information.
Traceback (most recent call last):
  File "C:\Program Files (x86)\Google\google_appengine\", line 83, in <module>
    _run_file(__file__, globals())
  File "C:\Program Files (x86)\Google\google_appengine\", line 79, in _run_file
    execfile(_PATHS.script_file(script_name), globals_)
NameError: name 'execfile' is not defined
2014-11-05 10:55:59 (Process exited with code 1)
I download python 2.7.8, installed.
In Google App Engine launcher, click Edit, Preferences. In Python Path, I have it as D:\Python27\pythonw.exe, where I installed python in my local D drive.

Use an application-specific password instead of your regular account password.
Create application-specific password in your Google account security setting where you activated two-factor authentication.



  1. The one thing that can be a bit annoying is that you can not install themes and plugins right from the WP Admin while hosting on the App Engine and have to maintain a local copy of the WP website.

    Cloudways have recently integrated Google Compute Engine into our platform with an easy UI to launch a GCE instance and install WordPress and WordPress multisites.

    The advantage of GCE through our platform is that WordPress websites can be managed and customized online anything can be installed and backups are automated with many other features. here are details: Host Wordpress on Google Cloud


Post a Comment

Popular posts from this blog

VMware ESXi to add storage

Have you tried to add storage in your VMware environment after the initial setup and configuration? In my case, I needed to add storage for more space to copy virtual machine files. This is also the same approach to access a USB drive to import a vmx and vmdk files (virtual machine and data storage). For this article, I will provide a step by step procedure on how to add your USB drive from one of your Windows Server (or workstation). Let's use a Windows Server 2003 for reading your USB drive. By default, the NFS service is not enable. So, you have to add this service first. Go to Start , Control Panel , Add or Remove Programs , Add/Remove Windows Components , Other Network and Print Services , and select all for Microsoft Services for NFS . You asked, Why enable NFS Service? The VMware is based using Linux, so you need to enable NFS service to share your network drive or folder. Share a USB drive or folder. Open your Windows Explorer and browse your USB drive. In your

Office365 - This resource doesn't accept meetings longer than 1440 minutes

When you create a meeting schedule for number of days , you will see an error  "This resource doesn't accept meetings longer than 1440 minutes". By default the mailbox or room was set for a maximum limit of 1440 minutes. Here's how you can disable this limit. Login to the Office 365 Administration Console In Microsoft Office 365 Exchange, click on Manage . In Manage My Orgnization , click the drop down arrow, and click on Select on Another User . This will prompt you to select the mailbox or room to manage. Select a Mailbox or Room , click OK . In Option, click on Settings. In Scheduling Options, un-check the "Limit meeting duration", then click on Save. That's all. You can now schedule a meeting or reserve a room for number of days. Hope this help you. If this helped you, please take the time to share this post by sharing using Google+, Facebook, Twitter, or LinkedIn

Out of Office Reply for Termed Employee

This is a sample Out of Office message that I used for termed employees, unless HR staff specified a different message. === Example for KING.NET Employee === John Doe (employee or consultant)  is no longer with KING.NET effective  June 1, 2013  (termination date). For matters relating to " Project Name here " please direct your concerns to  John Smith at  [email protected] (Manager or Supervisor) . For all other matters, please direct your email to Mary Smith HR at [email protected]. Please call our main office 703-345-6789 if you have other concerns. Thank you. === End of message === I posted this article year 2008 from my old blog. If this helped you, please take the time to share this post by sharing using Google+, Facebook, Twitter, or LinkedIn