Archive for the ‘Google App Engine’ Category

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

Before you download and Setup MySQL for Google App Engine first I discuss about MySQL . A MySQL database is a web hosting database that is utilized to store site data like blog posts or user information. A MySQL database is the best linking database on the web today.A MySQL database is capable for storing any type of data that need to crate a website. It will give you a chance to rapidly store and retrieve data from the database. Different site visitor can utilize it at the same time simultaneously whenever they want to access your website. Here is some simple step you need to follow for download and setup MySQL  in your local computer before deploying in Google App Engine.In previous I have discuss about how to download and install Python and PHP SDK for Google App Engine now after install phython and PHP SDK you need to install mysql locally to deploy any type of php application like WordPress.

After install MySQL for Google App Engine locally , you also need to enable cloud SQL in your Google App Engine Account.After creating Google App Engine Cloud SQL you need to deploy your local apps or WordPress in Google App Engine. For Creating Cloud SQL you need to enable billing system and it asks about your credit/debit card details. Don’t worry, Google deduct your balance as per your uses so there is nothing to worry about high amount of deduction or its may be that its not deduct balance if your uses within free uses. You can pay as per uses in hour or daily plan.See the pricing section of Google App Engine  for more details about billing.

How to download and setup Mysql Locally

STEP: 1

At first you have to go dev.mysql.com.In download section you will see MySQL Community Server.

Setup MySQL for Google App Engine

STEP: 2

When you click on MySQL community Server, you will find download option for MySQL Installer MSI for Google App Engine SQL

Setup MySQL for Google App Engine

STEP: 3

In MySQL-installer-community section you will find another download option and click on it.

MySQL-installer

STEP: 4

Next click on just start my download option. Now MySQL will start  download in your local computer.

How to Install MySQL locally

How to Install MySQL locally

STEP: 1

Before install Google Apps Database locally , you have to Download and install .NET Framework to run this MySQL.When install MySQL you will see different option such as Install Products, About MySQL and Resources. You have to click on Install MySQL Product option.Then check mark the I accept the license terms and click Next button.

STEP: 2

Then you have to select Connect to Internet and Fetch Update information. Click Next option and click again Next option

STEP: 3

Here you will see different selected option such as python, Microsoft.NET Framework, Microsoft Visual C++ which will be installed before the installed MySQL server

STEP: 4

In this step you will see different product which will be installed except one product.

STEP: 5

In this step you will see MySQL Server Configuration. Here put your MySQL Root Password and then click on Next option

STEP: 6

In this step you will see MySQL Configuration Overview. You have to click on Next Option.At last you have to click on Finish Option.

Web Hosting with Google : Hosting a website on Google App Engine. Initially, it ought to be more reliable when your site will get served through Google’s own data centers.When you feel that you have a low traffic website and do not want to spend more money for web hosting then You will get 1 GB free space for HTML web page, images and others file. You will get also 1 GB bandwidth per day. You can extant your bandwidth and space as per your uses to Hosting with Google. For extension of your bandwidth you have to pay per uses.

When you create a simple html website , you need to store data for your website.Then you can pay for storage data in different web hosting company. This web hosting companies provides you storage space in their server and you can transfer PHP, HTML files and others files using FTP or C panel or z panel. To hosting with Google App Engine works in same way but need not to transfer any file.

Host Website on Google App Engine

Step to Upload a Website on Google App Engine:

Hosting with Google is very simple.There are some step to host website on Google App Engine

Step: 1

You have to Go appengine.google.com and create a new application. If you have never used App Engine before and you will create new application then you might be asked to verify your mobile phone number.

Step: 2

When you will create application, you have to give your application name . This name should be unique and may only include lowercase alphabets and digits. As example our app is “WordPressblogfin”.

Step: 3

In this step you have to download and install python and App Enigne SDK

1) Download and Install Python <python.org>
2) Download and install App Enigne SDK from <code.google.com>

Step: 4

You have to Download and unzip this file <site.zip> in any place on your desktop. In this file we see a basic website with HTML pages, images and CSS that we will try to host with Google App Engine.

Step: 5

Then open the app.yaml file with notepad and Here you have to replace the word ‘WordPressblogfin’ with the application identifier which you have created in earlier step (Step: 2). Save the changes.

Step: 6

Final step for Hosting with Google : In this step you have to deploy or upload your website to Google App Engine. Go to start Menu> Open Google App Engine Launcher Program > Choose file > Add existing application and brows to the folder where you unzipped the website.

Hit the deploy or upload button to host Website on Google App Engine , input your Google Account credentials and within seconds, your website should become available online at your unnique app.appspot.com. Later, if you want to add or want to modify any web page then you have to press Deploy option and your new /edited files will be uploaded to App Engine.

When you host Website on Google App Engine it will be hosted a sub-domain of appspot.com but you can register a web domain with Google Apps and map the App Engine website to your own domain.You can install any php application like WordPress or joomla instead of  any simple html site.To install wordpress in Google App Engine you need to deploy your WordPress project and also need a mysql database in App Engine.