If you're in the process of migrating to Kualo or developing a new website, you might find yourself needing to access the site before it goes live. This guide offers a detailed walkthrough on using your workstation's 'hosts' file to achieve this, a method particularly useful when navigating the complexities of modern PHP software and rewrite rules.
Using the 'hosts' file provides a reliable way to test your website in a real-world environment, but it does require modifying system files and does not facilitate the creation of shareable links for client or team reviews. For those needing a simpler solution or the ability to share progress with others, an alternative is using SkipDNS, a tool that allows you to preview your website without system modifications. For more information on this approach, we invite you to read our companion article here.
Accessing the development version of a website can be challenging due to URL rewrites in modern PHP frameworks, which are designed to enhance search engine optimization. To bypass these challenges, modifying the 'hosts' file on your local workstation is an effective solution. This method directs your web browser to the development site's IP address, without impacting the live website's accessibility to other users.
Log into your cPanel and navigate to the General Information section. Look for 'Your Shared IP Address' or 'Your Dedicated IP Address'.
Add a line like
220.127.116.11 yourdomainatkualo.com www.yourdomainatkualo.com, replacing
18.104.22.168 with your site's IP address that you obtained from cPanel. Save the file after making changes.
Restart your browser or clear the cache to ensure the changes take effect.
After completing your testing, remove or comment out the entry in the 'hosts' file by adding a
# before the line. You'll need to save your file, restart your browser and possibly clear caches, as you did before.
sudo pico -w /etc/hosts and your administrative password.
For more in-depth information about the hosts file, visit the Wikipedia article on this topic.
Modifying the 'hosts' file is a straightforward yet powerful way to access development versions of websites. This method ensures that you can test and develop in a realistic environment without disrupting the live site. Always remember to revert any changes in the 'hosts' file after completing your work to avoid future access issues.
For a simpler method you may also wish to explore how you can use SkipDNS to preview a website before making it live.
Powered by WHMCompleteSolution