2K Views

Install WordPress on Google Cloud

Introduction:

 

Here, in this blog, we will discuss about installing WordPress on Google Cloud Platform(GCP). WordPress is a free and open-source content management system based on PHP and MySQL. For installing it on GCP, you need to have a registered GCP account. First you need to setup a LAMP server to create the required environment for installation.

 

Create a VM on GCP and Setup LAMP server:

 

For installing wordpress on GCP, we need to first create a Linux VM on GCP and setup a LAMP server.

In this blog we will use the following configurations:

 

  • OS: Ubuntu 16.04
  • Database: MySQL 5.7
  • PHP: php v7.0

 

First, we need to create a Compute Engine VM on GCP along with a MySQL database on SQL service of GCP. Then you need to setup LAMP server on it for installing wordpress. You can follow my blog for the steps for creating a Compute engine VM and setting up a LAMP server on GCP.

 

Download WordPress:

 

Download the latest source code as shown below.

 

 

Configure Apache:

 

Configure the Apache with the below configuration. If you need to run the wordpress on a domain , uncomment the ServerName and ServerAlias section and update your domain name. Else you can leave it as it is.

 


 

 

Restart Apache server.

 

 

Create a MySQL Database and User:

 

Login to your MySQL server and create a user and database for your wordpress application. Change the database name, database user and password as per your need.

 

 

 

Configure WordPress:

 

Create a wp-config.php file on the document root from the sample configuration file.

 

 

Update the database details in the wp-config.php file.

 

 

Update the details of the below lines in the file.

 

 

Also update the unique phrase in the wp-config.php file to secure the installation. Find and update the “unique phrase” in the file. You can simply generate it and copy paste to update it from here.

 

 

You can also use curl command using terminal like:

 

 

Set appropriate apache permission to the files and directories.

 

Installing WordPress:

 

To install, enter the IP of the GCP VM in the web browser and hit enter. An installation page will be displayed  as below:

 

 

 

Select your preferred language and click on continue. On the next page you need to provide the information like Site title, username and password and email ID.  Note the username and password as you will need it late to login.

 

 

Provide the necessary information and click on install wordpress. On the next page, you will see a success message with the username that you entered in the previous page. Click on the login button to login to the wordpress admin. On the admin login page, enter the username and password and the admin dashboard page will be displayed as below.

 

 

Congrats, your wordpress site is now installed and you can start exploring it.

 

Stay Connected!

 

In case of any help or query, please contact us or raise a ticket at [email protected].

Tag(s) GCP
. . .

Comment

Add Your Comment

Be the first to comment.

css.php