How to host wordpress site on google cloud ?

Host WordPress site on google cloud

WordPress is easy to use and a powerful content management system that helps people to create and manage their own websites. It's open-source software and it's very popular and used by bloggers, small businesses, and large corporations to create their websites and go online. Hosting a WordPress site on Google Cloud is the best option for website owners. they take the benefits of powerful Google Cloud hosting and used WordPress. In this article,  I can clearly explain the complete process of how to host your WordPress site on Google Cloud.

host WordPress site on google cloud in 3 easy steps.

Step 1: Create a Google Cloud Account


First you have to create create a Google Cloud account. go to the Google Cloud website and sign up from your Gmail account. and fill in your name, address, and email address. and also you have to provide a payment method, like a credit card, to pay for the services you want to use.


Step 2: Set Up a Virtual Machine


When you create your Google Cloud account, then you have to set up a virtual machine (VM) that will run your WordPress site. Follow these steps to set up a VM:


Open Your Google Cloud Console and log in to your account.

Click on the Navigation menu and select Compute Engine > VM Instances.

then Click on Create Instance button to create a new VM instance.

write a name for your VM and select your country and zone where you want it to be located ( hosting Server).

Select a machine type. For your WordPress site, a machine with at least 1 vCPU and 3.75 GB of RAM.

Select the operating system for your VM. I suggest Ubuntu because it is easy to use for WordPress.

Click on the Create button to create your VM.


Step 3: Install and Configure WordPress


When you set up your VM, then install and configure WordPress. 


For this Follow these steps:


Connect to your VM instance using SSH. select the SSH button in the VM instances to connect to your VM using a web-based terminal or use an SSH client like PuTTY.

Click on Update the packages on your VM by running the command sudo apt-get update.

Install the Apache web server, MySQL database server, and PHP by running this command sudo apt-get install apache2 MySQL-server php php-mysql.

Create Your MySQL database for your WordPress site by running the command sudo mysql -u root -p. Then select Enter the MySQL root password that you set during the MySQL installation. Once you are in the MySQL prompt, You have to create a new database by running the command CREATE DATABASE WordPress.


Create a MySQL user for your WordPress site by running the command CREATE USER 'wordpressuser'@'localhost' IDENTIFIED BY 'password';. Replace 'password' with a strong password whatever you want.

Grant privileges for new users on the WordPress database by running the command GRANT ALL PRIVILEGES ON WordPress. TO 'wordpressuser'@'localhost';.

Then Exit the MySQL prompt by running this command exit;.

Download and install WordPress by running the following commands:

cd /var/www/html

sudo curl -O https://wordpress.org/latest.tar.gz

sudo tar -xzf latest.tar.gz

sudo mv wordpress/.

sudo rm -rf wordpress latest.tar.gz

Then set your correct ownership and permissions for your WordPress files and directories by running the following commands:

sudo ch

thats all. Then Enjoy your google cloud Hosting. and run your website on WordPress with google cloud hosting easily.

Post a Comment

0 Comments