A Site Administrator can verify that a WordPress site is functioning correctly on Hostek servers before updating public DNS records. This process ensures that the site is fully operational, the database is correctly linked, and the content is intact before the public transition.
Before you begin
You will need:
A WordPress site that has been migrated to Hostek.
Access to the local
hostsfile on a computer (Windows or macOS).The IP address of the Hostek server where the site is hosted.
A browser on the local machine used for testing.
Testing the site via the local hosts file
Because the DNS has not yet been updated, the public internet cannot see the site on the new server. You must "trick" your local computer into looking at the Hostek IP address instead of the original server.
Open a text editor (such as Notepad on Windows or TextEdit on macOS) as an Administrator or with root privileges.
Open the
hostsfile. The path depends on your operating system:Windows:
C:\Windows\System32\drivers\\etc\hostsmacOS:
/etc/hosts
Add a new line at the bottom of the file using the following format:
[Hostek IP Address] [Your Domain]Example:
192.0.2.10 example.comSave the file and close the editor.
Verifying the site content
Once the hosts file is updated, your browser will resolve the domain name to the Hostek IP address.
Open your web browser and navigate to your domain (e.g.,
http://example.com).Verify that the homepage loads correctly.
Click through several internal pages to ensure links are functioning.
Log in to the WordPress dashboard (e.g.,
http://example.com/wp-admin).Confirm that the dashboard loads and that you can access the settings.
Confirm the result
The test is successful if:
The website loads on your local machine using the domain name.
The WordPress dashboard is accessible.
All internal links and images load from the new server.
If the site does not load or shows an error
If the site does not load or displays a "Site cannot be reached" error:
Check the IP address: Ensure the IP address in your
hostsfile matches the IP provided by Hostek for your new server.Clear your browser cache: Your browser may be caching the old DNS information.
Flush your DNS cache:
Windows: Open Command Prompt and type
ipconfig /flushdns.macOS: Open Terminal and type
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder.
Check the local file: Ensure there are no extra spaces or characters in the line you added to the
hostsfile.
Limitations
Local only: This test only works on the computer where you edited the
hostsfile. Other devices on your network will still see the old site until the DNS is updated.Browser Cache: Some browsers may ignore the
hostsfile if they have a hard-cached DNS entry. Using an Incognito or Private window can help bypass this.DNS Propagation: This procedure does not affect the actual DNS records; it only simulates the change for your local machine.
