For development I want to be able to use my wordpress site with localhost, and with a variety of IPs, maybe even with some throwaways domain names.
Now wordpress doesn't allow, you have to choose 1 "site url" and change it every time you decide to use a different port or different test server IP.
I am aware I can change hosts file on my local computer, but that doesn't work if I am hosting a site temporarily for a client to test. I don't want to have to get them to change their hosts file.
How can I modify wordpress to make this work? Is there a plugin that does such a thing? If not, how can I make my own plugin or hack wordpress to make it do what I want? I am a developer but I don't know wordpress, php and apache very well.
Could it be as simple as making a plugin that overrides global vars like site_url and what not?
Example the wp site should load and not redirect if I visit:
http://localhost (assuming I'm listening on port 80)
http://localhost:3000 (assuming I'm listening on port 3000)
http://wordpress-test (assuming I change my hosts file)
http://123.123.123.123 (assuming the site is listening on that server at port 80)