✓ Solved

WordPress site no longer loads after restoring!!

So it begins!!

I did a snapshot restore to an existing Linode yesterday (Debian 11). IP is the same, I checked Linode DNS A/ record, dig command shows domain points to Linode DNS/IP.

Before the restore wordpress site worked fine.

How to fix?
Thanks.

6 Replies

✓ Best Answer

The name of the file is hosts. It’s in the directory /etc.

You should only remove entries if they begin with your Linode’s IP address and end with an unrecognizable domain name.

All the stuff about localhost, broadcasthost, various mcast hosts, etc need to remain intact.

For example:

#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1                       localhost localhost.localdomain ip4-localhost ip4-loopback
255.255.255.255                 broadcasthost

# The following lines are desirable for IPv6 capable hosts
#
#   LEAVE ALL THESE!
#
::1                             localhost localhost.localdomain ip6-localhost ip6-loopback
fe00::0                         ip6-localnet
ff00::0                         ip6-mcastprefix
ff02::1                         ip6-allnodes
ff02::2                         ip6-allrouters

#
#  DELETE ONLY...
#
1.2.3.4                         dave mydomain.com mail.mydomain.com 
#  ^                                   ^
#  |                                   |
#  + if you recognize this AND         + if you DONT' recognize this

The number of spaces between the entries in each line doesn't matter. Lines beginning with # are comments.

— sw

How to fix?

Did you boot your Linode from the restored snapshot? You have to set up a "Configuration" to do that (restoring the snapshot may do that for you…I just don't remember).

Some information about the configuration of your website and what you're seeing would be helpful.

-- sw

Yes I booted from the restored snapshot. It's the OpenLiteSpeed web server and I think because the IP stayed the same, the configuration did not run when I ran the SSH on the root. I just reset my vhconfig and now it says:

This site can’t be reached DNS address could not be found. Diagnosing the problem.
DNS_PROBE_POSSIBLE

So I'm going to give it sometime. It's strange because after I restored the snapshot, the Instance IP address stayed the same!!

So I'm going to give it sometime. It's strange because after I restored the snapshot, the Instance IP address stayed the same!!

Restoring a snapshot doesn't affect DNS information. It will, however, affect /etc/hosts. Make sure your web server doesn't use a domain name that used to appear in /etc/hosts. If you change /etc/hosts, the changes will be instantaneous…no need to wait.

-- sw

Please elaborate, I'm not understanding….

Where is this /etc/hosts located? and if the domain does appear in /etc/hosts, should I remove it from /etc/hosts?

@stevewi
It worked, thank you very much.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct