Google Cloud Platform

Connect as ROOT via SFTP on Google Cloud

If you are using FTP or Sftp as normal user on Google Cloud then you are losing your precious time. 

By connects as root user via SFTP, You can save half of your time on google cloud. 

You can access and modify any file you want, never face permission denied error again.

Let’s get started,

Here are the steps for this tutorials,

  • Generate SSH keypairs
  • Add Public key to metadata
  • Modify SSH setting on your Linux VM. 
  • Setup a SFTP client on your Desktop or MAC.

Want Exclusive Tutorials?

Step 1: Generate SSH keypairs

The first step is to create the key pair (Public key and private key) with “root” username on Your Pc or mac.

For windows,

Open puttygen  and  click on generate button. Then type “root” on key comment field. After that click the “save private key” button and save the private key on your desktop. Next, copy the public key.

If you need detail or step by steps guide then follow this blog post.

For Mac,

 On Mac OS , navigate to Go >> Utilities >> Applications >> Terminal.

 Then, execute the command below to generate public and private keys.

ssh-keygen -t rsa -C root -f ~/Desktop/id_rsa

-t rsa = To generate RSA keys.

-f ~/Desktop/id_rsa = “-f ” command is to store those file in a particular directory. Here I  want to store those SSH keys pair in Desktop folder as id_rsa (names of the ssh key file).

Execute that command below to copy the public key.

pbcopy < ~/Desktop/id_rsa.pub

Step 2: Add Public key to Metadata

Now, Log in to Google cloud account. Then, Click on the hamburger menu in the upper left-hand corner of your Google Cloud Platform dashboard. After that, navigate to Compute Engine >> Metadata >> SSH keys.

Now,  Click on Add item and Paste the  Public key which you copied from the previous step. Then  click on the save button.

If you need detail or step by steps guide then follow this blog post.

Step 3: Modify SSH setting on Linux VM.

After you have added the public key in  Google cloud metadata, Navigate to VM Instances. Next click on the “SSH” to open the ssh terminal. You also can use putty for this job.

Now it is time to edit the SSH config file  to allow remote root login. By default, Remote root login is disabled.

Execute this command to edit the ssh config file.

sudo nano /etc/ssh/sshd_config

There are two option for you to choose,  either you can use remote root login with root password or without root password. I recommand you to use it with root password.

It’s up to you whether you want to use password or not.

With root password:

Within that file, find the line that includes PermitRootLogin and modify it to ensure that users can only connect with their SSH key and root password:

/etc/ssh/sshd_config
PermitRootLogin yes 

After that, save the file by pressing  ctrl+o then ctrl+x or ctrl+x >> y >> enter.

Next, To put these changes into effect:

sudo systemctl reload sshd.service

For without root password,

Within that file, find the line that includes PermitRootLogin and modify it to ensure that users can only connect with their SSH key:

/etc/ssh/sshd_config
PermitRootLogin without-password

After that, save the file by pressing ctrl+o then ctrl+x or ctrl+x >> y >> enter.

Next, To put these changes into effect:

sudo systemctl reload sshd.service

Step 4: Setup a SFTP client on Your Destop or MAC.

To complete this step you should have already download and setup a Sftp client on your windows or mac pc.

If you don’t know how to do it then follow this blog and install application such as  Filezilla, Winscp, Cyberduck.

Now, Browse and select the private key (which you save by following the first step) from your pc.

In the above image I am using Filezilla and adding the private key which was created by puttygen application.

For, With root password:

As you can see on the above Image I typed my root password in the ‘password’ field.

If you don’t know your root password then follow this blog.

For, without root password:

If you have changed the ssh config setting to ‘without-password’ then you don’t need to use a password on the  ‘password’ field. Just type root on the user field and click on the connect button.

In the above image I successfully connected as root via SFTP on google cloud VM.

Now it is your time!

I tried my best to provide you a complete tutorial on how to connect as root via SFTP  on Google Cloud. I hope you liked it.

If you need help just drop a comment.

If you benefited from this tutorial, and would like to support my work, please like my Facebook page.

Thanks,

3 Ways to Solve Sftp or Ftp "Permission denied" on Google Cloud

If you are getting permission denied errors while transferring or editing files over SFTP or FTP  then you are in the right place.

In this Article you will find 3 ways to deal with those annoying problems.

Before starting this tutorial, you should have already configured an sFTP client to work with your VM on Google Cloud Platform.

So let’s get started.

Contents

1. Cause for the permission denied error.

First it is not a bug or system error, it is a mistake which you are making. You are trying to access a file without having proper permissions.

Let me explain a bit, In Linux OS system every file or folder belong to some user and groups. This type of system is there for better security. Unauthorized users and groups can not modify or ever read  a file or directory. Only the ROOT user have the privilege to access any file or folder in the systems,  other user cannot access root user’s files or folders. But root user can access any other users file or folders.

Now back to the cause of the problem,  when you log in to your Google cloud VM via SSH Sftp using software like filezilla, winscp, cyberduck  you’re using a username which does not have that particular file or folder access authority.

NOW, what is the solution? 

There are 3 ways you can avoid this error. 1) Use root user, root has the highest access authority, you will never face this error if you log in as root. 2) Change that file or directory permission to all user. 3) logged as the user of that file or directory.

 

2. Error---

a) Google Cloud Filezilla permission denied error.

If you are seeing this error below,

Error /...  : open for write:permission denied

Error File transfer failed

It means that you don’t have a proper permission to modify or upload that files.

To solve the permission error problem follow the below tutorial.

b) Google Cloud Winscp permission denied error.

When you are trying to upload or modify something and an error pop-up like the above image.

Error,

Permission denied.
Error code: 3
Error message from server: Permission denied.

It means that you don’t have proper access permission on that files or folders.

To solve the permission error problem follow the below tutorial.

a) Google Cloud Cyberduck permission denied error.

Permission denied. Please contact your web hosting service provider for assistance.

41 OPENDIR
42 READDIR
43 READDIR
44 CLOSE
45 OPEN

If you saw a error like the above , It means that you don’t have  access permission to modify that file.

To solve the permission error problem follow the below tutorial.

1st Solution : Upload and move files to desire location.

As I told you earlier,  normally only the owner of the file or directory can access that file or directory.

When you update your metadata on google cloud dashboard, Google cloud create a new user on Linux VM. And the user’s default directory is under /home/your-ssh-public-key user-name.

So, If you upload a file there and later move the file to your desire  destination then you don’t face permission denied error.

 

a) Upload the file

Noted down or remember the user id which you are using to connect via SFTP.

Using your SFTP client, go to /home/your-user-id. In the above Image I am using filezilla ftp SFTP client, and my sftp user id is “username”.

Upload a file in your /home/your-user-id directory.

In the above image I uploaded a png image in /home/username directory.

b) Move the file to desire directory

Login to your google cloud account and click the hamburger menu in the upper left-hand corner of the screen.Next goto Compute Engine. Then goto VM Instances. After that click on SSH button.

Now execute the below command on your terminal.

cd /home/your-user-id

Check the available files

sudo ls

Now move the file to your desire directory

sudo mv /path/to/location

In the above image I am moveing  siteyaar-logo.pnp to /opt/bitnami/apps/htdocs directory.

Now open your SFTP client and check the file.

2nd Solution : Login as root user while using Sftp clients

If you ask me, Login as root user while using Sftp or ftp clients is the best way to use your Google cloud’s VM.

Root user  has the privilege of accessing all the other user’s files. So when using as root user, you will never face the permission denied error again.

This fix will work with any Ftp or  Sftp clients such as filezilla, winscp , cyberduck etc.

Login as root user while using Sftp is a topic of it own, that is why I wrote a separate blog of it. Here is the link.

3rd Solution : Change the file or folder permission

By changing file or directory(folder) permission, you can easily fix you permission denied problem. But if you don’t use it property it can leave a door open for hackers.

Every other website on google suggest you to use these methods but i don’t recommand it, it is unproductive and time-consuming.  I recommand you to use 1st solution.

The process goes like this 1)check the file or directory permission, 2)change the permission to 777, 3) upload or modify a file, 4) change the permission to default.

By using 2)and 3) can solve your problem.

But You should  change the permission to default after the process  for better security.

a) Open SSH terminal

Login to your Google cloud account and click the hamburger menu in the upper left-hand corner of the screen. Next go to Compute Engine. Then go to VM Instances. After that click on SSH button.

b) Check the file or directory default permission

Execute the below command to get the default permission number for that particular file.

sudo stat -c %a  path/to/file/location

In the above Image I am checking the permission of wp-config.php file.

Execute the below command to get the default permission number for that particular directory.

sudo stat -c %a  path/to/directory/location

In the above Image I am checking the permission of htdocs directory.

c) b) Change the file or directory permission to 777

Now, execute the command to chage the permition 777.

sudo chmod 777 /path/to/file/location

In the above Image I am changing the wp-config.php permission to 777.  The number 777 means anyone can use or modify that file.

Now, execute the command to change the permission 777.

sudo chmod 777 /path/to/directory/location

In the above Image I am changing the htdocs directory  permission to 777.  The number 777 means  that now anyone can upload  files to that directory .

d) Upload or modify files

After, you have changed the permission to 777, now it is time to upload or modify that file or directory.

In the above image I am trying to modify wp-config.php using Filezilla SFTP FTP client.

e) Change the file or directory permission to default permission

Now change the file or directory to its default permission. It will close the security hole, which you created by changing it permission to all(777).

Execute the below command,

sudo chmod default-permission-number /path/to/location

Warning: If you use “-R” with chmod command it will change all the files to 777 in  a directory.  Don’t use it if you don’t have an idea about WordPress file and folder permission structure.

4th Solution : Login as bitnami (For bitnami WordPress user)

This trick only work on bitnami WordPress. On bitnami WordPress  all the file under /opt/bitnami is owned by bitnami, so if you use bitnami as  user name while login via sftp or ftp, you can avoid the error.

a) Use bitnami as username while creating ssh keys

Create an RSA SSH key pair using puttygen and type bitnami in the Key comment section. If you don’t know how to create ssh key pair, then follow the tutorial in the link.

b) Connect to sftp using bitnami user name

Now, add the public key to your VM instances Metadata or SSH key section. If you don’t know how to does it then follow the link. 

After that open you SFTP ftp client and connect to google VM using ‘bitnami’ as user.

Now it is your time!

I tried my best to provide you a complete tutorial to fix permission denied error on Google Cloud. I hope you liked it.

If you need help just drop a comment.

If you benefited from this tutorial, and would like to support my work, please like my Facebook page.

Thanks,

How to Host and Install Bitnami WordPress on Google Cloud (2019)

In just 5 minutes, you will learn all necessary hosting and installation details about Bitnami WordPress on google cloud platform.

So, Let’s get started.

Host Bitnami WordPress on Google Cloud

If you familiar with google cloud then you already know that GCP has multiple version of WordPress, among them Bitnami WordPress is the best options for beginners. It comes with pre-configure security settings which is recommended for your WordPress website.

Because google cloud is a cloud platform you have to configure every thing by yourself. You can find many tutorials which will taught you how to install or launch bitnami WordPress on Google Could but never give you an answer on how to use bitnami WordPress as a primary hosting platform.

To host Bitnami WordPress on you have to follow the steps,

For simplicity, I break down those steps into multiple posts.

Follow the below tutorials to Launch Bitnami WordPress on Google Cloud.

How To Install Bitnami WordPress On Google Cloud

Installing Bitnami WordPress on GCP is one of the easiest part of this tutorial. Just few clicks here and there and you install Bitnami on Google Cloud.

To install Bitnami WordPress on google cloud follow the steps,

  1. Login to Google Cloud Platform
  2. Launch Bitnami WordPress
  3. Configure Your Virtual Machine
  4. Login to Bitnami WordPress.
  5. Disable Bitnami banner

That all you need to install Bitnami on google cloud.
So let’s get started.

1. Login To Google Cloud Platform

If you don’t have a Google cloud account click here and create a new account. 

After that, Login to your Google Cloud Console.

2. Launch Bitnami WordPress

On the upper left-hand corner of your screen, Click the Hamburger menu.

After that, Click and Open The Marketplace.

Next, Type ‘Bitnami WordPress’ on the search bar and press Enter. 

As you can see on the image that Google Cloud has multiple versions of bitnami WordPress.

Click on the link (button) which has those words- ” WordPress Crafted by Bitnami”. 

Next, Click on the ‘Launch on Computer Engine’ button to deploy the bitnami WordPress on Google Cloud.

3. Configure your Virtual Machine

Now carefully select a zone.

Google has their  cloud  servers in all over the world. They divided the geographical location  as ‘Regions’. Each region is subdivided into several zones. For example, the us-central1 region in the central United States has zones us-central1-a, us-central1-b, us-central1-c, and us-central1-f. For more information, click here.

Now choose your computer engine as per your budget or need.

Now chose you Boot Disk Type.  Stander Persistent Disk  is  Mechanical type hard disk  thus it is much slower than SSD Persistent Disk. Go for SSD Persistent Disk.

Make sure to check the boxes to allow HTTP and HTTPS traffic.

Click Deploy  To install your server. It will take some time (5-10 m).

4. Login To Bitnami WordPress

Click on the ‘Log into admin panel’ and use the Admin user and Admin password to login into your WordPress admin panel.

5. Disable Bitnami banner

This step is optional, If you annoyed by the bitnami banner, on the bottom right corner of your screen just follow the below step to remove it.

At first, Open the SSH terminal by clicking the SSH button.

Then execute the  following commands to remove the bitnami banner.

sudo /opt/bitnami/apps/wordpress/bnconfig --disable_banner 1

Restart the Web Server.

sudo /opt/bitnami/ctlscript.sh restart apache

FAQs

What is Bitnami?

Bitnami is a 3rd party  Application provider. Their Application Catalog contains a growing list of 140+ trusted, prepackaged applications and development run times ready-to-run anywhere. Choose from single VMs, multi-tier applications, container images, or Kubernetes Helm charts.

Forbes stated, It is a kind of like the Boy Scout who helps the little old lady cross the street.

Bitnami WordPress  is a great way to start your WordPress website. Since it has pre-configured settings, your work is cut short and you can avoid the headaches that come with configuring. Their pre-configured settings are base on industry’s best security practices.

What is Bitnami WordPress Stack?

Bitnami is providing you all necessary library of installers or software packages to run a WordPress website on a Google cloud VM instances, which they called as Bitnami WordPress Stack.

Bitnami WordPress stack contains Ghostscript, Apache, ImageMagick, lego, MySQL, OpenSSL, PHP, phpMyAdmin, SQLite, Varnish, WordPress, WP-CLI etc software packages.

Bitnami WordPress Stacks:

There are  about four different WordPress Stacks are  available in google cloud.

WordPress Multisite Certified by Bitnami: This version can host and manage multiple websites from the same WordPress instance. These websites can all have unique domain names and can be customized by their owners, while sharing assets such as themes and plugins that are made available by the server admin.

WordPress with NGINX and SSL Certified by Bitnami: This version run on NGINX web server application. Other three  are run on Apache web server.

Bitnami WordPress Multi-Tier: Multi-Tier versions is for large website which have separate database servers.

You need minimum 3 VM instances to run this version.

How to Migrate WordPress to Google Cloud [2019]

If you want to know how to migrate WordPress to google cloud, Definitely this post will help you.

There are multiple ways, you can transfer WordPress to google cloud. But in this post you will learn about two methods.

  1. Manual WordPress migration method.
  2. WordPress’ migration using a plugin.

Before you start this tutorial, you should have lunch a WordPress on google cloud platform. Here is the post (WordPress on Google Cloud: The Definitive Guide) which will help you in this regard.

Contents

FAQs,

What is WordPress migration?

If I simply put this, WordPress migration is the process of moving  your hole WordPress website from one server to another without affecting its functionality. If you have a WordPress website, and want to move it on google cloud platform, then WordPress migration  is the way of achieving it. You can move your WordPress manually or by using a free or paid WordPress plugin.

How safe it is?

WordPress is nothing like a typical software which you might install in your PC. Your hole WordPress website is a stack of files which is stored in a folder. And your data such as login user, password etc. are stored in MySQL data base which you can access through myPhpAdmin panel. To migrate your WordPress to Google cloud server you have to move your WordPress folder and MySQL data to new GCP sever, that’s all. If you don’t mess it up, The migration process is petty much safe.

How to transfer my WordPress to google cloud platform?

In the above image I tried my best to give you a graphical view of WordPress migration. As I told you already your WordPress website is stored in a folder and your data is stored in MySQL data base, if you move those  to new server and point your DNS to new server, then You will successfully transfer your WordPress to Google Cloud.

Manual vs Plugin (WordPress Migration):

If you  ask me, what is the best way of transferring WordPress to new server ?  I would say manual migration is better, though the process is little complicated than plugins but you will have exact copy of yours WordPress. I recommend you to use plugins when you also wanted to change your domain name. Plugins normally skip unnecessary file such as cache files, but if the plugins not properly updated it may skip important files.

Here what happen when I use all those three processes on my WordPress website :
My WordPress folder is =1.01 GB
Manual process zip is =605.08 MB.
Duplicator Plugins created a transfer file which is 190 MB.
All in one migrate created a transfer file which around 400 MB.
 As you can see plugins do skip some unnecessary files.
***note, don’t compare the file size  of Duplicator with All-in-one. The process of installing WordPress is different that why their file size is different.

Migrate WordPress to Google Cloud Manually :

To migrate WordPress to google cloud you have to follow those basic steps below.

  1. Compress (Zip) your WordPress files folders.
  2. Create a copy of your MySQL database.
  3. Upload WordPress .zip file and MySQL .sql file to google cloud server.
  4. Point your DNS to google cloud.

Though the first step is “compress WordPress files” but 

On your existing hosting server:

Step 1: Compress WordPress files

Though the first step is “compress WordPress files” but our main object here is to transfer your WordPress files to google cloud. Your WordPress website can have over 2000-3000 files, so  If  you don’t compress those files, it will be a time-consuming process. The best way to compress your WordPress files is to create a .zip file out of it.

If you are using Web Panels such as CPanel, Plesk , CWP, etc then you don’t need to install any extra application. But if you don’t have any web panel then you have to install zip on your server.

For web panel users:

Login to your existing hosting account, navigate to the File Manager, and into the folder with the WordPress files. Compress (zip) all your WordPress files.

For CPanel users:

Login to your existing cPanel account, then navigate to File manager.

After that open the folder “www” which should be store in your home directory

If your cpanel hosting account is configured with multiple domain names, then you can find multiple wordpress folder in your home directory.

As you can see on my cpanel account I  set up multiple domains that’s why I have multiple WordPress folders in my /home directory.

Next, Select all the files and folders (in www directory)  and press the right button of your mouse. After that click on compress.

As you can see I created an example-com.zip file in my www directory which have my all WordPress files and folders.

Backup WordPress:

Now you can easily download the zip file by opening the below URL on your web browser.

http://your-domain-name/example-com.zip

eg. https://www.siteyaar.com/siteyaar.zip

Note: Please change the your-domain-name to your domain name and example-com.zip to your .zip file name.

Compress file without using Web panels:

If you don’t have any web panels such as cpanel, plesk  then you have to install zip application on your hosting servers.

To install zip program execute the command on your Linux server  terminal.

On Debian or Ubuntu Linux:

sudo apt-get install zip

If you are useing Red Hat Linux/Fedora/CentOS then,

sudo yum install zip

After you successfully installed zip, the next step is to create a zip archive, containing all of your necessary WordPress files.

Some time people face problem finding their WordPress files. The default location is /var/www/html, But if you are using any installer or third party OS manager such as bitnami then you WordPress files might stored in a different location.

To create a WordPress zip file execute the command below:

sudo cd /var/www/html
sudo zip -r give-a-name.zip *

The above command will create a zip file on your html (website ) directory. You can download the zip file by opening the below URL on your browser.

http://your-domain-name/example-com.zip
eg. https://www.siteyaar.com/siteyaar.zip

Note: Please change the your-domain-name to your domain name and example-com.zip to your .zip file name.

Step 2: Export The MySQL database:

I already told you that MySQL database is a key part of your WordPress website, It stores all of your important data such as passwords, logging details, post and page details etc. Without MySQL database your website does not open.

To migrate WordPress to Google cloud  you have to export an exact copy of your database to google cloud. There are multiple ways to do that but in this tutorial I will show you about three methods.

Here the three methods:

  • 1) Export database using myPhpAdmin.
  • 2) Export database using a free WordPress Plugin.
  • 3) Export database using terminal (command line).

1#. Export database using myPhpAdmin.

MyPhpAdmin is a very popular database manager program. If you are using cPanel, then definitely you will find it on your cpanel admin console.

If you could not find myPhpAdmin then ask your hosting provider about it, they definitely will help you. 

 

For Cpanel users :

Login to your cPanel account and navigate to Database >> phpMyAdmin.

If you are not using any web panel then you have login to phpMyAdmin using your root MySQL credentials.

Next, Select the database that contains your WordPress installation from the list on the left-hand sidebar.

Once you selected the database click on the export tab from the top navigation menu.

Select the ‘Export method’ as  Quick, after that choose the export ‘Format as SQL. Next click the ‘Go’ button to begin the export process. After the process is completed, a file will be downloaded to your local computer.

2#. Export Your database using a free WordPress Plugin

Login to your existing WordPress account and navigate to Plugins >> Add Plugins, Then install and activate the UpdraftPlus WordPress Backup plugins.

After you have activated the UpdraftPlus Plugin, Go to ‘Backup/Restore, Then click the Backup Now button.

Next, select only the first option which is ‘Include your database in the backup(…)’. After that, click the Backup Now button. 

After the backup process is completed, Click the Database button to download the SQL database file.

3#. Export the database using Command Line (Terminal)

If you have terminal access then database migration is an easy task. If you are using VPS or Dedicated server then surely you can access  command line, but if you are using shared hosting then you have to take permission from your hosting provider.

Open your server’s terminal then execute the following commands to complete the export process.

mysql -u root -p

The above command will ask you a password, enter the root MySQL password.

mysql> SHOW DATABASES;

The above command will show all the available databases.

mysql> EXIT; 

If don’t want any hassle of downloading and uploading the SQL file then you should save the file on  your  existing website’s root directory.

The default location of your public HTML root directory is /var/www/html or  /var/www/html/wordpress.

Go to your public root directory by executing this command:

cd /var/www/html

After that, execute the command to create database SQL export file.

sudo mysqldump -u -p --opt your-database-name > give-a-file-name.sql
How to Download the SQL database file? If you save the sql file on your plublic root directory then open the below link in you local computer brouser.
http://your-domain-name/your-sql-file-name.sql

eg, http://www.siteyaar.com/siteyaar.sql
You also can use FTP or SFTP to downoad the sql file.

On Google Cloud Server:

After you successfully created .zip and .sql (database file) on your existing website’s root directory, now is the time to configure your Google cloud WordPress.

To migrate WordPress to google cloud follow the GCP WordPress configuration steps:

  • Create and import MySQL database.
  • Import your exiting WordPress and configure your wp-config.php.

Step3: Create New MySQL database:

To complete your WordPress migration on google cloud you have to create a new MySQL database and then upload your existing data s to that new database.

Below, I will show you two different ways of completing the process.

Using myPhpAdmin:

If you are using Google click to deploy WordPress then you can access phpMyAdmin thorogh your domain name eg, http://example.com/phpmyadmin, but bitnami WordPress user only can access phpMyAdmin through puTTy SSH tunneling. 

Step 1: Create New Database

Login to phyMyAdmin using your MySQL root credentials.

Next, Click on the ‘New’ button from the top left-hand corner.

On the ‘Create database’ field, give a new database name then choose the utf8_general_ci. After that, click the Create button.

Step 2: Import your existing database.

Next, click on the new database and navigate to ‘Import’ from the top navigation menu.

To import your existing database, click on Browse and select the SQL file which you have  downloaded in the previous step. After that, click the ‘Go’ button.

Step 3: Create a new database user

Now, go to ‘Privileges’ from the top navigation menu. Next click on ‘Add use account’ button.

Next, type a new user name on the ‘Username’ field. Select ‘local’ from ‘Host name’. After that type a strong password.

Make sure, you enable  the ‘Grand all privileges on database ‘your-created-database-name’.

Lastly, click the ‘Go’ button to create a new user.

Using SSH Terminal:

Login to your Google cloud console and navigate to Compute Engine >> VM Instances. Click the SSH button.

On the SSH terminal execute the following commands:

To open MySQL monitor,

sudo mysql – u root -p

You will be asked for password, you have to enter your MySQL root password.

To create new database execute this command below:

mysql> CREATE DATABASE give-a-database-name CHARACTER SET utf8 COLLATE utf8_general_ci;

To create a new user execute the command:

mysql > CREATE USER 'wp_wordpres'@'localhost' IDENTIFIED BY 'enter new password';

To grant all permition to the new user,execute the command:

mysql> GRANT ALL ON example.* TO 'wp_wordpress'@'localhost';

.mysql> FLUSH PRIVILEGES;

mysql> EXIT;

Step 4: Import your existing database.

1#. Upload The Data

To import  the database file execute the command:

cd ~/

wget http://your-domain-name/your-sql-file-name.sql

---OR---

Click the settings’ icon from the right top hand corner and go to Upload file option. Next select the SQL file.

2#. Import the data tables to your new database

On your ssh terminal execute the command:

sudo mysql -u root -p new-created-database-name < your-uploaded-sql-filename

Step 5: Import your exiting WordPress and configure your wp-config.php

On your SSH terminal execute the following commands:

Navigate to public root directory:

#for google click to deploy

cd /var/www/html

#For bitnami wordpress

cd /opt/bitnami/apps/wordpress/htdocs

Remove the existing WP files

Execute the following  command to remove the existing WordPress files from your Google cloud.

sudo rm -rf  *

Upload the compress zip file

If you save the compress zip file in public root directory of your existing WordPress then execute the command below,  Otherwise you have to upload it through FTP or SFTP.

sudo wget http://your-domain-name/your-zip-archive-name

Unzip the files

To unzip the file type the below command and press enter.

sudo apt-get install -y zip unzip

sudo unzip your-zip-archive-name.zip

Edit wp-config.php

sudo nano wp-config.php

Execute the above command and update the DB_NAMES, DB_USER, DB_PASSWORD with new database name, user and password details.

Next, use your down arrow button to scroll down.

Change the WP_SITEURL and WP_HOME  to,

Option 1,

define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] . '/');
define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] . '/');

Option 2,

define('WP_SITEURL', 'http://35.256.45.4/');
define('WP_HOME', 'http://35.256.45.4/');

After you pointed your DNS to google Cloud external IP address change it to like this,

define('WP_SITEURL', 'http://www.siteyaar.com/');
define('WP_HOME', 'http://www.siteyaar.com/');

To save the changes press CTRL+O then CTRL+X or  CTRL+X  then type Y and ENTER.

Restart Apache and MySQL

Lastly, restart the Apache and MySQL server.

For google click to deploy,

sudo systemctl restart apache2
sudo systemctl restart mysql

For Bitnami wordpress,

sudo /opt/bitnami/ctlscript.sh restart apache
sudo /opt/bitnami/ctlscript.sh restart mysql

Migrate WordPress to Google Cloud using All-in-One WP Migration plugin:

All-in-One WP Migration plugin is one of the best WordPress migration plugin available in the market. It can transfer your existing WordPress to new server with just three, four clicks. 

Only problem, you could face with this plugin is the 512 MB restriction. You can not import more than 512 MB with the free version of this plugin. The paid version is available at the cost of $69 (lifetime).

On existing WordPress:

Login to your existing WordPress website, head over to “Add Plugins” and download the All-in-One WP Migration plugin.

Activate the All-in-One WP Migration plugin. After that navigate to Export To >File. Then download and save the export file on your computer.

Ignore this step if you don’t want to change your existing domain name.

If you want to change your domain name then click on “ADD”, Then place your current domain name and new domain name. After that create your export file.

On Google Cloud WordPress:

Now login to your new WordPress website which is in google cloud platform. After that download the All-in-One WP Migration plugin and go to Import > Import From > File. Select the export file that you downloaded in the previous step.

NOTE: By default, on the Free version of  All-in-One WP Migration plugin, only allows a maximum file upload size of 100 MB. You can increase it to 512 MB by installing another free plugin.

If your maximum upload file size is 100 MB or less than 100 MB, then download and install the All-in-One WP Migration File Extension plugin.

Activate the All-in-One WP Migration File Extension plugin.

All-in-One WP Migration File Extension plugin will increase the 100 MB cap to 512 MB.

Migrate WordPress to Google Cloud using Duplicator plugin:

On existing WordPress:

On your existing WordPress, head over to “ADD Plugin” section and Install the Duplicator plugin.

After you have installed and activated Duplicator, navigate to the Duplicator >> Packages and click on the ‘Create New’ button in the top right corner.

After that, click the ‘Next’ button. And follow the steps to Crete your migration package.

Make sure that your scan results don’t have any RED mark or error. Next, Click the Build button.

This process will take several minutes to complete, the processing time is depended on your existing server CPU power and website total size.

Once the Build process is complete, you’ll see download options for Installer and Archive package. If you click the One click Download button, it will download both the files on your Computer.

After you have downloaded the installer.php and *archive.zip  files, go to your browser’s download section and copy and save the archive.zip file link.

On Google Cloud WordPress:

Login to your Google cloud console and navigate to COMPUTE ENGINE > VM INSTANCES. Next click on the SSH button to open the terminal. There are another options to SSH into google cloud. Check out this article to learn more.

The first thing you need to take care of is MySQL Database. You have two options, You can use your existing MySQL database (on google cloud) or you can create a new MySQL database.

If you want to create new database, then follow the MySQL database create section on ‘How to Manually Migrate WordPress to Google Cloud:’.

How to use your existing MySQL Database on google cloud?

To use your existing MySQL database you have to note down DB_NAME (Database name), DB_USER(database username), DB_PASSWORD (database user password), DB_HOST (database host) from your wp-config.php file.

For Google click to deploy WordPress users:

Open the SSH terminal, execute the command below:

cd /var/www/html
sudo nano wp-config.php

For Bitnami WordPress users:

Open the SSH terminal and execute the following commands below:

cd /opt/bitnami/apps/wordpress/htdocs
sudo nano wp-config.php

2#. Empty your root WordPress directory.

Go to  SSH terminal  and execute the following commands:

On click to deploy WordPress

cd /var/www/html
sudo rm -rf *

On Bitnami WordPress

cd /opt/bitnami/apps/wordpress/htdocs
sudo rm -rf *

3#. Upload Installer.php

On the right top corner of your Google cloud web ssh terminal, Click the setting logo button. After that click the upload file button and upload the installer.php file.

After that execute the following commands:

On click to deploy WordPress,

sudo mv ~/installer.php /var/www/html/

On Bitnami WordPress,

sudo mv ~/installer.php /opt/bitnami/apps/wordpress/htdocs

4#. Upload archive.zip file:

You can use SFTP OR FTP to upload the archive zip file, but here I will show you a little easier way of doing it. I already told you to copy the archive.zip URL, here is the time to use it.

On click to deploy WordPress,

cd /var/www/html/
sudo wget paste-the-archive.zip-url

On Bitnami WordPress,

cd /opt/bitnami/apps/wordpress/htdocs
sudo wget paste-the-archive.zip-url

5#. Start the Duplicator Migration Process

Go to your Google Cloud Console panel and navigate to Compute Engine > VM Instances, and copy your External IP address.

After that open the below link on your browser.

Your -external-IP/installer.php
eg,  35.255.187.62/installer.php

The Duplicator will run a few tests and show you “pass” next to archive and validation tests, 

You need to check the terms & conditions checkbox and continue by clicking on the Next button.

Now, Duplicator will be asked you to enter your MySQL database details.

Now, enter the database details which you noted down from wp-config.php in the previous step. If you created a new data base then enter the details of that database.

You can click on the ‘Test Database’ button to make sure you entered the correct information.

After that click on ‘Next’.

Now, Duplicator will ask you to update site URL. Don’t change the URL to your domain name, unless you point your DNS to google cloud VM external IP address.

I recommend you to test the migrated website thoroughly, before you point the DNS to google cloud.

You can now login to your WordPress site on the  Google cloud.

Update Your Domain Name Servers (DNS)

At this point, you have created a complete copy of your WordPress website on google cloud platform which you can access through your VM’s External IP address. 

To access your Google cloud WordPress through your domain, you have to points your DNS to Google Cloud VM Instances external IP address.

If your existing hosting provider is a manage host such as a2hosting, siteground, namechape, godady etc, then it is more likely you are using their default DNS server.

Though you can use their DNS server for testing purposes but I don’t recommend using it as primary DNS server, because when your subscription package ended they might delete your IP records from their DNS server.

Not recommended: How to use your existing provider DNS server?

Login to your cPanel and navigate to DOMAINS >> Zone Editor >> Manage. After that change the “A”  record to google cloud external IP address.

The recommended way:

To update your domain, I  Recommend you to switch your DNS nameservers to Cloudflare/AWS DNS (Router 53)/Google Cloud DNS. You also can use your domain register default DNS server, but they are much slower than the recommended ones.

For the sake of this guide, I will be showing you how to change DNS nameservers with GoDaddy, NameCheap.

Depending on your domain registrar, the screenshots may look different. However, the basis concept and functionality is same.

On GoDaddy

Login to your GoDaddy account and then navigate to  Domain Manager >> DNS. After that, scroll down to ‘Nameservers’.

Option 1: Use your domain registrar DNS Server

To use your domain registrar (here godaddy) DNS server as your primary DNS server select ‘Default’ from ‘Choose your new nameserver type’ field.

After that, click on save button and reload the page from your web browser.

After the page is  reloaded , you will see some new options. 

Now, Click the pencil logo, on your right-hand side to edit the ‘A’ record.

Next, place your Google cloud  server IP address on ‘Points  to’ field. Then click the save button. 

@ mean your domain name.

Option 2: Use third party DNS Server

To set up with third party DNS provider  such as Cloudflare(as DNS), google cloud DNS, AWS route 53 etc, select custom from ‘Choose your new nameserver type’ field. After that, click on save button.

To complete your set up you have to add ‘A’ record from your DNS providers admin console.

On NameCheap

Login to your NameCheap account, then navigate to Domain list >> Domain. After that scroll down to ‘NAMESERVERS’.

Option 1: Use your domain registrar DNS Server

To use your default Namecheap DNS server, choose the ‘Namecheap BasicDNS’ from NAMESERVERS field. After that click on the right logo to save the setting.

Next, navigate to Advanced DNS and add or update the/a ‘A’ record to google cloud external IP Address.

‘@’ represent your domain name.

Option 2: Use third party DNS Server

Image: We are using Google Cloud DNS as our DNS server.

To set up with third party DNS provider  such as Cloudflare(as DNS), google cloud DNS, AWS route 53 etc, select Custom DNS from ‘NAMESERVERS’ field and add nameservers. After that, click on the right logo to save the settings.

To complete your set up you have to add ‘A’ record from your DNS providers admin console.

Use Cloudflare as DNS server

Nowadays, Cloudflare is a very popular CDN provider around website owners. You may use Cloudflare as a CDN but what you don’t know about is, you can use Cloudflare as  a DNS provider.

Login to your Cloudflare account and then click on add a new site. After that  copy the NS records, and place the NS records on your domains registrar’s nameserver field.

Next, Click the DNS button from the to navigation menu.

NOW, Click on ‘Add record’, and select the Type as A, Name as @, on IPv4 address field place your server IP address. Then click the save button.

After that, add an another ‘A’ record for www subdomain.

Now Click on Orange cloud logo button (under ‘Proxy status’) to use Cloudflare as a DNS provider.

Google Cloud DNS:  The Definitive Guide [2019]

In this article you will learn about Google Cloud DNS and How to set up Google Cloud DNS on your website.

If you are newbie then don’t worry I am going in-depth on DNS and Google Cloud DNS, So let’s get started.

Join Us

Facebook

Twitter

YouTube

The biggest problem is 75% people don’t understand DNS or domain name system, they know little here and there that exactly same situation I was before. To give you a definite answer I already wrote an article on DNS. But here I am giving you a little summary.

What is DNS or domain name system ?

DNS is a system which find the IP Address of a website (domain).
Domain name e.g. www.google.com is just like your smartphone contact name and IP address is like phone number.
Can you call someone with just contact name, of course not you can’t, you need a phone number, just like you need an IP Address to visit a website. There are billions of websites and every hour thousands of new website are created.  The systems which store and manage that huge data of  Domain names and IP addresses is called Domain Name System or DNS.

What is Google Cloud DNS?

On google cloud platform google providing you a service for storing and publishing IP addresses and other records of your Domain. 
Simply putting Google is running a DNS server and you can Store your DNS zone records on their server. And by the way you also can create your own DNS server (not good for performance) click here to know more.

How Google Cloud DNS Work?

DNS Resolver: DNS resolver which you might install in your Windows or Routers Network settings, e.g. google public DNS (8.8.8.8), Open DNS(208.67.222.222) Cloudflare Public DNS(1.1.1.1), your ISP DNS etc. 

When you are trying open a website on your browser, DNS resolver job is to track down the IP records and give it back to you.

DNS Root Nameserver: There are only 13 root nameserver around the world. When the resolver sends a query to DNS root nameserver, the root server then responds to the resolver with the IP address of a Top Level Domain (TLD) DNS server (such as .com or .net or .org), which stores the information for its domains. When searching for example.net, our request is pointed toward the .net TLD nameserver.

DNS TLD Nameserver: The resolver then makes a request to the .net TLD. The TLD server then responds with the IP address of the Google Cloud DNS nameserver, example.net.

You can update TLD nameserver records of your domain by changing nameserver records from your domain registrar website.

Google Cloud DNS: Lastly the resolver makes a request to Google Cloud DNS. And Google Cloud DNS responds with the IP address of your website server.

 This is how Google Cloud DNS works. I hope you understand if not then please place a comment in the comment section below.

Why Google Cloud DNS?

Now you’re thinking why bother using Google Cloud DNS. Yes you are right you don’t need to use it but you should use a fast DNS service for your website. Fast and retaible DNS is good for your site because it decreases  latency and improve SEO of your website. Google Cloud DNS is one of the best DNS Service Provider in this industry. Others are AWS cloud DNS, Cloudflare DNS etc.

Google Cloud DNS Pricing.

Google Cloud DNS will charge you per month  for per zone (per domain name), and you also pay for queries against your zones.

Here the price table of Google Cloud DNS:

How much it will cost to host a website using Google Cloud DNS?

GCP Cloud DNS price is base on two different factors, the numbers of zones and the DNS queries (per month).

You just need one zone for one website. If you want to set up DNS for 5 different domains then you will need 5 zone records. And the DNS queries are proportional to your website monthly visitors.

Here is some typical examples of DNS pricing. 

For a website which has 200000 monthly visitors, Google Cloud DNS  cost will be around $0.28 per month.

Here is an example of a website which has 200000 monthly visitors and also enable personalize CDN service.

E.g. Domain name: example.com

E.g. CDN name cdn.example.com

Then for every page visit you will have two DNS queries. Your Google Cloud DNS price will be $0.36 per month.

Want Exclusive Tutorials?

How to set up Google Cloud DNS?

To set up GCP DNS, Login to your Google Cloud Console and follow these steps below.

  1. Create a new DNS zone on Google Cloud.
  2. Update your TLD Nameserver for your domain registrar website.
  3. Find and copy your web server IP address.
  4. Add your IP address and other records to GCP.

Let’s get started.

Create a New DNS Zone on Google Cloud Platform:

Click on the hamburger menu in the upper left-hand corner of your Google Cloud Platform dashboard. After that navigate to NETWORKING >> NETWORK SERVICES >> CLOUD DNS.

Then click on “Create zone”.

After that select “Public” from Zone type field. Then type a Zone name. Place your Domain name on the DNS name field. Next click on Create button.

Those are the nameservers which you have to update or modify from your domain registrar website. Copy these NS records one by one. 

Update Your TLD Nameserver.

As you already know, that your domain registrar website is connected to the TLD Nameserver. When you  Change the Nameserver records from your domain registrar site, TLD server also get updated, BUT it can take up to 48 hours.

Here I am showing you how to update your  NS records from GoDaddy and Namecheap website. If your domain registrar is different from those two, then place a comment or search it on Google.

If you register your domain from GoDaddy, then follow the steps below:

Login to your GoDaddy account. Then navigate to Domain Manager >> DNS >> Manage Zones.

Scroll down, Then click on the “Change” button on the Nameservers field.

After that, Select “Custom” from the “Choose your new nameserver type” section. Then, In the Nameserver field place the NS records which you copied earlier.

If you register your domain from Namecheap, then follow the steps below:

Login to you Namecheap account. Then, navigate to Domain list >> Domain. Next Select Custom DNS from Nameserver section.

Select custom DNS and place the nameserver records which you copied from Google Cloud DNS.

Copy your web server IP address:

Many people do not know where to find their web server IP address, Do not worry it happens when you are new in this field. Follow the steps below to Find your web server IP Address.

If you don’t have any web server on Google Cloud, then follow any of those two posts:

  1. WordPress on Google Cloud: The Definitive Guide
  2. WordPress Multisite on Google Cloud: A to Z Installation Guide

If you are hosting your website on manage hosting providers such as GoDaddy, a2hosting, Siteground, Namecheap, Bluehost e.t.c, then login to your cPanel.

And copy your web server IP address from Dedicated IP Address field.

If you are hosting your website on Google Cloud Platform, then follow the steps below.

Click on the hamburger menu in the upper left-hand corner of your Google Cloud Platform dashboard. Then navigate to Compute Engine >> VM Instances.

The External IP is your web server IP address. Copy the External IP.

Add IP and others records to Google Cloud DNS:

Now go back to Google Cloud DNS. Click on the “Add record set”.

Select “A” from the “Resource record type”. Then leave the “DNS name” field empty. Place your web server IP address on the “IPv4 address” field. Lastly click on “Create”.

Just like the previous step, again click on the “Add record set”. Then  type “WWW” in the DNS name field. Place your web server IP on IPv4 address field. Then click on create.

This step is completely optional, only follow it if you have email mail server.

Select  MX from Resource record type field. Then replace the mx1.privateemail.com and  mx2.privateemail.com to your  email server. Lastly leave the DNS name section blank and click on “Create”.

Here is an image of what looks like when you successfully configure your DNS records.

Now it is your time!

I tried my best to provide you a complete tutorial on  Google Cloud DNS. I hope you liked it.

If you need help just drop a comment.

If you benefited from this tutorial, and would like to support my work, please like my Facebook page.

Thanks,

If you like our content, please consider buying us a coffee. Thank you for your support!

Google Cloud FTP and SFTP Setup: The Definitive Guide [2019]

Share on facebook
Share on twitter

Do you want to transfer files from your computer (PC) to Google Cloud Instances ?  Then don’t worry I am here to help you.

In this tutorial you will learn How to upload and download files from Windows or Mac PC to Google Cloud Instances via SFTP.

How to transfer File to Google Cloud Instances?

The first obstacle you’ll face after setting up a VM instance is how to transfer files to your Google Cloud VM. It is very obvious, because google cloud does not have any shiny option on their dashboard. The basic transfer option is hidden in SSH section of your VM Instances.

Here is a picture of it. This basic option,  will  frustrate you, it is slow  and annoying. 

Other than the basic option there are three ways which you can follow to transfer files to Google Cloud.

First, using Google Cloud SDK Tools. But that said this option is worse than before, for a newbie. You have to execute command to transfer a simple file.

Second, using FTP (File Transfer Protocol), but Google Cloud  VM instance does not come with a pre-installed FTP server, so you have to set up an FTP server, in order to connect to Google Cloud using FTP. Here is a blog of mine which help you to Set up an FTP server on GCP.

Third, using SFTP (SSH File Transfer Protocol) which we are going to discuss in the blog. SFTP is more secure than FTP and because Google Cloud instance came with SSH, you don’t need to install anything on your VM instance to transfer files using SFTP.

So In this blog I am going to show you how you can transfer files to Google Cloud using FTP / SFTP client like Filezilla, Winscp, Cyberduck, etc  on your PC (Window or macOS).

What is different between FTP and SFTP?

FTP stands for “File Transfer Protocol”. And SFTP stands for “SSH File Transfer Protocol” OR “Secure File Transfer Protocol”.

The main disadvantage of using FTP protocol is security. FTP uses two separate channels, both of which are unencrypted, this means that the information from either of the channel can be intercepted and accessed.

SFTP ensures that data is securely transferred using a private and safe data stream.

It is wise to not have a huge security loop hole in your server, that is why you should use only SFTP rather than Ftp. And by the way Google Cloud does give a click ready ftp setup option.

What is Public and Private keys.

To set up Sftp you need to generate SSH keys pair. These keys pair will help you to encrypt and decrypt data.

Public key: You will add or copy this key to your Google Cloud Metadata. This key will encrypt data which can then only be read by the person who holds the corresponding private key.

Private key: This key file should only remains within your PC. Only a user in possession of a private key that corresponds to the public key at the server will be able to authenticate successfully.

What is Filezilla?

FileZilla is a free software, cross-platform FTP / SFTP application, Two different version of it is available one is Filezilla client and another Filezilla server.

You will be using Filezilla client in this tutorial.

Filezilla client is available for Windows and macOS.

What is Winscr?

WinSCP (Windows Secure Copy) is a free and open-source SFTP, FTP, WebDAV, Amazon S3 and SCP client for Microsoft Windows. Its main function is secure file transfer between a local and a remote computer. Beyond this, WinSCP offers basic file manager and file synchronization functionality. 

It is not available for macOS.

If you are a windows’ user, then I recommend you to use Winscp.

What is Cyberduck?

Cyberduck is widely used by the macOS user. It  is an open-source client for FTP and SFTP, WebDAV, and cloud storage (OpenStack Swift, Amazon S3, Backblaze B2 and Microsoft Azure), available for macOS and Windows (as of version 4.0) licensed under the GPL.

For Windows PC:

If you are a windows user then the easiest way to generate RSA keys is through PuttyGen. Yes you can generate  public and private key with other application e.g.. Google SDK etc.

If  you already setup SSH clients like PuTTy ,Google Cloud SDK  then you don’t need to generate new keys. You can use your old public and private keys.

Generate public and private Keys

To generate Public and private RSA key follow these steps below:

  1. Download and install PuTTy.
  2. Generate Public and private keys using Puttygen.
  3. Add Public key to Google Cloud.
    • Use one public key for only one VM Instances
      OR
    • Use one public key for all the VM Instances.

1. Download and install PuTTy.

Firstly, you need to do is to download Putty. HERE is the link to Download putty.

Next Step is to install putty on your computer.

2. Generate Public and private keys using Puttygen.

Now click on your window button. Then search and open PuTTYgen to generate Public and Private keys.

Click on “generate” and move your mouse to create public and private keys.

I recommended you  to change the key comment field to something recognizable and easy to type, as this will become a user name later!

Save the private key. Later, This private key will be needed to configure putty.

Copy the Public key

I recommended you to also save the public key by clicking on “Save public key” button. 

Join Us

Facebook

Twitter

YouTube

Want Exclusive Tutorials?

3. Add Public key to Google Cloud.

After your SSH key Files have been generated, You have to add your SSH public key file in your Google Cloud Project or Instances Metadata section.

You can use one SSH keys pair for all the available VM Instances or one SSH keys pair for only one Instances.

3.1 Use one public key for only one Vm Instances

To add SSH Public key to only a specific VM Instances follow the steps below.

Click on the hamburger menu in the upper left-hand corner of your Google Cloud Platform dashboard.

After that navigate to Compute Engine >> VM Instances.

Open the setting section by clicking over the name of your VM instance.

Here I am running a Debian 9.9 WordPress server. It does not matter what you are running.

Click on the edit Button.

After that scroll down and click on the “Show and edit” Button.

You need to paste the Public key which you copied earlier from the puttygen application.

3.2 Use one public key for all Vm Instances

To use one  SSH Public key for all of your VM Instances follow the steps below.

In these steps you will learn how to add an SSH key to Project Metadata.

Login to your Google cloud console. After that from the hamburger menu in the upper left-hand corner of your Google Cloud Platform dashboard, navigate to Compute Engine >> Metadata >> SSH keys.

After that Click on Add item and Paste the  Public key which you copied from the puttygen application. Then  click on the save button.

The metadata public key will work for all the VM instances. You do not need to add to change keys for every VM instances.

Google Cloud Sftp setup with Filezilla.

To set up Filezilla client on your windows PC follow the steps below.

Those are Steps for this tutorial.

  1. Download and Install Filezilla.
  2. Configure Filezilla.
  3. Connect to Google Cloud.
  4. Troubleshooting: Can not upload or edit files.

1. Download and Install Filezilla.

Goto the link below and download a suitable version of filezilla application for your 64bit or 32 bit windows pc.

DOWNLOAD: Filezilla Client.
After you download the filezilla client run it on your windows PC.

2. Configure Filezilla.

After you installed Filezilla Client, Open it and navigate to Edit >> Settings.

Then Click on SFTP. After that click on Add key file. And select the private key file which you saved from PuttyGen. Click on “OK” button to save the settings.

Now navigate to File >> Site Manager.

After that click on New Site  and give a name. Then click on the Protocol and choose “SFTP – SSH File Transfer Protocol.


Copy your External IP and place it on the Host Section (step 3 in this image).

In the username field, type your PuTTyGen key comment.

Then click on OK button to save the setting.

3. Connect to Google Cloud.

To access your VM Instances files navigate to File >> Site Manager. Then click on Connect button.

Here what look like when  you’ve connected successfully.

4. Troubleshooting: Can not upload or edit files.

If you are seeing this error below

Error /...  : open for write:permission denied

Error File transfer failed

It means that you don’t have a proper permission to modify or upload your files. You have to change the file or folder permission to 777. Click here to know how to change the permission.

Google Cloud Sftp setup with Winscp.

Here are the steps to set up Winscp FTP/ Sftp Client on your Google Cloud VM Instances.

  1. Download and install Winscp.
  2. Configure Winscp
  3. Transfer file to Google Cloud.
  4. Troubleshooting : Can’t  upload or modify files and folders on winscp.

Firstly, Download Winscp. Here the link to download Winscp

Next, install Winscp on your windows pc.

After you have installed successfully, open the Winscp.

A login setup field will pop up if not then navigate to.

Firstly, Click on the “Advances” . Then navigate to SSH >> Authentication. After that on the Private key file field select the public key which you generated from PuTTyGen. Next Click on OK.



Secondly, Choose the SFTP from the File Protocol dropdown menu.

Thirdly, Type the External IP Address of your VM Instances in the Host name field.

Fourthly, Place your puttygen key comment in the User name field.

After all those steps click on Login.

If you have successfully connected then you can see a screen like the above image.

When you are trying to upload or modify something and an error popup like the above image.

Error,

Permission denied.
Error code: 3
Error message from server: Permission denied.

It means that you don’t have proper access permission on that files or folders.
You have to change the permissions. Click here to know how to change the permission.




Google Cloud Sftp setup with Cyberduck.

Open the that link here and download Cyberduck Application.

Then Install Cyberduck on your windows PC.

Click on the Open Connection button on your upper left-hand corner.

To configure Cyberduck follows the steps below,

1st step: Select the SFTP from the drop down menu.

2nd step: Type the external IP Address of your VM Instances in the SERVER field.

3rd step: Type your puttygen key comment in the username field.

4th steps: Click on Choose. And select the private key which you generated from puttygen.

5th step: Click on Connect button.

Click on allow to connect via Sftp.

If you have successfully connected with Cyberduck , you can see a  screen like this.

Permission denied. Please contact your web hosting service provider for assistance.

41 OPENDIR
42 READDIR
43 READDIR
44 CLOSE
45 OPEN

If you saw a error like the above , It means that you have to change file or folder permission to access it. Click here to know how to change the permission.




For Mac Os:

Generate Public and Private key

To transfer files to your Google Cloud Instances, You have to generate Public and private SSH key files. In Mac, you don’t need any fancy 3rd party application to generate SSH keys because Mac OS Support SSH naively.

You have to execute some command using your mac default terminal.
That’s all.

If you already have SSH Keys pair you can use that too!

Note: If you followed our “SSH into Google Cloud: The Definitive Guide [2019]” tutorial, then your SSH key pair may stored in ~/.ssh folder. For some reason filezilla can’t access hidden files. So you have to move or generate new SSH files.

Execute this command to move files.

mv ~/.ssh/is_rsa ~/Desktop
mv ~/.ssh/is_rsa.pub ~/Desktop

Or change the .ssh to ssh by executing this command.

mv ~/.ssh ~/ssh

Generate SSH key pair:

On your Mac OS , navigate to Go >> Utilities >> Applications >> Terminal.

Execute that command below to generate public and private keys.

ssh-keygen -t rsa -C give-a-name -f ~/Desktop/id_rsa

-t rsa = To generate RSA keys.

-C ****** = It is your user-name.

-f ~/Desktop/id_rsa = “-f ” command is to store those file in a particular directory. Here I  want to store those SSH keys pair in Desktop folder as id_rsa (names of the ssh key file).

Execute that command below to copy the public key.

pbcopy < ~/Desktop/id_rsa.pub

Add Public key to Google Cloud.

After your SSH key Files have been generated, You have to add your SSH public key file in your Google Cloud Project or Instances Metadata section.

You can use one SSH keys pair for all the available VM Instances or one SSH keys pair for only one Instances.

Use one public key for only one Vm Instances

To add SSH Public key to only a specific VM Instances follow the steps below.

Click on the hamburger menu in the upper left-hand corner of your Google Cloud Platform dashboard.

After that navigate to Compute Engine >> VM Instances

Open the setting section by clicking over the name of your VM instance.

Here I am running a Debian 9.9 WordPress server. It does not matter what you are running.

Click on the edit Button.

After that scroll down and click on the “Show and edit” Button.

You need to paste the Public key which you copied by executing pbcopy command.

After that click on save.

3.2 Use one public key for all Vm Instances

To use one  SSH Public key for all of your VM Instances follow the steps below.

In these steps you will learn how to add an SSH key to Project Metadata.

Login to your Google cloud console. After that from the hamburger menu in the upper left-hand corner of your Google Cloud Platform dashboard, navigate to Compute Engine >> Metadata >> SSH keys.

After that Click on Add item and Paste the  Public key which you copied by executing pbcopy command in mac terminal. Then  click on the save button.

The metadata public key will work for all the VM instances. You do not need to add to change keys for every VM instances.

Google Cloud Sftp setup with Filezilla.

To set up Filezilla Client on your Mac OS, you have downloaded it.

Open that link here on your browser and download Filezilla Client for you mac.

After that install Filezilla Client on your Mac Os.

Open the filezilla on your Mac PC. Then navigate to Edit >> Settings.. .

After that click on SFTP, Then click on Add key file.

Next, Select the id_rsa (private key file) file and then click open.

Click on the OK button to save the settings.

After that navigate to File >> Site Manager.

Follow the steps below to configure Site manager in filezilla.

First step: Click on new site and give a name.

Second Step: Choose SFTP from the Protocol drop down menu.

Third Step: Open your Google Cloud Dashboard then navigate to Compute Engine >> VM Instances and copy you External IP Address. After that paste it on the Host field. 

Fourth step: Type the user name.  (-C  *****).

Fifth step: Click on Connect button.

After clicking on connect button, an Unknown host key popup will show up, just click on the ok button. 

Here what looks like after you successfully connected to google cloud platform using Filezilla.

If you see “Permission Denied “or “Could not start transfer” type of error while files transfer. This means you don’t have proper permission to modify those files. You have change the permission to 777. Click here to know how to change the permission.

Google Cloud Sftp setup with Cyberduck.

Download: Cyberduck

Open the above link on your web browser and download Cyberduck. Then Install it on your Mac.

To configure Cyberduck on Man, Click on Open Connect on the left hand upper corner.

Choose  SFTP (SSH File Transfer Protocol) from the drop down menu.

After that type the external IP Address of your Google Cloud VM.

Then TYPE the user name  (-C  *****) in the Username Field.

Next, Click on the SSH PRIVATE key and  Select the private key file.

Finally, click on Connect button.

Click On  Allow Button to Connect via SFTP.

Here what looks like after you have successfully connected.

Upload Failed

Permission denied. Please contact your web hosting service provider for assistance.

If you saw an error like the above, It means that you have to change file or folder permission to access it. Click here to know  how to change the permission.

Troubleshooting: Can not upload or edit files.

If your permission get denied when you are trying to upload or edit a file, then surely I can help you.

Basically, these problems arrived because of “Linux user and group permissions”. 

If  you want a quick solution then just change the file or folder permission using chmod  command (click here), it will fix your problem.

But if you want to learn in-depth or better solutions for this problem, then read this blog –

3 Ways to Solve Sftp or Ftp “Permission denied” on Google Cloud

How to change file or folder permission on google cloud?

Login to your Google Cloud console account, after that navigate to VM Instances.

Then Click on SSH button.

If you want to edit or modify only a file then execute this command below:

sudo chmod 777 /your-file-location

If you want to change all the files permission(within a directory) then execute this command below:

sudo chmod -R 777 /the-location of the directory /

This will solve the permmision denied problem.

Now it is your time!

I tried my best to provide you a complete tutorial on FTP / SFTP for you Google Cloud. I hope you liked it.

If you need help just drop a comment.

If you benefited from this tutorial, and would like to support my work, please like my Facebook page.

Thanks,

If you like our content, please consider buying us a coffee. Thank you for your support!

SSH into Google Cloud: The Definitive Guide [2019]

In this post you will learn about how to SSH into Google Cloud Platform Vm instances.

After this tutorial you can connect via SSH into Google cloud by using Windows or Mac Os or Linux Operating system.

Basic FAQs:

What is SSH ?

Secure Shell (SSH) is a cryptographic network protocol for operating network services securely over an unsecured network. Typical applications include remote command-line, login, and remote command execution, but any network service can be secured with SSH. by Wikipedia.

So, Simpally, SSH help you to Connect and Control you remote server , Operating system over an secure network. An SSH server, by default, listens on the standard Transmission Control Protocol (TCP) port 22

What is Private and Public key ?

If you want to connect via ssh into Google Cloud ,Then you have to generate Private and Public keys.

Public key: You will transfer this key to a server, which you want to connect via SSH. Eg Google Cloud Vm Instances.

Private key: Private keys which are known only to the owner. You should not share this key to anyone. Eg. You local Computer.

Join Us

Facebook

Twitter

YouTube

Want Exclusive Tutorials?

SSH into Google Cloud using Web Console SSH.

If you want to execute some code you don’t need any fancy SSH client setup. Google Cloud Platform has built in SSH, Which you can access through your web browser.

How to access Google cloud console SSH ?

Login to Your Google cloud platform account. Then go to Console. On the right hand corner click the hamburger button. 

Now hover on Compute Engine and Click on VM Instances.

Then Click on the SSH button to SSH into your google cloud server.

Here on my VM Instances I already set up a Google Click to deploy WordPress. By clicking on SSH I can execute Command on that particular server.

For Windows

SSH into Google Cloud using PuTTy.

PuTTY  is a free and open-source terminal emulator , serial console and network file transfer application. Simply if you want to connect and execute commands on a remote Linux/Unix server, You will have to use PuTTY software. It supports several network protocols, including SCP, SSH, Telnet, rlogin, and raw socket connection. It can also connect to a serial port.

Steps:

  1. Download Putty.
  2. Install Putty on Your PC.
  3. Generate Public and Private Keys using Puttygen.
  4. Configure Google Cloud.
  5. Configure Putty.
  6. Connect via SSH into Google Cloud.

Let’s get started.

1#. Download PuTTy.

First thing you need to do is to download Putty. HERE is the link to Download putty.

2#. Install Putty on Your PC.

Next Step is to install putty on your computer.

3#. Generate Public and Private Keys using Puttygen.

Now click on your window button. Then search and open PuTTYgen to generate Public and Private keys.

Click on “generate” and move your mouse to create public and private keys.

I recommended you  to change the key comment field to something recognizable and easy to type, as this will become a user name later!

Save the private key. Later, This private key will be needed to configure putty.

Copy the Public key

I recommended you to also save the public key by clicking on ” Save public key” button. 

4#. Configure Google Cloud.

To configure Google Cloud  SSH, goto your Compute engine >> VM instances.

Open the setting section by clicking over the name of your VM instance.

Here I am running a debian 9.9 WordPress server. It does not matter what you are running.

Click on the edit Button.

After that scroll down and click on the “Show and edit” Button.

You need to paste the Public key which you copied.

After that Click on SAVE.

5#. Configure Putty.

Follow the steps below to setup your putty.

First thing you need to do is copy your VM Instance IP address.

Open Putty on your Computer. Then goto “Session” and paste the VM Instance IP address on the “HostName” section.

After that goto Connection>>Data. On the “Auto-login username” section type your “key comment“.

Now goto Connection >> SSH >> Auth. Browse and select the private key file which you already generated from puttygen. 

I recommended you to save the configuration or  you have to setup putty every time you wanna open SSH.

Click On OPEN.

6#. Connect via SSH into Google Cloud.

Just click on YES to SSH into Google Cloud.

As you can see I am connected to Google Cloud Vm Instances via SSH.

SSH into Google Cloud using Google Cloud SDK Tool.

Google develop a set of tools for Cloud Platform. It contains gcloud, gsutil, and bq command-line tools, which you can use to access Google Compute Engine, Google Cloud Storage, Google BigQuery, and other products and services from the command-line.

You can use google cloud sdk to ssh into your VM Instances.

You don’t need to generate keys or configure your instances settings.

All those things are automated in Google Cloud SDK.

Let’s get started.

Download the Google Cloud SDK . Here the link https://cloud.google.com/sdk/

Install Google Cloud SDK on you windows Pc.

After installing Google Cloud SDK, the google init terminal will open, and you will be asked to log in. Type “y” and press “enter”. Your browser will open up your Google accounts page, asking you to grant permissions for Google Cloud SDK.

When Cloud SDK ask  “do you want to configure Google Compute engine”. Type “y” and press “enter” to continue.

Next you will be prompted to select a zone. You can choose the zone that you selected when setting up your instance, But I recommended to choose “21” to not set a default zone.

After you configure your cloud sdk, go to you Google Cloud Platform dashboard. Goto Compute engine > VM Instances > SSH. Click on the “View gcloug command”

Select and copy your gcloud command.

Go back to your Google Cloud SDK terminal and paste the gcloud command. If you does not have ssh keys then the command will automatically generate public and private keys and also update you project metadata. 

The ssh keys will be stored in C:\Users\your-pc-name\.ssh directory.

After you paste your gcloud command into the SDK terminal,a another terminal will lunch.

As you can see you already connected via ssh in that terminal.

For Mac Os

SSH into Google Cloud using default mac terminal.

If you are using Mac Os then you don’t have to download any things, Because mac support SSH connection natively. 

You just need to generate two SSH keys  (public key and private key) to connect securely to your VM instances.

Steps

  1. Generate Public and Private keys using default mac terminal.
  2. Configure Your Google Cloud VM.
  3. Connect via SSH on mac.

1#. Generate Public and Private keys using default mac terminal.

Click on Utilities and after that open mac terminal.

Now execute the command below to generate public and private keys.
ssh-keygen -t rsa -C give-a-username

Leave the “Enter file in which to save the key” Blank to save those key in ~/.ssh folder.

Leave the passphrase empty.

You can check those keys by executing this command.

ls ~/.ssh

You have to copy that public key (id_rsa.pub ) and place it to google cloud metadata. 

To copy your public key execute this command:

pbcopy < ~/.ssh/id_rsa.pub

2#. Configure Your Google Cloud VM.

After the previous step login to your Google Cloud Console and go VM Instances. Click on the name of your VM instances which you want to setup ssh.

Click on edit.

After that scroll down and click on “Show and edit .

Paste your public key.

Then click on save.

3#. Connect via SSH using Mac Os.

Now open your mac terminal again and execute the command below.

ssh your-user-name@your -instances-ip

Here what looks like when you successfully connected through ssh into google cloud via mac terminal.

Did it work ?

If you need help please drop a comment.

If you benefited from this tutorial, and would like to support my work, please like my Facebook page.

Thanks,

If you like our content, please consider buying us a coffee. Thank you for your support!

Free Or Paid SSL Certificate Setup for  WordPress on Google Cloud

Want to Install SSL Certificate for a WordPress website on Google Cloud ?

Don”t worry, I am here to help you.

In this Guide you will learn about four types of SSL certificate configuration for your WordPress site on Google Cloud.

Scenario 1.

You don’t have any SSL certificate, and want a Free auto renewal letsencrypt SSL certificate.

Scenario 2.

You don’t have any SSL certificate, and want a 90 days Free Comodo SSL certificate.

Scenario 3.

You want to buy  an SSL certificate, and install it on your Google Cloud.

Scenario 4.

You already  have an SSL certificate for your domain, and want to install it on your new Google Cloud WordPress.

If you are using Bitnami WordPress on Google Cloud, you can view this SSL certificate tutorial.

Basic SSL FAQs

  1. What is SSL?
  2. Why you need SSL?
  3. Free vs Paid SSL.

Join Us

Facebook

Twitter

YouTube

Want Exclusive Tutorials?

Tutorial Steps

To Complete this tutorial, you should already have,

  1. Installed  WordPress on Google Cloud .
  2. Configured a Domain name.
  3. Reserved a Static IP.

You can follow that tutorial here to complete those steps.

Scenario 1#.

Free auto renewal letsencrypt SSL Certificate Setup for WordPress on Google Cloud:

Let’s Encrypt SSL certificates that are just as secure as current paid certificates. But if your site processing credit cards or transmitting sensitive information (such as an e-commerce site), or has a user login section, you should only use a paid Sectigo certificate. This will ensure your users that the connection is valid and secure.

There are couple of steps in this tutorial.

  1. Install certbot
  2. Generate Lets Encrypt certificate.
  3. Configure your apache server.
  4. Configure your WordPress
  5. Set up Auto Renewal. (optional)
  6. Setup Redirects. ( Optional )
  7. Troubleshooting.   

1.# Install certbot

Open your Google Cloud console and click on the hamburger logo.

After that hover on Compute Engine  and Click on VM Instances.

Click on SSH to open the terminal. You also can use Putty terminal. I already wrote a tutorial on putty. Click Here to visit it.

Now copy and paste it on your SSH terminal. It will install certbot on you Google Cloud linux server.

sudo apt-get install -y certbot python-certbot-apache -t stretch-backports

Here you  I am installing certbot on my Google Cloud WordPress Server.

2.# Generate Lets Encrypt certificate.

After installing Certbot, You need to generate Let’s Encrypt Certificate.

Copy this command and paste it on your terminal.

sudo certbot certonly --webroot -w /var/www/html/ -d your-domain-name -d www.your-domain-name 

Here I generate SSL certificate for my siteyaar.tk domain. In the bottom section of the image you can find the file directories where the SSL certificate files are stored. 

3 .# Configure your apache server.

In this section you will learn about how to setup apache server conf file.

You have to enable Mod_ssl and also give permissions to view your website through 443 port.

To edit default-ssl.conf go to your google cloud terminal, and paste the command below.

sudo nano /etc/apache2/sites-available/default-ssl.conf

Paste the following lines of code in order to give permission to your web files through  HTTPS port 443.

<Directory /var/www/html/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>

After that , scroll down by pressing down arrow of your keyboard and Place a # sign before “SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem”
“SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key”  those two files.

Here I Place a # sign before those two lines.

After that Place those lines to enable your let’s encrypt Certificate.

SSLCertificateFile "/etc/letsencrypt/live/your-domain-name/cert.pem"
SSLCertificateKeyFile "/etc/letsencrypt/live/your-domain-name/privkey.pem"
SSLCertificateChainFile "/etc/letsencrypt/live/your-domain-name/chain.pem"

To save the default-ssl.conf file press ctrl+o then ctrl+x or ctrl+x >> y >> enter.

To take effect  of your certificate changes , you need to update and restart your Apache server by executing all three of the commands listed below.

sudo a2enmod ssl
sudo a2ensite default-ssl
sudo service apache2 restart

Now open your website on your browser. Https://your-domain-name.

If any thing goes wrong just place a comment. I will help you. 

4.# Configure your WordPress.

Now login to  your WordPress and change the http to https. Then click save.

Here I changed my http://siteyaar.tk  to https://siteyaar.tk.

Congratulation you successfully install Let’s encrypt SSL certificate.

If you want to setup redirects eg. suppose anyone  visit http version of your site they will automatically redirect to https. To learn more click here.

5.# Set up Auto Renewal.

Those steps are optional. If  you to setup auto renewal function then follow the steps.

To setup your crontab file, execute the following command:

sudo crontab -e

Choose 1 to edit your crontab file with nano editor.

Then the place the following lines below:

* 3 * * 6 certbot renew && /etc/init.d/apache2 restart

The first section of the code” * 3 * * 6 ” tell your server to check for certificate renewals once per week at 3 am , and to automatically renew the certificates if they are about to expire. After adding the script, save the crontab file by pressing CTRL + X, then Y, then Enter.

Scenario 2#.

Free Comodo SSL Certificate Setup for WordPress on Google Cloud:

If want to install 90 DAYS Free Comodo Sectigo SSL certificate, then you have to follow the steps below to active and install your SSL certificate.

This tutorial is also valid for paid Comodo SSL / Namecheap SSL Certificate etc. installation.

To setup this type of SSL certificate you have to create  csr and key file using openssl.

Open your Google cloud console account on your browser. Go to Compute Engine >> VM Instances.

Click on the SSH to open cell terminal. You also can use Putty.

Follow the blog post to setup Putty on Your Google Cloud.

Execute this command:

cd /etc/apache2/sites-available

Here I want to create key and csr file in this directory /etc/apache2/sites-available. You can also use or create different directory.

To generate CSR and Key file , execute this Command below:

sudo openssl req -new -newkey rsa:2048 -nodes -keyout siteyaat_tk.key -out siteyaar_tk.csr

Change siteyaar_tk to your domain name.

Now you have to enter some informations to generate key and csr files.

Here an example for  siteyaar.tk

Country Name (2 letter code) [AU]:IN
State or Province Name (full name) [Some-State]:WB
Locality Name (eg, city) []:KOLKATA
Organization Name (eg, company) [Internet Widgits Pty Ltd]:
Organizational Unit Name (eg, section) []: BLANK
Common Name (e.g. server FQDN or YOUR name) []:siteyaar.tk OR www.siteyaar.tk 
Email Address []:[email protected]
 
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:BLANK
An optional company name []:BLANK

Choose Common Name carefully. If your site name is eg. siteyaar.com then type siteyaar.com. If your site name is www.siteyaar.com then place www.siteyaar.com.

Open nano editor and copy the lines of you csr file. Here the command:
sudo nano /etc/apache2/sites-available/siteyaar_tk.csr
Now visit https://ssl.comodo.com/free-ssl-certificate and create an account.    

Paste the CSR code into the box and Select Apache-ModSSL.

If you already setup your email address then go for the email method.

Here I showed you an alternative method for Domain Control Validation.

Select the Http CSR Hash.

For domain Control Validation you have to create a text file with the name of  MD5 value. 

Click on Show Alternative DCV information , Then click HTTP CSR Hash. Copy the text.

Now create .well-known/pki-validation directorics by executing this command:

sudo mkdir -p /var/www/html/.well-known/pki-validation

After this create a txt file using the name of MD5 value.

sudo nano /var/www/html/.well-known/pki-validation/your-MD5-value.txt

Paste the code and save it by pressing CTRL +X  Then Y Then ENTER.

Here I Complete DCV  For siteyaar.tk. You will receive the SSL Certificate on your register email address.

As you can see Here I receive the SSL certificate.  

Download it and unzip it.

On you SSH terminal, Click on Upload file. After that Upload the two files.

As you can see the uploaded files are stored in home/myserver-name.

Now move the files to /etc/apache2/sites-available directory.

Execute this Command:

sudo mv /home/your-server-name/your-domain.crt /etc/apache2/sites-available
sudo mv /home/your-server-name/your-domain.ca-bundle /etc/apache2/sites-available

Apache does not have the permission to use those SSL files you have give permission by executing the command below.

sudo chmod a+x /etc/apache2/sites-available/siteyaar_tk.key /etc/apache2/sites-available/siteyaar_tk.crt /etc/apache2/sites-available/siteyaar_tk.ca-bundle

By default Google click to deploy wordpress does not come with pre-configure Https.

To access you web file through https on port 443, You have to edit the default-ssl.conf

To edit default-ssl.conf go to your google cloud terminal, and paste the command below.

sudo nano /etc/apache2/sites-available/default-ssl.conf

Paste the following lines of code in order to give permission to your web files through  HTTPS port 443.

Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all

After that , scroll down by pressing down arrow of your keyboard and Place a # sign before “SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem”
“SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key”  those two files.

Here I Place a # sign before those two lines.

After that Place those lines to enable your COMODO SeCtigo SSL Certificate.

SSLCertificateFile "/etc/apache2/sites-available/your-domain-name.crt"
SSLCertificateKeyFile "/etc/apache2/sites-available/your-domain-name.key"
SSLCertificateChainFile "/etc/apache2/sites-available/your-domain-name.ca-bundle"

To take effect  of your certificate changes , you need to update and restart your Apache server by executing all three of the commands listed below.

sudo a2enmod ssl
sudo a2ensite default-ssl
sudo service apache2 restart

Scenario 3#.

Paid Premium SSL Certificate Setup for WordPress on Google Cloud:

It is the same steps you followed in the previous guide.

If you need help just drop a comment.

Scenario 4#.

Move and Setup SSL Certificate for WordPress on Google Cloud:

If you already had an SSL certificate Which is installed in another server. Then this guide will help you.

To install your old SSL certificate on Google Cloud WordPress , you have to move your Old KEY , CRT , CA-BUNDLE files to Google Cloud.

Drop A comment if you need help.

Here I downloaded KEY, CRT, CA-BUNDLE file from my previous server.

Go to you ssh terminal click on the setting icon on the right top corner. Then click on upload. Upload you three files which you downloaded from your old server.

Your uploaded files will be store in /home/your-account=name.

Now move those three files to a different directory. I move my files to /etc/apache2/sites-available. Here the Command:
sudo mv /home/your-server-name/your-domain.crt /etc/apache2/sites-available
sudo mv /home/your-server-name/your-domain.ca-bundle /etc/apache2/sites-available
sudo mv /home/your-server-name/your-domain.key /etc/apache2/sites-available
You can create new folder by using mkdir command.

This step is very crucial. Your google cloud wordpress (apache) server does not have the permission to access those files.

Execute this command.

 

sudo chmod a+x /etc/apache2/sites-available/siteyaar_tk.key /etc/apache2/sites-available/siteyaar_tk.crt /etc/apache2/sites-available/siteyaar_tk.ca-bundle

Change siteyaar_tk to your SSL certificate files name.

Now click here . And follow the instruction from scenario 2.

Redirect Configuration for WordPress on Google Cloud:

This step is optional. If you want permanent 301 redirect only then follow it.

What is Redirect ?

Suppos, your website name is www.example.com but some one open example.com, Redirect configuration will automatically redirect that user to www.example.com.

To configure redirect you have to place some code in 000-default.conf and default-ssl.conf.

Important: If you want to use cloudflare cdn then first visit the troubleshooting section.

Http to Https Redirect:

Every user will automatically redirect to Https version of you site.

eg. http://example.com to https://example.com.

Edit 000-default.conf  using nano.

sudo nano /etc/apache2/sites-available/000-default.conf

Then paste those lines below:

RewriteEngine On
#Enable HTTP to HTTPS redirection
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} !^(localhost|127.0.0.1)
RewriteCond %{REQUEST_URI} !^/\.well-known
RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [R,L]

Http Non-www to Https www Redirect:

Every user will automatically redirect non-www to Https www version of you site.

eg. http://example.com to https://www.example.com.

Edit 000-default.conf  using nano.

sudo nano /etc/apache2/sites-available/000-default.conf

Then paste those lines below:

RewriteEngine On
#Enable HTTP to HTTPS redirection
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} !^(localhost|127.0.0.1)
RewriteCond %{REQUEST_URI} !^/\.well-known
RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [R,L]
#Enable non-www to www redirection
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTP_HOST} !^(localhost|127.0.0.1)
RewriteCond %{REQUEST_URI} !^/\.well-known
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=permanent,L]

Edit default-ssl.conf  using nano.

sudo nano /etc/apache2/sites-available/default-ssl.conf.conf

Then paste those lines below:

RewriteEngine On
#Enable non-www to www redirection
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTP_HOST} !^(localhost|127.0.0.1)
RewriteCond %{REQUEST_URI} !^/\.well-known
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [R=permanent,L]

Http Www to Https non-www Redirect:

Every user will automatically redirect www to Https non-www version of you site.

eg. http://www.example.com to https://example.com.

Edit 000-default.conf  using nano.

sudo nano /etc/apache2/sites-available/000-default.conf

Then paste those lines below:

RewriteEngine On
#Enable HTTP to HTTPS redirection
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} !^(localhost|127.0.0.1)
RewriteCond %{REQUEST_URI} !^/\.well-known
RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [R,L]
#Enable www to non-www redirection
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteCond %{HTTP_HOST} !^(localhost|127.0.0.1)
RewriteCond %{REQUEST_URI} !^/\.well-known
RewriteRule ^(.*)$ http://%1$1 [R=permanent,L]

Edit default-ssl.conf  using nano.

sudo nano /etc/apache2/sites-available/default-ssl.conf.conf

Then paste those lines below:

RewriteEngine On
#Enable www to non-www redirection
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteCond %{HTTP_HOST} !^(localhost|127.0.0.1)
RewriteCond %{REQUEST_URI} !^/\.well-known
RewriteRule ^(.*)$ https://%1$1 [R=permanent,L]
An Example:

Just like this image you need to edit both 000-default.conf  & default-ssl.conf files.

TroubleShooting:

Cloudflare Problem:

If you use  http to https redirect while using cloudflare,this will create some problems.

You may not able to access your website.

To solve this problem you have to disable http to https redirect. Though you can use  non-www to www  and www to non-www  redirect.

Don’t use this codes or disable this codes by place a # sing.

# BEGIN: Enable HTTP to HTTPS redirection
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} !^(localhost|127.0.0.1)
RewriteCond %{REQUEST_URI} !^/\.well-known
RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [R,L]

Too many Redirects:

After following this long tutorial, you open your website and saw “Too many redirects”.

I am sure you will be mad at me. Don’t worry I am here! LOL.

Why Too many Redirects ?

If you setup two different redirects on same website (url) eg. one pointing http to https and another https to http or one pointing http to https www and another https www to http , this will create a loop.

You browser going from http to https  then https to http >> http to https ….. infinity . When this happens you will see “too many redirects” error screen.

How to solve?

For http to https redirect  change the WordPress Address URL and Site Address Url to https://.

For http non-www to https www redirect  change the WordPress Address URL and Site Address Url to https://www.

For http www to https non www redirect  change the WordPress Address URL and Site Address Url to https://.

Now it is you time!

I tried my best to provide you a complete tutorial on SSL for you Google Cloud WordPress. I hope you liked it.

If you need help just drop a comment.

If you benefited from this tutorial, and would like to support my work, please like my Facebook page.

Thanks,

If you like our content, please consider buying us a coffee. Thank you for your support!

WordPress Multisite on Google Cloud A to Z Installation Guide

Want to install  WordPress Multisite on Google Cloud Platform ? This blog is all about on that topic.

I am going show you step by step installation of “Google Click deploy” WordPress multisite on Google Cloud.

Their is another option of WordPress multisite installation on google cloud, It is “How to install Bitnami WordPress Multisite on Google Cloud”.

Though Click to deploy is Manage by Google But Bitnami WordPress Multisite is better, because it come with pre-configure security settings.

Join Us

Facebook

Twitter

YouTube

What is WordPress Multisite

WordPress Multisite allow you  run multiple websites like site.com blog.site.com , new.com etc from a single WordPress. It is the same software that powers WordPress.com.

WordPress Multisite have the power of sharing Plugin, themes acores all the website, available by server admin.

You can create numerous websites using unique domain names.

What is cost of WordPress Multisite on google cloud.

It is the same as hosting a normal WordPress on Google Cloud. I already wrote a blog about it. Here the blog “WordPress on Google Cloud: The Definitive Guide“.

In short, If you using always free F1-micro VM instances then the cost will be around $3-4.

Without always free program, For f1-micro the cost will be around $7-9.

For G1-small the cost is around $16-19.

For S1-stander the cost is around $24-32.

**All the prices I mention above are examples or demos. It can vary widely upon you uses.

Is WordPress Multisite right for You?

A WordPress multisite will  manage all your websites through a single user interface. Those Website Can have subdomain or Full domain.

You can Create user with limited authority power.

Like user Bob can access only site.com.

User John can access only new.com.

Pros,

  1. Manage and control multiple web sites through a single dashboard.
  2. Manage the subsites and grant controls to other users from a single interface.
  3. Updates to all plugins and themes can be pushed at once.

Cons,

  1.  The biggest con is WordPress Multisite doesn’t support all plugins. About 80 -90% plugins  work on multisite.
  2. All the subsites are depend on main site. That why if If the main site goes offline, all connected subsites will also become inaccessible.

Install WordPress Multisite on Google Cloud

Here I am going to show how deploy and Configure  WordPress Multisite on google cloud platform.

Step 1# Deploy WordPress Multisite:

On your Google Cloud  dashboard and click the hamburger menu in the upper left-hand corner of the screen.

Click on the Marketplace Button.

Now type  WordPress Multisite and click on enter.

Select the first one from the search result. “WordPress Multisite” Google click to Deploy.

After that Click on ” LAUNCH ON COMPUTE ENGINE”.

Step 2# Configure WordPress Multisite:

Give a Deployment name. After select  zone.

Zone is the location  of your server.

For example, the us-central1 region denotes a region in the Central United States that has zones us-central1-a, us-central1-b, us-central1-c, and us-central1-f.

Now select machine type as per your requirement.

Here is a price chart :

Type your email address. It will be your WordPress Multisite user name.

Select SSD persistent disk or Stander persistent disk.

SSD Persistent Disk: It is SSD type disk. Recommended

Standard Persistent Disk: HDD type disk. It is slower than ssd.

Enable both HTTP and HTTPS traffic.

After that,Click on Deploy. It will take some time.

WordPress MultiSite Login

You can visit your WordPress Multisite by clicking on “Site URL”.

As of now you WordPress Multisite does not have a proper domain name.

IP address you are seeing it is your server ip.

Now click on “ADMIN URL” and login to your wordpress multisite using temporary passwords.

Assign a Static IP Address on Google Cloud Platform

You have to assign a static Ip to your virtual instances (vm), or it might change after some time.

The majority of technical problems experienced by Google Cloud Platform users occur because the user failed to reserve a static IP address for their website.

Hover on VPC network, then Click on External IP addresses.

Click on Static.

Give a name.Then click on RESERVE.

WordPress Multisite: Configure your domains and subdomains.

There are three type of  domain setup Scenarios.

1st Scenario: You want multiple websites/blogs at subdomains of your primary domain example if your primary domain is 99stockbrokers.com then subdomain websites are blog.99stockbrokers.com, Cool.99stockbrokers.com, google.99stockbrokers.com.

2nd Scenario: You want multiple websites/blogs at different domains example you primary domain at example.com and another domain at mysite.com.

3rd Scenario is Combination of both first and second scenarios. 

 Let get started.

The frist thing you need to do is to point Your domains and subdomains to Google Cloud. 

HERE the steps.

1. Point Your Domains subdomains to Google Cloud .

As of now you you can access your wordpress multisite only through IP address.lets Change it.

Your present situation. Only can access you site through Ip.

After this guide. You can access your site through  Your Domain name.

What You need to do?

You have to  add or update “A” record to your domain register website or Cloudflare or Setup a dns provider like google cloud Dns.

The first step is to copy your google VM instances IP address.

Go to Vm instances and copy your External ip address.

Modify “A” record on domain register website:

here I am showing you two example for godaddy and namecheap.

If your domain register is other than those two then you have search it on google. Also You can ask me on comment section.

Godaddy.

Go to DNS Management.

For Scenario 1#.

To create a  subdomain eg. blog.99stockbrokers.com, You have type your subdomain name on the host section and your server IP to “Points to” section.

Or, You also can  type “*” on the host section.

*  means any thing before .99stockbrokers.com will resolve through you server IP.

For Scenario 2#.

For Scenario 2 Configuration , just point to domain to your server IP. 

@ means you domain name, eg. 99stockbrokers.com .

Go to dns management. Click on edit A record and past the server IP.

After yout edit . It should be look like this. The “value” should be your server IP.

If your domain registrar is namecheap then follow the steps bellow.

Go to manage section of your namecheap”s settings. 

After this go to Advance DNS  section and modify or add a “A” address.

If you already setup cloudflare for your domain, then follow the steps.

Goto Dns section and update or add “A” record.Paste your server IP.

Remember 

Some time, Change in A record can take some time. About 1-6 hours.

2. Setup your WordPress Multisite

I hope you already pointed you all domains and subdomains to your server ip.

Now login to your WordPress and go to Tools >> Network Setup.

Click on Install.

Here is the tough part, You need to modify your wp-config.php and .htaccess file through SSH terminal.

Go to VM instances on google cloud platform.

Click on SSH. And paste the command below.
sudo nano /var/www/html/wp-config.php

Paste the code line after “define (WP_allow_MULTISITE’, true);

Here the code line:

define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', false);
define('DOMAIN_CURRENT_SITE', 'Your server IP"');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);

To save the file, press ctrl+x >> Y >> enter.

Paste the command on SSH terminal.

sudo nano /var/www/html/.htaccess

Paste the Code below after “# BEGIN WordPress
” .

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]

To save the file, press ctrl+x >> Y >> enter.

Reload  and Login to Your WordPress. After that goto My site >> Network Admin >> Sites >> Add new.

For Scenario 1#.

Site Address Url: Give an appropriate folder name for your subdomain and add a Site Title .Then click on Add Site.

Eg. this is  my setup for subdomain blog.99stockrocket.com.

Now go to My site >> Network Admin >> Sites >> All sites.

Click on edit.

Change the Site Address to http://your-subdomain-name . Click on “Save  Changes.

As you can see I change my site address to my subdomain.

Now You can access your website through your subdomain.

For Scenario 2#.

Site Address Url: Give an appropriate folder name for your domain and add a Site Title .Then click on Add Site.

Eg. this is  my setup for domain stockrocket.com.

Now go to My site >> Network Admin >> Sites >> All sites.

Click on edit.

Change the Site Address to  your domain name.

Here I change my site address to my domain name stockrocket.in.

After this step You can access your website through your domain name.

For Scenario 3#.

Follow the 1st and 2nd scenarios.

Configure SSL certificate on WordPress Multisite:

Google recently announced that having an SSL certificate can boost your google page ranking.Therefore you should install SSL cert for your WordPress Multisite.

As you can see the installation of WordPress multisite on google cloud is quite a hectic task.If I create another step you might get mad at me,(lol).

That’s why I wrote a new blog on this topic.

In that blog, You can learn about two type of SSL configuretion process.

  1. FREE ,Auto renewal letsencrypt SSL Certificate installation process.
  2. Different SSL certificates for different domains ,installation process.

IF you purchased SSL certificate the second step might help you.

Configure FTP or Sftp on Google Cloud using Filezilla:

If you want access to your web files, Then you have to set up SFTP client such as  Filezilla, Winscp, Cyberduck etc.

Google does have a lame file transfer system but does not have GUI base  file manager application on their cloud platform. Therefore, you will need those applications which I mention before.

I already wrote a blog about FTP and SFTP on Google Cloud, You can check it out.

Now it is you time!

It is you time to install WordPress Multisite on Google Cloud. 

If you need help just drop a comment.

If you benefited from this tutorial, and would like to support my work, please like my Facebook page.

Thanks,

If you like our content, please consider buying us a coffee. Thank you for your support!

WordPress on Google Cloud: The Definitive Guide

Want to Host WordPress on Google Cloud Platform ?

You are in right place.

Here I am going to show step by step how to install wordpress on google cloud.

Wait  Not Only that I am also  going to give you a definitive answer on WordPress Cost on Google Cloud Platform.

In fact I am hosting my wordpress on google cloud. So why not you ?

Basic FAQs

1. What is the Google Cloud Platform?

“Google Cloud Platform (GCP), is a suite of cloud computing services that runs on the same infrastructure that Google uses internally for its end-user products, such as Google Search and YouTube.” Wikipedia.org

With the help of google cloud  you can build  anything in the modern web era. They have 90 different services under google cloud platform.

You don’t need all of them to host a simple wordpress website  on google cloud.

The services you need to host a wordpress site: Compute Engine , Persistent Disk ,Network Service Tiers, Google CDN (optional), Google Dns (optional).

2. Google Cloud Platform Free Tier.

As of now Google is providing you two types of free services.

12 month free trial :$300 free credit to get started with any GCP product. Click here to learn more.

Yes you  hear it right , Google is give you free $300 credit for 1 year(newuser).Basically You can host your wordpress on google cloud for free for a year

Always Free:

Google Cloud’s Always Free program provides limited access to many common GCP resources free of charge. Resources are provided at intervals, usually monthly. Always Free resources are not credits; they don’t accumulate or roll over from one interval to the next.

Unlike the free trial, Always Free isn’t a special program. It’s a regular part of your GCP account. Click here to learn more.

3. Cost of hosting a wordpress Website on google.

The Cost of hosting a Simple WordPress website is depend on 3 GCP resources,  Compute Engine , Persistent Disk ,Network Service Tiers . But if want external db servers,load balancers, google cdn ,google dns, etc then it varies more. 

For a simple wordpress website cost varies between $3.5-$25 per month.You can host wordpress free of cost for 1 year with google cloud free tier.

Here is the price  table of 3 main GCP resources.

3.1. Compute Engine.

Basically compute engine is a virtual machine with a v-cpu and RAM (memory).

It define how much cpu core and ram you need for your wordpress website.

Google is providing you a free f1-micro compute engine in usa  with always free program.

3.2. Persistent Disk : SSD/HDD

Persistent Disks are the storage disk where you will install your WordPress and store your web files.

Google has two types of storage disks.

Standard provisioned space: It is a HDD (Hard Disk Drive) disk.

SSD provisioned space:SSD (Solid State Drive).

You should use SSD whenever possible as it is significantly faster than HDD; that being said, it is also significantly more expensive.

3.3. Network Service Tiers.

The Network service Tiers cost is depend on your website outgoing data.Whenever some one  visit your site they download some data from your Gcp server.

 So Basically you paying  for your monthly visitors.

3.4. Google Dns. (optional)

3.5. Google CDN.(optional)

Here is some typical estimate for hosting WordPress on Google Cloud.

Example 1:For small traffic sites.

If you just beginning or you already has few smaller websites this example is perfect for you . Google always free f1-micro (usa)compute engine your Google Cloud Website Hosting Price will be around $3.45-4.00 . If you want your server other  location (not in  USA)  then you have to pay around $8-$9 per month.

Now you can not install Click to deploy WordPress on f1-micro server.

If you want f1-micro then go for Bitnami WordPress on Google Cloud.

As you can see if you use always free fi-micro server then you paying just $3-4 dollar.

Here is the price for normal f1-micro server.The price will be around $7-8 dollar.

Example 2:For medium traffic sites.

Google g1-small compute engine with 1.75 ram and 0.5 % of vcpu is enough for a medium traffic website.For this type of setup you  will be around $17-$19.

For G1-small server with 15 gb SSD and 16gb egress data ,price will be around $17.85 dollar.

Example 3:For High traffic sites.

If you have a high traffic website websites this specification is perfect for you. 

Specification: 1 virtual core /3.7gb ram /30 gb ssd storage / around  16-20 gb egress(outgoing).Your google cloud website hosting price will be around $31.24.

This a typical example of a high traffic website. Price will be around $29-32 dollar.

4. Google Cloud vs other hosting providers.

Google Cloud Platform is nothing like other manage hosting providers ex- siteground, namecheap, a2hosting, bluehost etc.

If you are familiar with cpanel By default google cloud does not provide you a cpanel.

The Main difference is you have to use command-line-interface on google cloud. But others  manage hosting providers use graphical interface such as cPanel.

5. WordPress Hosting Options

Google have main three type of wordpress installation.

WordPress Single Instance using GCP Marketplace: 

This guide is base on this type of instances.

According to Google

With one click, deploy a single instance of WordPress to Compute Engine. This is the best option for WordPress installations expecting low to medium traffic, and can be scaled by changing the instance type. Visit the page .

WordPress on Kubernetes Engine:

Normally this option is best for hosting provide such as kinsta ,wp-engine and enterprise level websites.

According to Google

Deploy a scalable version of WordPress across multiple container instances. This option is for WordPress installations expecting heavy traffic, where auto-scaling and performance are worth the increased overhead of setting up and deploying.Visit the page

WordPress on App Engine:

This option is similar to Kubernetes Engine.

According to google

And is recommended only for WordPress installations expecting variable traffic with high peak levels. and is recommended only for WordPress installations expecting variable traffic with high peak levels.Visit the page

How to Host WordPress on Google Cloud ?

To host wordpress on google you have to install it on google cloud VM instances. 

As I told you before you can host wordpress in multiple ways on google cloud platform.

In this tutorial I am going to show you Google Single Instance  “Click to deploy” wordpress installation.

Google click to deploy is Managed by Google.

But for your knowledge, you can install wordpress with different methods  and configure settings on google cloud.

Here is a list of  Google WordPress hosting on single vm instances with different configuration:

  1. Google Click to deploy WordPress multisite.
  2. Multiple  wordpress on single stack.
  3. Bitnami wordpress installation.
  4. Bitnami wordpress multisite.
  5. Bitnami multiple wordpress on single stack. 

1. Install WordPress on Google Cloud.

On your Google Cloud  dashboard and click the hamburger menu in the upper left-hand corner of the screen.

Click on the Marketplace Button.

Type wordpress on the search bar.

As you can see Google cloud has many type of wordpress-es . Don’t click on the wrong one. Click on the link(button) which has those words – “WordPress” ,” Google Click To Deploy ” , ” Virtual machines” . 

 

Click on the “LAUNCH ON COMPUTE ENGINE” link. 

2. Configure WordPress Installation.

After that chose you near by zone or where you want to deploy your server.

Now chose your compute engine as per your budget or need.It is unfortunate that now google does not give a option for f1-micro server for “Click to deploy WordPress installation” . If you want f1-micro server then go for Bitnami WordPress installation.

Now chose you Boot Disk Type.  Stander Persistent Disk  is  Mechanical type hard disk  thus it is much slower than SSD Persistent Disk. Go for SSD Persistent Disk.

Make sure to check the boxes to allow HTTP and HTTPS traffic.

Click Deploy  To install your server. It will take some time (5-10 m).

3. WordPress Site Login on Google Cloud.

If you click on your site address  you can visit your wordpress site.To login click on “Admin Url” . Your WordPress user name and pass is mention as wordpress admin user and wordpress admin password.

4. phpMyAdmin login.

Click on the link to visit your phpMyAdmin web interface.

5. How to Change myPhpAdmin Password on google cloud ?

To change your phpMyAdmin password –

      1. Click on SSH.
      2. Copy and Paste the command on your terminal.Then click enter.
    mysqladmin -u root -p password
    1. Enter your temporary password.
    2. Enter your new password.

5. How to Assign a Static IP Address on Google Cloud Platform.

You have to assign a static  Ip to your virtual instances (vm), or it might change after some time.

The majority of technical problems experienced by Google Cloud Platform users occur because the user failed to reserve a static IP address for their website.

Hover on VPC network, then Click on External IP addresses.

Click on Static.

Give a name.Then click on RESERVE.

Setup Your Domain on Google Cloud.

In this step your configuring you domain name to work with you wordpress.As of now you wordpress is only accessible through an IP address.

Lets change it to a domain name example- yoursite.com or  www.yoursite.com

The main step here is to assign a “A” or “Cname” to your google cloud ip address.

Okay , there are couple of ways to do that.

You can do that by adding or modifying “A” address on your domain register website.

OR,

If your using cloudflare or other hosting providers. You need to edit dns record.

Or use Google DNS. I already wrote a blog about it. You go that tutorial. It will add some additional cost.

First, Go to Vm instances and copy your external IP.

Modify “A” record on domain register website:

here I am showing you two example for godaddy and namecheap.

If your domain register is other than those two then you have search it on google. Also You can ask me on comment section.

Godaddy.

Go to dns management.