I'm very unfamiliar with Google Cloud Hosting so apologies for my ignorance. I spun up a VM with Wordpress on it and pointed my DNS to the IP. The machine was shut down and when came back up was assigned a new external IP. I am no longer able to access the website even after pointing my DNS to the new IP. Anyone able to point me in the right direction on how I can fix this? I'm guessing starting with grabbing a static IP, but can anyone point me to a guide on how to obtain one and set it up? Lastly, how do I adjust my Wordpress instance to use that IP and point my DNS from an external provider to the VM. I see it's recommended to use a load balancer to increase speed but again, I'm a newbie with all of this and have no idea where to begin.
You are not able to access your WordPress because your original IP was ephemeral and it changed when you stopped the instance and started it again.
To solved this problem you can modifying 2 fields in the DB:
In the Google Cloud Console, go to the VM instances page to check the new IP for your
Use your new IP to access to your
If you don't know your credentials to access to phpMyAdmin you can get this information with the following command using ssh:
sudo sed -n 1p /home/ubuntu/.db_password
Once you have access, go to wordpress -> wp_options
Then you edit the option name
After this action you should be able to access your site again with the New IP.
Reserving a static external IP address
To avoid this issue in the future you could Reserve your IP:
- In the Cloud Console, go to the VM instances page.
- Click the name of the instance that you want to assign an external IP to. The instance details page displays.
- From the instance details page, complete the following steps:
a. Click Edit. b. Under Network interfaces, click the edit button.
c. Under External IP, select Static external IP address to assign to the instance.
d. Click Done and Save.
(Note: I'm using a fresh installation of WordPress LiteSpeed)