WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a domain-based multisite with domain mapping. Until now I've been developing locally with

  • my hosts file setup to handle all sites through localhost
  • a flag in my wp-config.php, indicating whether to use the local or live db

This makes development very pleasant, because development and production environment are very similar and all paths are always identical.

Now I need to develop on a public / non-localhost address. What's the best way to accomplish that - or what options exist in general.

share|improve this question
Why are you using multi-site? To avoid setting up multiple instances of WordPress or because you are developing for a multi-site environment? – Stephen Jan 14 '13 at 22:57
I am not quite sure if I can distinguish the two enough. We have a series of sites, which all use the same theme, similar plugins and probably will also share some content between each other. – SunnyRed Jan 14 '13 at 23:03
Guess I need to clarify my question a bit. Is your production target multi-site? – Stephen Jan 14 '13 at 23:26
Sry, yes it is. – SunnyRed Jan 14 '13 at 23:29

I don't have any experience with your specific configuration so I can only offer some general advice. But obviously the closer a development/test environment is to the production environment the better. Saves a lot of headache in the long run.

If your production environment is already configured and live I'd do everything possible to duplicate that in your new development environment. Of course you'll either want different host names (dev.example.com versus www.example.com) or will have to use your hosts file to 'trick' your machine in to going to the new dev envrionment. It's basically the same thing that you're doing now, only WordPress isn't on your local machine.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.