-1

I just finished building my basic website using wordpress and wamp. installation directory is at C:\wamp64\www\wordpress and i'm currently accessing my site at localhost/wordpress now i have 2 problems:
1. how can i trick my localhost to use http://www.tracking-site.com instead of localhost/wordpress? I tried changing site and wordpress address but all i get is page not found.

  1. after changing my url, i am planning to access my local wordpress (which will now be http://www.tracking-site.com) from another PC.
    2a. do i need to copy all the wordpress files to pc#2?
    2b. do i need to install wamp to pc#2?

edit: i can skip problem #1 if changing site url is not important. cause my main target here is to access my localhost wordpress from another PC with same LAN. I tried adding tracking-site.com in hosts file to redirect to 127.0.0.1 then in PC#2 added in hosts file 192.168.x.xxx (my ip) then tracking-site.com. not working tho.

I don't want to host it online because my website will only be used internally in my workplace.

user3391847
  • 11
  • 1
  • 5

1 Answers1

0

This should work, haven't done it in Windows in forever.

  1. Set your site to a different URL, this is probably a bad idea honestly since WP hardcodes a lot of urls like the images, you can get past this by using wp-cli.phar to search and replace in the db but that's not a simple procedure either.

That being said it can be done.

  1. Right click Notepad and open as administrator.
  2. Click Open and change the file type to all files.
  3. open the following file: c:\Windows\System32\Drivers\etc\hosts
  4. Add the following line: 127.0.0.1 www.tracking-site.com

Question 2. Is answered here: How to access my localhost from another PC in LAN?

Community
  • 1
  • 1
Rick Calder
  • 18,310
  • 3
  • 24
  • 41