[wp-hackers] Site Address during development

Otto otto at ottodestruct.com
Thu Sep 2 14:52:07 UTC 2010


If you need a URL that can be run on a live box without editing, then
sure, editing hosts files is not an option there.

In that case, I'd create a plugin to dynamically change those URLs as
they passed through the_content and such.

But in the database, I'd always want the URLs to be the real deal.
This gives the best of all worlds:
a) no URL munging necessary when moving to production
b) local setups can be easily run with host file changes

Sure, you need a plugin to run an on-the-net demo box, but that's the only case.

-Otto



On Thu, Sep 2, 2010 at 9:36 AM, Vid Luther <vid at zippykid.com> wrote:
>
>
>
> On Sep 2, 2010, at 9:30 AM, Otto wrote:
>
>> Edit your hosts file, and add a line like this:
>> 127.0.0.1 example.com
>>
>> Then set up WordPress on your local machine using the example.com URL.
>>
>
> Only thing is, sometimes the client wants to approve the changes, so there's a staging server in place.
> Most of our clients don't know how to edit their hosts file, don't use firefox, and having them use a
> proxy where we can manipulate dns (we used to do this at network solutions internally) is also not possible.
>
>
>> When you're ready to move it to the live server, delete the line from
>> the hosts file and just move the whole thing over. All the URLs will
>> still say example.com in them, it's just not pointing to your local
>> machine any more.
>>
>> -Otto
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list