Table of Contents

This guide will explain how you can test your site(s) locally from your Laptop / Computer after migrating your site(s) onto your new Cloudways server. It is a critical step in doing the final DNS changes and taking your site(s) live from Cloudways.

How to Test Your New Cloudways Application via Local Hosts File Changes

Step #1 — Add Your Domains

First of all, you need to add your domains to your application. We have created an article that shows you step-by-step how to do it.

Step #2 — Get the IP Address of Your Server

Next, you need to get the IP address of your server.

  1. From the top menu bar, open Servers.

  2. Next, choose your desired server.

  3. Under Master Credentials, please copy the IP address of your server.

Step #3 — Add New Entry in Your Local Device Hosts File

Now we need to update the hosts file on your local device. We are showing it here for a Windows computer. Use equivalent tools for other systems / OS.

We open Notepad as Administrator.

Go to File -> Open and browse to the location of your hosts file (C: Windows\System32\drivers\etc\) and open hosts file. Make sure that (All Files *.* ) is selected in the file type section.

  1. Paste your copied IP Address and type your domain name with and without www.

  2. Click on File.

  3. Now click on Save to save the changes.

After doing this process, your local device points to the Cloudways server for your application domain. You can now test all your website functionality while your users/customers continue to access the original server.

Once you are happy that everything is working smoothly on your new Cloudways server, you can proceed to make the necessary DNS changes to take your site live from Cloudways.

Important Note

  • Remember to remove the host’s entry created above from your host’s file once you have performed the DNS changes.

That’s it! We hope this article was helpful. If you need any help, then feel free to search your query on Cloudways Support Center or contact us via chat (Need a Hand > Send us a Message). Alternatively, you can also create a support ticket.

Did this answer your question?