2008
07.03

Ever want to edit your website locally with a copy of your live site? This is how I duplicated rareexample.ca on a local machine, minimal work.

  1. Get and install Wamp. To avoid headaches, install in your c:\
  2. Ftp your server files to C:\wamp\www\rareexample
  3. Backup your Database locally
  4. Open your database file, search and replace rareexample.ca for rareexample.dev
  5. Run wamp, it will put a little icon in your tray, left click it, goto Apache, open http.conf
  6. Go to the bottom and paste this
    NameVirtualHost 127.0.0.1
    <VirtualHost 127.0.0.1>
        ServerName localhost
        DocumentRoot "c:/wamp/www/"
    </VirtualHost>
    <VirtualHost 127.0.0.1>
        ServerName www.rareexample.dev
        DocumentRoot "c:/wamp/www/rareexample/"
    </VirtualHost>
    

  7. Save the file
  8. Left click wamp icon, restart all services
  9. edit your hosts file located in \WINDOWS\system32\drivers\etc
  10. add this to it and save it
    127.0.0.1 www.rareexample.dev
  11. Click start, run, paste this ipconfig /flushcache
  12. Have a beer.

P.s. if you’re wanting to access your windows server from a mac. Try this

  1. Open terminal
  2. pico /private/etc/hosts
  3. add the 2 similar lines as the windows host file but instead of 127.0.0.1, put your xp boxe’s lan ip
  4. dscacheutil -flushcache on mac
  5. Don’t forget to change your httpd.conf and add VirtualHost entries for your local ip

1 comment so far

Add Your Comment
  1. Just noticed a few errors in this. Fixed and should work fine.