BLOGFIN

Tips, That Makes Blog Perfect !

How to install WordPress in Google App Engine

Google Cloud WordPress : You can install WordPress in Google app engine via some simple method. When you install WordPress in Google App Engine your page speed optimized and increase. You can check it through page speed optimization tools and better page speed means better SEO rank. How to Install WordPress in Google App Engine ? If you want to install and run WordPress in Google App Engine, then you have to follow the following method.

Prerequisites of Installation WordPress in Google App Engine

For install WordPress in Google App Engine, Python takes very important role to install it properly. Python is an Official language of Google.Python is also the key language of Google even with others language such as C++ and Java.It is used in Google App Engine, You Tube, code.google.com and others places.So you have to Download and Install Python locally to Install WordPress in Google App Engine. You will get details download and Installation process from above mention link.

Before you install any simple application or WordPress in Google app engine at first you have to download and install python and PHP SDK locally for Google App Engine.Why you should install Python ? For running PHP SDK application, Python help to run PHP SDK application to deploy WordPress in Google App Engine. When you install WordPress in cPanel you need to install Filezilla or CuteFTP to upload WordPress or anything in your server but here is nothing like that. Here, PHP SDK application deploy everything that you want to install in Google App Engine. For details Download and Installation process for this application click on above mention link.

MySQL database is a web hosting database.It is used to store website data like blog posts or others user information. Today MySQL database is the best linking database server. A MySQL database is capable for storing any type of data that need to crate a website. It also to rapidly store and retrieve data from the database.So you have to download and  install it locally for Install WordPress in Google App Engine. If you want to know the downloading and installation process of MySQL then Click on above mention link.

After download and install all above mentioned package you have to Sign up Google Cloud platform project then set up a Cloud SQL instance.Here you have to be enabled billing on the project. I mention here some steps which help you to install WordPress in Google App Engine

Install WordPress in Google App Engine

 

How to register and Create Cloud Console Project for Google Cloud WordPress

Google Cloud WordPress : At first you need to register in Google Could Platform and then create Cloud console project.When you will sign in your Google Cloud Consol you will find CREATE PROJECT option. Click here to create new project for Google App Engine in WordPress Google Apps platform.When you will click that option you might be asked to put your Project name and Project ID.

Step: 1

Set Up Local application for Google App Engine.

To run WordPress in Google App Engine application you have to create an empty folder for setup application (the name of the application folder should be same of your actual Project ID) in your local computer .Then you need to add app.yaml file, php.ini file, cron.vaml file in this folder.

The following text code you have to put in app.yaml file through notepad. Here you have to change your Project ID name which you have been created before.

application: YOUR_PROJECT_ID
version: wp
runtime: php
api_version: 1

handlers:
- url: /(.*.(htm|html|css|js))$
  static_files: wordpress/1
  upload: wordpress/.*.(htm|html|css|js)$
  application_readable: true

- url: /wp-content/(.*.(ico|jpg|png|gif))$
  static_files: wordpress/wp-content/1
  upload: wordpress/wp-content/.*.(ico|jpg|png|gif)$
  application_readable: true

- url: /(.*.(ico|jpg|png|gif))$
  static_files: wordpress/1
  upload: wordpress/.*.(ico|jpg|png|gif)$

- url: /wp-admin/(.+)
  script: wordpress/wp-admin/1
  secure: always

- url: /wp-admin/
  script: wordpress/wp-admin/index.php
  secure: always

- url: /wp-login.php
  script: wordpress/wp-login.php
  secure: always

- url: /wp-cron.php
  script: wordpress/wp-cron.php
  login: admin

- url: /xmlrpc.php
  script: wordpress/xmlrpc.php

- url: /wp-(.+).php
  script: wordpress/wp-1.php

- url: /(.+)?/?
  script: wordpress/index.php

The following text code you have to put in php.ini file through notepad

google_app_engine.enable_functions = "php_sapi_name, gc_enabled"

The following text code you have to put in cron.vaml file through notepad

cron:
- description: wordpress cron tasks
url: /wp-cron.php
schedule: every 2 hours

Step: 2

Download WordPress from wordpress.org

You have to download latest version WordPress from the website www.wordpress.org for Google App Engine.It will be downloaded as zip file in your local computer. Then it should be extracted in your created folder.

Step: 3

Create Database for your local MySQL server

After create database in your local MySQL server you have to allow to connect WordPress database and later to Connect Cloud SQL. When your local MySQL server will be running you have to run the following code.

Step: 4

Create wp-config.php file

Go to your created folder where you have been installed WordPress. In this WordPress you will get a file name wp-config-sample.php. You need to edit text code of this file.Change the name of the database as ‘wordpress_db’ Change the MySQL database user name as ‘wp_user’ and change the MySQL database password as ‘wp_password’ at last you have to save this wp-config-sample.php file as wp-config.php

The details changeable code are mention below. This code will be edited by Notepad. 

/** The name of the database for WordPress */
define('DB_NAME', 'wordpress_db');

/** MySQL database username */
define('DB_USER', 'wp_user');

/** MySQL database password */
define('DB_PASSWORD', 'wp_password');

Step: 5

Run your WordPress locally On Google App Engine

Add application by Google App Engine Launcher

Here you have to open Google App Engine launcher. Go to file menu and Click on Add existing application. Here you need to add that file which you created before (see Step: 1).When you will add this application the application path, Port and Admin port will be added here and then click on ok button. After that you have to click on Browse option of Google App Engine Launcher.Here you will see a window will be appear. Mention your Website tile, Username, password, email address here and click on Install WordPress Option. Log in it by using your user,password and theme for
WordPress.

Step: 6

Set up Cloud SQL instance

In this step you have to go your Cloud console project. There you will need to store your hosted WordPress database.If you want to set this then need to enabled billing and create a New Cloud SQL instance

Step: 7

Edit wp-config.php file to connect it in your Cloud SQL instance

Go to your wp-config.php file. of WordPress that reads define(‘DB_HOST’, ‘localhost’);and edit it with following code with notepad.

if(isset($_SERVER['SERVER_SOFTWARE']) && strpos($_SERVER['SERVER_SOFTWARE'],'Google App Engine') !== false) {
  define('DB_HOST', ':/cloudsql/YOUR_PROJECT_ID:wordpress');
}else{
  define('DB_HOST', 'localhost');
}

Here you have to put your Cloud SQL Instance ID name.After change the code save it.

Step: 8

Deploy WordPress installation to Google App Engine.

Go to your Google App Engine Launcher. Click on Deploy option. Then put your E-mali and password for Deploy application to Google.

Step: 9

Install Google App Engine Plugins for WordPress

Before run your WordPress in Google App Engine you need to install Google App Engine Plugin in your local computer.  When installation will be complete you need to deploy WordPress by Google App engine. After deployed WordPress when you will log in it by using User ID and Password you will see that Google App Engine Plugin has been inactivated there. You have to activate this plugin to run WordPress in Google App Engine  then Add a sweet able theme for WordPress in Google App Engine.

See Also

Feature and Utility for new WordPress themes

BLOGFIN © 2017