Error: "This site can’t be reached" after change domain GCP + openLiteSpeed

711 views Asked by At

Hello
First of all I want to mentioned that I'm using Google cloud platform VM instance, openLiteSpeed + wordpress site.
I'm on fly more than a year with some domain and everything works well. Today I bought a new domain and set it to my website and from this moment I can't enter to my site even if I'm using the External IP of my instance. For now I deleted all my records in DNS section to try to handle this problem and still it does not work. I also changed the virtual mapping on Listener section in openLiteSpeed dashboard. I don't have idea what todo next, I try to solve this more than 5 hours. Any suggestions how can I solve it ?

1

There are 1 answers

1
Jose Luis Delgadillo On BEST ANSWER

I reproduced your scenario in my own project-- I installed “openlitespeed-wordpress” solution.

I realised that this solution doesn't reserve an External IP, so when I stopped the instance and started it again, I wasn’t able to access my WordPress because my original IP was ephemeral, and it changed when I started my VM Instance again.

I solved this problem by modifying 2 fields in the DB, if you have the same issue you can follow the next steps:

  1. In the Google Cloud Console, go to the VM instances page to check the new IP for your openlitespeed-wordpress Instance.

  2. Use your new IP to access to your phpMyAdmin:

https://{Your-New-IP}/phpmyadmin/

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
  1. Once you have access, go to wordpress -> wp_options

enter image description here

  1. Then you edit the option name
  • siteurl
  • home

enter image description here

After this action I was able to access my site again with my New IP.

To avoid this issue in the future you could reserve your IP:

  1. In the Cloud Console, go to the VM instances page.
  2. Click the name of the instance that you want to assign an external IP to. The instance details page displays.
  3. From the instance details page, complete the following steps:

a. Click Edit.

b. Under Network interfaces, click the edit button.

enter image description here

c. Under External IP, select Static external IP address to assign to the instance.

enter image description here

d. Click Done and Save.

Also I found some documentation that might help you to troubleshoot your issue.