<span style="font-weight: 400;">Are you someone who is experiencing issues while trying to host your website on Google Cloud Platform? Then here are some expert tips to help you with getting your website hosted perfectly.</span>

<span style="font-weight: 400;">There are two means to manage the files in your web server- through FTP clients like FileZilla and through cPanel.  </span>

<span style="font-weight: 400;">Out of the two, FileZilla is an open source software and suits you if you’re low on budget. But it has some downsides too - It can handle only FTP, you can’t make bulk edits to your files, it is time consuming, etc.</span>

<span style="font-weight: 400;">cPanel on the other hand can handle mailboxes, MySQL, Cron Jobs, etc and also has a built in FTP. It’s interface makes it very easy to manage your files. However, cPanel is costly and you’ll have to pay either a monthly or yearly charge.</span>

<span style="font-weight: 400;">Before we begin, you need to take note of some key points:</span><span style="font-weight: 400;">
</span>
<ol>
 	<li style="font-weight: 400;"><span style="font-weight: 400;">Once you deploy WordPress on Google Cloud, you can only manage your files via FileZilla</span></li>
 	<li style="font-weight: 400;"><span style="font-weight: 400;">Instead, if you install cPanel first and then deploy WordPress on Google Cloud, then you can manage your files via cPanel or FileZilla.</span></li>
</ol>
<span style="font-weight: 400;">Keeping this in mind, you can choose the order of the installations detailed below.  </span>

<span style="font-weight: 400;">Here we are taking the example of a WordPress website. Follow similar steps for other websites as well.</span>

If you need professional help with hosting your website on Google Cloud, feel free to contact our <a href="https://vividreal.com/web-development/">team of expert web developers</a> who can assist you!

Now read on.

<span style="color: #00ccff;"><b>Deploying WordPress</b></span>

<span style="font-weight: 400;">1) Head on to  </span><span style="font-weight: 400;"><a href="https://console.cloud.google.com" target="_blank" rel="noopener noreferrer">Google Cloud Platform</a></span>

2) On the dashboard, click on ‘Select a Project’. In the resulting pop-up menu, click on ‘New Project’.

<img class="aligncenter size-large wp-image-2786" src="https://vividreal.com/wp-content/uploads/2018/07/2-1024x445.png" alt="" width="604" height="262" />

&nbsp;

3) Assign the project name and location and click create.

4) Navigate to ‘Marketplace’ on the left side menu of the Google Cloud Platform dashboard.

5) Now find and select ‘WordPress’ from the list.

<img class="aligncenter size-large wp-image-2787" src="https://vividreal.com/wp-content/uploads/2018/07/IMG_17072018_151651_0-1024x483.png" alt="" width="604" height="285" />

&nbsp;

6) Click ‘Launch on compute engine’.

<img class="aligncenter size-large wp-image-2788" src="https://vividreal.com/wp-content/uploads/2018/07/3-1024x513.png" alt="" width="604" height="303" />

&nbsp;

7) Then fill in the WordPress deployment form and click on ‘Deploy WordPress’.

8) Now you’ll be directed to the deployment information screen.

9) Click on the External IP address under ‘WordPress Server’ section.

10) Then tick both ‘Allow HTTP Traffic’ and ‘Allow HTTPS’ Traffic and click apply.

<span style="font-weight: 400;">11) Now enter the IP Address into your browser URL and you’ll be directed to your WordPress site.</span>

&nbsp;

<span style="color: #00ccff;"><b>Setting up FileZilla</b></span>

<span style="font-weight: 400;">Note that you won’t be able to edit the files in your web server if you don’t have root access to it. Gaining root access is easy - </span>
<ul>
 	<li style="font-weight: 400;"><span style="font-weight: 400;">In the Google Cloud Platform dashboard, navigate to ‘Compute Engine’ and then ‘VM instances’.</span></li>
 	<li style="font-weight: 400;"><span style="font-weight: 400;">Under the ‘Connect’ tab, click on ‘SSH’.</span></li>
 	<li style="font-weight: 400;"><span style="font-weight: 400;">Now the SSH terminal will appear.<img class="aligncenter size-large wp-image-2789" src="https://vividreal.com/wp-content/uploads/2018/07/4-1024x452.png" alt="" width="604" height="267" /></span></li>
</ul>
<span style="font-weight: 400;">Enter the following command to the terminal : </span>

<em><span style="font-weight: 400; color: #993300;">sudo &lt;command&gt;</span></em>

<span style="font-weight: 400;">Now you will be assigned root privileges.</span>

<span style="font-weight: 400;">To give read/write permission (777 Permission)  to your installation folder, enter the following command to the terminal:</span>

<em><span style="font-weight: 400; color: #993300;">sudo chown -R &lt;username&gt;:&lt;username&gt; .* </span></em>

&nbsp;

<span style="font-weight: 400;">1) Specify the -C flag to add a comment with your username.</span>

<em><span style="color: #993300;"><span style="font-weight: 400;">ssh-keygen -t rsa -f ~</span><span style="font-weight: 400;">/.ssh/</span><span style="font-weight: 400;">[KEY_FILENAME] -C [USERNAME]</span></span></em>

<span style="font-weight: 400;">where:</span>
<ul>
 	<li><span style="font-weight: 400;">[KEY_FILENAME] is the name that you want to use for your SSH key files. For example, a filename of my-ssh-key generates a private key file named my-ssh-key and a public key file named my-ssh-key.pub.</span></li>
 	<li><span style="font-weight: 400;">[USERNAME] is the user for whom you will apply this SSH key.</span></li>
</ul>
<ol>
 	<li style="list-style-type: none;"></li>
</ol>
&nbsp;

<span style="font-weight: 400;">This command generates a private SSH key file and a matching public SSH key with the following structure: <em><span style="color: #993300;"> </span></em></span><em><span style="font-weight: 400; color: #993300;">ssh-rsa [KEY_VALUE] [USERNAME]</span></em>

<span style="font-weight: 400;">where:</span>
<ul>
 	<li><span style="font-weight: 400;">[KEY_VALUE] is the key value that you generated.</span></li>
 	<li><span style="font-weight: 400;">[USERNAME] is the user that this key applies to.</span></li>
</ul>
<ol>
 	<li style="list-style-type: none;"></li>
</ol>
&nbsp;

<span style="font-weight: 400;"> 2) This command restricts access to your private key so that only you can read it and nobody can write to it:  </span><em><span style="color: #993300;"><span style="font-weight: 400;">chmod </span><span style="font-weight: 400;">400</span><span style="font-weight: 400;"> ~</span><span style="font-weight: 400;">/.ssh/</span><span style="font-weight: 400;">[KEY_FILENAME]</span></span></em>
<ul>
 	<li><span style="font-weight: 400;">where [KEY_FILENAME] is the name that you used for your SSH key files.</span></li>
</ul>
<span style="font-weight: 400;">3) Now, in FileZilla, click on “Quick connect” and select “STFP” as the protocol.<img class="aligncenter size-large wp-image-2790" src="https://vividreal.com/wp-content/uploads/2018/07/IMG_17072018_134728_0-1024x509.png" alt="" width="604" height="300" /></span>

&nbsp;

<span style="font-weight: 400;">4) Set the host IP Address.</span>

<span style="font-weight: 400;">5) Select “Key file” as logon type and enter the username.</span>

<span style="font-weight: 400;">6) Now select browse to locate the key file and then select the previously generated key</span>

<span style="font-weight: 400;">7) Now click “connect”.</span>

&nbsp;

<span style="color: #00ccff;"><b>Installing WHM &amp; cPanel </b></span>

<span style="font-weight: 400;">1) In Google Cloud Platform, create a new project with name and location</span>

<span style="font-weight: 400;"><img class="aligncenter size-large wp-image-2792" src="https://vividreal.com/wp-content/uploads/2018/07/IMG_17072018_115308_0-1024x223.png" alt="" width="604" height="132" /></span>

&nbsp;

<span style="font-weight: 400;"> 2) Navigate to the Compute Engine section and select VM instances.</span>

<span style="font-weight: 400;"> 3) Select the project you created.</span>

<span style="font-weight: 400;"><img class="aligncenter size-large wp-image-2793" src="https://vividreal.com/wp-content/uploads/2018/07/IMG_17072018_115317_0-1024x489.png" alt="" width="604" height="288" /></span>

&nbsp;

<span style="font-weight: 400;">4) Now create an instance, specifying the appropriate region and zone.</span>

<span style="font-weight: 400;"><img class="aligncenter size-large wp-image-2794" src="https://vividreal.com/wp-content/uploads/2018/07/IMG_17072018_115434_0-1024x490.png" alt="" width="604" height="289" /></span>

&nbsp;

<span style="font-weight: 400;"> 5) Select “</span><b>CentOS 7</b><span style="font-weight: 400;">” as the boot disk.</span>

<span style="font-weight: 400;"><img class="aligncenter size-large wp-image-2795" src="https://vividreal.com/wp-content/uploads/2018/07/IMG_17072018_115451_0-1024x515.png" alt="" width="604" height="304" /></span>

&nbsp;

<span style="font-weight: 400;">6) Specify the disk size and disk type. Then click create.</span>

<span style="font-weight: 400;">7) Navigate to ‘Network Services’ on the left side menu of  the GCP dashboard. Then select ‘Cloud DNS’.</span>

<span style="font-weight: 400;"><img class="aligncenter size-large wp-image-2797" src="https://vividreal.com/wp-content/uploads/2018/07/5-2-1024x218.png" alt="" width="604" height="129" /></span>

&nbsp;

<span style="font-weight: 400;"> 8) Now click ‘Create zone’.</span>

<span style="font-weight: 400;"> 9) Configure the zone name, DNS name and DNSSEC and click ‘create’.</span>

<span style="font-weight: 400;">10) In the ‘VM instances’ section under  ‘Compute Engine’ on the GCP dashboard, find the instance you wish to connect to and click on ”SSH”</span>

<span style="font-weight: 400;"><img class="aligncenter size-large wp-image-2798" src="https://vividreal.com/wp-content/uploads/2018/07/IMG_17072018_134517_0-1024x364.png" alt="" width="604" height="215" /></span>

&nbsp;

<span style="font-weight: 400;">11) Now the SSH terminal window will appear. Run the following scripts in order :</span>
<ul>
 	<li><em><span style="font-weight: 400; color: #993300;"> Yum update yum install perl</span></em></li>
 	<li><span style="font-weight: 400;">  </span><em><span style="font-weight: 400; color: #993300;">Yum install wget</span></em></li>
 	<li><span style="font-weight: 400;"><em><span style="color: #993300;"> Hostname [YOUR DOMAIN ADDRESS]</span> </em> </span> <span style="font-weight: 400;">// Enter the domain address you want your site to point to in place of  [Your DOMAIN ADDRESS]</span></li>
 	<li><span style="font-weight: 400;"><em><span style="color: #993300;"> systemctl stop NetworkManager.service</span></em>  </span> <span style="font-weight: 400;">// To stop Network Manager</span></li>
 	<li><em><span style="font-weight: 400; color: #993300;"> systemctl disable NetworkManager.service </span></em></li>
 	<li><em><span style="font-weight: 400; color: #993300;"> cd /home</span></em></li>
 	<li><span style="font-weight: 400;"><em><span style="color: #993300;"> curl –o latest –L</span></em></span><em><span style="color: #993300;"><a style="color: #993300;" href="https://securedownloads.cpanel.net/latest"> <span style="font-weight: 400;">https://securedownloads.cpanel.net/latest</span></a></span></em></li>
 	<li><span style="font-weight: 400;"><em><span style="color: #993300;"> sh latest     </span></em>               </span></li>
</ul>
<span style="font-weight: 400;">Now the External IP address will be displayed on the terminal</span>

&nbsp;

<span style="font-weight: 400;">12) To set firewall rule port configuration for WHM do the following:</span>
<ul>
 	<li style="font-weight: 400;"><span style="font-weight: 400;">Navigate to VPC network at the left side menu of GCP dashboard</span></li>
 	<li style="font-weight: 400;"><span style="font-weight: 400;">Click on ‘Firewall rules’</span></li>
 	<li style="font-weight: 400;"><span style="font-weight: 400;">Click 'Create firewall'</span></li>
 	<li style="font-weight: 400;"><span style="font-weight: 400;">Set IP Address as '0.0.0.0/0'</span></li>
 	<li style="font-weight: 400;"><span style="font-weight: 400;">Assign port ‘2086’</span></li>
 	<li style="font-weight: 400;"><span style="font-weight: 400;">Click 'create'</span></li>
 	<li style="font-weight: 400;">Follow the above steps again and assign port ‘2087’.</li>
</ul>
&nbsp;

<span style="font-weight: 400;">13) To set firewall rule port configuration for cPanel do the following:</span>
<ul>
 	<li style="font-weight: 400;"><span style="font-weight: 400;">Navigate to VPC network at the left side menu of GCP dashboard</span></li>
 	<li style="font-weight: 400;"><span style="font-weight: 400;">Click on ‘Firewall rules’</span></li>
 	<li style="font-weight: 400;"><span style="font-weight: 400;">Click 'Create firewall'</span></li>
 	<li style="font-weight: 400;"><span style="font-weight: 400;">Set IP Address as '0.0.0.0/0'</span></li>
 	<li style="font-weight: 400;"><span style="font-weight: 400;">Assign port ‘2082’</span></li>
 	<li style="font-weight: 400;"><span style="font-weight: 400;">Click 'create'</span></li>
 	<li style="font-weight: 400;">Follow the above steps again and assign port ‘2083’.</li>
</ul>
&nbsp;

<span style="font-weight: 400;">14) Now you need to update the root password</span>
<ul>
 	<li style="font-weight: 400;"><span style="font-weight: 400;">Go to the SSH terminal and run the following script</span></li>
 	<li style="font-weight: 400;"><span style="color: #993300;"><em><span style="font-weight: 400;">passwd </span></em></span></li>
 	<li style="font-weight: 400;"><span style="font-weight: 400;">Enter the new password.</span></li>
</ul>
&nbsp;

<span style="font-weight: 400;">15) Click on the External IP Address displayed on the terminal. You will be redirected to WHM.  </span>

<span style="font-weight: 400;">Then l</span><span style="font-weight: 400;">ogin with the username “Root” and the password you set.</span>

<span style="font-weight: 400;">Now you can proceed to configure your server.</span>

&nbsp;

<span style="color: #00ccff;"><b>In a nutshell</b></span>

<span style="font-weight: 400;">Choosing between installing cPanel or using FileZilla to manage the files in your web server comes down to your preference and budget. If you’ll have to edit the files for any reason, going for the cPanel installation before deploying WordPress would be a better idea. </span>

&nbsp;

<span style="font-weight: 400;">Points to note: </span>
<ol>
 	<li style="font-weight: 400;"><span style="font-weight: 400;">You need </span><b>root </b><span style="font-weight: 400;">access to manage your files via FileZilla. Without the access you will not be able to make any edits to the files. This is not needed if you’re using cPanel. </span></li>
</ol>
<span style="font-weight: 400;">      2.  Always set ‘</span><b>CentOS</b><span style="font-weight: 400;">’ as the boot disk while installing cPanel.</span>

<span style="font-weight: 400;">      3. While setting up a VM instance on Google Cloud Platform, you are required to specify a region( a geographical location where you can run your resources) and a zone (an isolated location within the region). Once you specify these and create an instance, you will </span><b>NOT </b><span style="font-weight: 400;">be able to make edits to these later on.</span>

<span style="font-weight: 400;">Follow the aforementioned guidelines for an error-free website hosting!</span>

In case all of this seems confusing to you, fret not, <a href="https://vividreal.com/web-development/">our team of skilled website developers</a> can help you out! Connect with us to learn more.