Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

Martin Gibson
Martin Gibson
6,581 Points

Is it possible to run your localhost website as if it were live e.g. http://localhost/mysite > http://mysite.com

Is it possible to run your localhost Wordpress website as if it were live e.g. http://localhost/mysite > http://mysite.com so like trick your computer into thinking localhost is actually a real website?

By doing this it means I don't need to go through the search and replace process when taking my website live, and I am always finding issues with migrating some plugins. For example the popular Visual Composer plugin stores data in hashes so search and replace plugins don't work.

4 Answers

jason chan
jason chan
31,009 Points

if you change your host file

you can have the following URLs.

Hide   Copy Code
# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

127.0.0.1       localhost
127.0.0.1       www.theangrycoder.com
127.0.0.1       www.hangamahouse.com
127.0.0.1       www.thelonelylover.com
127.0.0.1       www.willyouloveme.com
jason chan
jason chan
31,009 Points

yes you change your host file.

jason chan
jason chan
31,009 Points

http://www.noip.com/ if you want to host yourself as a server with your internet service provider you can use these guys.

jason chan
jason chan
31,009 Points

no problem man. Happy coding. :smile: