[wp-hackers] Your development Setup

// ravi ravi-lists at g8o.net
Wed Jul 18 15:22:19 UTC 2012



I use the built-in Apache/PHP setup in OS X, and a Mac installation packaged by MySQL for the database. I use MacVim for editing code. The real tricky part was to set up a way to test the WordPress running on my system, including from a Windows VM. The problem is that WordPress, IIRC, [re]writes/generates URLs with the hostname configured in the Settings. In my case, this means that, among other things, if I let the installation to default to ‘localhost’ or an IP address, I cannot reach it from a VM or if the IP address changes etc. My hack to overcome this problem was to define a wp.example.com in my Mac’s /etc/hosts that points to localhost/127.0.0.1 and a wp.example.com in the LMHOSTS on the Windows VM that points to the Mac’s IP address on the VM/NAT side. I then configured WP to use the name wp.example.com as the site address, and that works, with suitable adjustments to proxies, etc. I haven’t come across a cleaner solution to this problem, but I suspect there may be one that involves better WP configuration.

Regards,

	—ravi



More information about the wp-hackers mailing list