How to Assign Static IP Address on Google Cloud


Once you deploy your WordPress instance in Google Cloud, the first step will be to assign a static IP address to the WordPress instance. If you haven’t followed along we have installed WordPress on Google Cloud in the first part of this tutorial.

Why this is important?

Because once you reset or restart your compute engine of your WordPress instance, your public IP address will change if you haven’t reserved the static IP address to your resources.

We assume that before starting this tutorial, you already deployed WordPress to Google compute engine. If not, follow this tutorial to deploy WordPress on Google Cloud.

You have two options to assign a static IP address.

  1. Assign Existing IP Address
  2. Reserve New IP Address.

1. Assign Existing IP address

Once you have created your compute engine resource. It will have the public IP address you can keep that IP address as static IP.

The first step is to go to Google Cloud and Click on Networking => VPC Network. Here is the direct link to go to external IP address.

Google Cloud VPC network

Now you will see your created WordPress Compute Engine resources here.

Google Cloud External IP Addresses

Now change the IP address type from Ephemeral to Static. ( this will change the IP address to static IP address)

Google Cloud change to Static IP

Give the name to your static IP to distinguish between multiple static IP addresses.

Google Cloud Static IP Name

Now your resources have an IP address assigned. anytime you need IP address use this IP address to assign to the domain.

Google Cloud Static IP Address Assigned

2. Reserve New IP Address

If you don’t want to use existing public IP as static IP then you can create new Static IP.

Go to VPC network => External IP addresses and click on Reserve a static address.

Make sure you selected the region where your WordPress compute engine is running. Otherwise, it will not show up in the list.

Google Cloud Reserve Static Address

That’s all your static IP is reserved.

Static IP assignment is important when you’re deploying WordPress with Cloud Provider. Most of the cloud provider has free Static IP address if that static IP address is assigned to an instance or virtual machine.

Now you have WordPress installed in Compute Engine and assigned the IP address.

Next thing is to,

If you have any questions about this tutorial please post them as comments below.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.